define and use common clone helpers
From: Serge E. Hallyn <serue@us.ibm.com>
Define ltp_clone() and related helpers in libltp, and convert all existing
clone usages to them. This way we no longer have arch-specific cruft
cluttering up random source files all over the place.
diff --git a/testcases/kernel/syscalls/clone/clone02.c b/testcases/kernel/syscalls/clone/clone02.c
index 03de57f..e65702e 100644
--- a/testcases/kernel/syscalls/clone/clone02.c
+++ b/testcases/kernel/syscalls/clone/clone02.c
@@ -190,17 +190,8 @@
}
/* Test the system call */
-#if defined(__hppa__)
- TEST(clone(child_fn, child_stack,
- test_cases[i].flags, NULL));
-#elif defined(__ia64__)
- TEST(clone2(child_fn, child_stack,
- CHILD_STACK_SIZE, test_cases[i].flags, NULL,
- NULL, NULL, NULL));
-#else
- TEST(clone(child_fn, child_stack + CHILD_STACK_SIZE,
- test_cases[i].flags, NULL));
-#endif
+ TEST(ltp_clone(test_cases[i].flags, child_fn, NULL,
+ CHILD_STACK_SIZE, child_stack));
/* check return code */
if (TEST_RETURN == -1) {