Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(131)

Unified Diff: native_client_sdk/src/tests/nacl_io_test/kernel_wrap_test.cc

Issue 1136953014: nacl_io: Remove the direct syscall intercept for 'remove' (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « native_client_sdk/src/libraries/nacl_io/syscalls/remove.c ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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))
« no previous file with comments | « native_client_sdk/src/libraries/nacl_io/syscalls/remove.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698