* [LTP] [PATCH] ftest06.c: fix error of the child process need exit
@ 2011-03-12 9:50 Peng Haitao
2011-03-13 12:29 ` Caspar Zhang
2011-03-15 12:16 ` Garrett Cooper
0 siblings, 2 replies; 3+ messages in thread
From: Peng Haitao @ 2011-03-12 9:50 UTC (permalink / raw)
To: Garrett Cooper; +Cc: ltp-list
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
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [LTP] [PATCH] ftest06.c: fix error of the child process need exit
2011-03-12 9:50 [LTP] [PATCH] ftest06.c: fix error of the child process need exit Peng Haitao
@ 2011-03-13 12:29 ` Caspar Zhang
2011-03-15 12:16 ` Garrett Cooper
1 sibling, 0 replies; 3+ messages in thread
From: Caspar Zhang @ 2011-03-13 12:29 UTC (permalink / raw)
To: Peng Haitao; +Cc: ltp-list
On 03/12/2011 05:50 PM, Peng Haitao wrote:
>
> The child process should exit after invoking dotest().
>
> Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Confirmed this patch and the other ftest06 patch both work on RHEL6.
Tested-by: Caspar Zhang <czhang@redhat.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)
--
Quality Engineer (Kernel) in
Red Hat Software (Beijing) Co., R&D Branch
http://www.cn.redhat.com/
TEL: +86-10-62608150
------------------------------------------------------------------------------
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
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [LTP] [PATCH] ftest06.c: fix error of the child process need exit
2011-03-12 9:50 [LTP] [PATCH] ftest06.c: fix error of the child process need exit Peng Haitao
2011-03-13 12:29 ` Caspar Zhang
@ 2011-03-15 12:16 ` Garrett Cooper
1 sibling, 0 replies; 3+ messages in thread
From: Garrett Cooper @ 2011-03-15 12:16 UTC (permalink / raw)
To: Peng Haitao; +Cc: ltp-list
On Sat, Mar 12, 2011 at 1:50 AM, Peng Haitao <penght@cn.fujitsu.com> wrote:
>
> The child process should exit after invoking dotest().
Committed -- thanks.
-Garrett
------------------------------------------------------------------------------
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-03-15 12:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-12 9:50 [LTP] [PATCH] ftest06.c: fix error of the child process need exit Peng Haitao
2011-03-13 12:29 ` Caspar Zhang
2011-03-15 12:16 ` Garrett Cooper
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox