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

Unified Diff: sandbox/linux/services/syscall_wrappers_unittest.cc

Issue 807213002: Revert "Use the libc clone wrapper in sys_clone." (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 6 years 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 | « sandbox/linux/services/syscall_wrappers.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/linux/services/syscall_wrappers_unittest.cc
diff --git a/sandbox/linux/services/syscall_wrappers_unittest.cc b/sandbox/linux/services/syscall_wrappers_unittest.cc
index 79ed63d68910ab0e64f134165a6bda9878856424..861dd5feb1c02aa7ece96186694f6b7b675a19f1 100644
--- a/sandbox/linux/services/syscall_wrappers_unittest.cc
+++ b/sandbox/linux/services/syscall_wrappers_unittest.cc
@@ -39,18 +39,14 @@ TEST(SyscallWrappers, CloneParentSettid) {
}
TEST(SyscallWrappers, CloneChildSettid) {
- // Warm up the libc pid cache, if there is one.
- ASSERT_EQ(sys_getpid(), getpid());
-
pid_t ctid = 0;
pid_t pid =
sys_clone(CLONE_CHILD_SETTID | SIGCHLD, nullptr, nullptr, &ctid, nullptr);
const int kSuccessExit = 0;
if (0 == pid) {
- // In child. Check both the raw getpid syscall and the libc getpid wrapper
- // (which may rely on a pid cache).
- if (sys_getpid() == ctid && getpid() == ctid)
+ // In child.
+ if (sys_getpid() == ctid)
_exit(kSuccessExit);
_exit(1);
}
« no previous file with comments | « sandbox/linux/services/syscall_wrappers.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698