* [LTP] [PATCH]Fix bug of unshare
@ 2010-12-28 7:27 Bian Naimeng
2011-01-02 1:15 ` Garrett Cooper
0 siblings, 1 reply; 2+ messages in thread
From: Bian Naimeng @ 2010-12-28 7:27 UTC (permalink / raw)
To: Garrett Cooper; +Cc: ltp-list
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 <biannm@cn.fujitsu.com>
---
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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [LTP] [PATCH]Fix bug of unshare
2010-12-28 7:27 [LTP] [PATCH]Fix bug of unshare Bian Naimeng
@ 2011-01-02 1:15 ` Garrett Cooper
0 siblings, 0 replies; 2+ messages in thread
From: Garrett Cooper @ 2011-01-02 1:15 UTC (permalink / raw)
To: Bian Naimeng; +Cc: ltp-list
On Dec 27, 2010, at 11:27 PM, Bian Naimeng wrote:
> 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.
Thanks!
-Garrett
------------------------------------------------------------------------------
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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-01-02 1:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-28 7:27 [LTP] [PATCH]Fix bug of unshare Bian Naimeng
2011-01-02 1:15 ` Garrett Cooper
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox