Index: native_client_sdk/src/tests/nacl_io_test/kernel_wrap_test.cc |
diff --git a/native_client_sdk/src/tests/nacl_io_test/kernel_wrap_test.cc b/native_client_sdk/src/tests/nacl_io_test/kernel_wrap_test.cc |
index ebe44b8cfdc752aeac4eb14029ef4f3ece280787..efb30fbe6b2b999c6d39f1a168113ab6beb3b478 100644 |
--- a/native_client_sdk/src/tests/nacl_io_test/kernel_wrap_test.cc |
+++ b/native_client_sdk/src/tests/nacl_io_test/kernel_wrap_test.cc |
@@ -510,14 +510,13 @@ TEST_F(KernelWrapTest, readlink) { |
ASSERT_EQ(kDummyErrno, errno); |
} |
-#ifdef __GLIBC__ |
-// Under newlib there is no remove syscall. Instead it is implemented |
-// in terms of unlink()/rmdir(). |
TEST_F(KernelWrapTest, remove) { |
- EXPECT_CALL(mock, remove(kDummyConstChar)).WillOnce(Return(-1)); |
+ // The remove syscall is not directly intercepted. Instead it is implemented |
+ // in terms of unlink()/rmdir(). |
+ EXPECT_CALL(mock, unlink(kDummyConstChar)) |
+ .WillOnce(DoAll(SetErrno(kDummyErrno), Return(-1))); |
EXPECT_EQ(-1, remove(kDummyConstChar)); |
} |
-#endif |
TEST_F(KernelWrapTest, rename) { |
EXPECT_CALL(mock, rename(kDummyConstChar, kDummyConstChar2)) |