From: Bian Naimeng <biannm@cn.fujitsu.com>
To: Garrett Cooper <yanegomi@gmail.com>
Cc: ltp-list@lists.sourceforge.net
Subject: [LTP] [PATCH]Fix bug of unshare
Date: Tue, 28 Dec 2010 15:27:28 +0800 [thread overview]
Message-ID: <4D199160.3070103@cn.fujitsu.com> (raw)
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
next reply other threads:[~2010-12-28 7:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-28 7:27 Bian Naimeng [this message]
2011-01-02 1:15 ` [LTP] [PATCH]Fix bug of unshare Garrett Cooper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D199160.3070103@cn.fujitsu.com \
--to=biannm@cn.fujitsu.com \
--cc=ltp-list@lists.sourceforge.net \
--cc=yanegomi@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox