Fix two bugs of unshare01. 1. We have test unshare(CLONE_FS) twice, the first one should be CLONE_FILES. 2. Child process forgot to invoke exit, it will cause test fail.
Signed-off-by: Bian Naimeng <[email protected]> --- testcases/kernel/syscalls/unshare/unshare01.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/testcases/kernel/syscalls/unshare/unshare01.c b/testcases/kernel/syscalls/unshare/unshare01.c index d41edd1..b82777c 100644 --- a/testcases/kernel/syscalls/unshare/unshare01.c +++ b/testcases/kernel/syscalls/unshare/unshare01.c @@ -176,7 +176,7 @@ int main(int ac, char **av) { tst_brkm(TFAIL|TTERRNO, cleanup, "fork() failed."); } else if (TEST_RETURN == 0) { - TEST_RETURN = unshare(CLONE_FS); + TEST_RETURN = unshare(CLONE_FILES); if (TEST_RETURN == 0) { printf("unshare with CLONE_FILES call " "succeeded\n"); @@ -268,6 +268,7 @@ int main(int ac, char **av) { rval = 2; } } + exit(rval); } else { if (wait(&rval) == -1) { tst_brkm(TBROK|TERRNO, cleanup, -- 1.7.0.4 -- Regards Bian Naimeng ------------------------------------------------------------------------------ Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
