The cleanup() may be called twice by both the parent and child process in this testcase leading to a failure.
This patch makes sure cleanup() is called only once by parent process. Signed-off-by: Zeng Linggang <[email protected]> Signed-off-by: Ma Shimiao <[email protected]> --- testcases/kernel/syscalls/setuid/setuid04.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/testcases/kernel/syscalls/setuid/setuid04.c b/testcases/kernel/syscalls/setuid/setuid04.c index d8e991e..365859b 100644 --- a/testcases/kernel/syscalls/setuid/setuid04.c +++ b/testcases/kernel/syscalls/setuid/setuid04.c @@ -88,7 +88,7 @@ static void do_master_child(void) int pid; int status; - if (SETUID(cleanup, ltpuser->pw_uid) == -1) { + if (SETUID(NULL, ltpuser->pw_uid) == -1) { tst_brkm(TBROK, NULL, "setuid failed to set the effective uid to %d", ltpuser->pw_uid); -- 1.7.1 ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
