All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peng Haitao <penght@cn.fujitsu.com>
To: Garrett Cooper <yanegomi@gmail.com>
Cc: ltp-list@lists.sourceforge.net
Subject: [LTP] [PATCH] ftest06.c: fix error of the child process need exit
Date: Sat, 12 Mar 2011 17:50:58 +0800	[thread overview]
Message-ID: <4D7B4202.1020302@cn.fujitsu.com> (raw)


The child process should exit after invoking dotest().

Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
---
 testcases/kernel/fs/ftest/ftest06.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/testcases/kernel/fs/ftest/ftest06.c b/testcases/kernel/fs/ftest/ftest06.c
index d8ff8b6..18eae5d 100644
--- a/testcases/kernel/fs/ftest/ftest06.c
+++ b/testcases/kernel/fs/ftest/ftest06.c
@@ -110,9 +110,8 @@ int main(int ac, char *av[])
 	/*
 	 * parse standard options
 	 */
-	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) {
+	if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL)
 		tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
-	}
 
 	/*
 	 * Default values for run conditions.
@@ -162,7 +161,7 @@ int main(int ac, char *av[])
 		for (k = 0; k < nchild; k++) {
 			if ((child = fork()) == 0) {
 				dotest(k, iterations);
-
+				tst_exit();
 			}
 			if (child < 0) {
 				tst_brkm(TBROK|TERRNO, cleanup, "fork failed");
@@ -239,8 +238,6 @@ int main(int ac, char *av[])
 		}
 
 		sync();
-		cleanup();
-
 	}
 
 	if (local_flag == FAILED)
-- 
1.7.1

-- 
Best Regards,
Peng Haitao


------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

             reply	other threads:[~2011-03-12  9:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-12  9:50 Peng Haitao [this message]
2011-03-13 12:29 ` [LTP] [PATCH] ftest06.c: fix error of the child process need exit Caspar Zhang
2011-03-15 12:16 ` 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=4D7B4202.1020302@cn.fujitsu.com \
    --to=penght@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.