Message ID | CALkY8p8m=_f0fqkWmZ2cpxvXa+ePCfnMLng4QdU-ABtiOb9zHg@mail.gmail.com |
---|---|
State | New |
Headers | show |
Series | build: Used FAIL_EXIT1 () on failure to exec child [BZ #23990] | expand |
* Girish Joshi via Libc-alpha: > diff --git a/support/test-container.c b/support/test-container.c > index afc23db148..1423320b8a 100644 > --- a/support/test-container.c > +++ b/support/test-container.c > @@ -392,7 +392,7 @@ recursive_remove (char *path) > /* "rm" would have already printed a suitable error message. */ > if (! WIFEXITED (status) > || WEXITSTATUS (status) != 0) > - exit (1); > + FAIL_EXIT1 ("failed to exec child"); > break; > } Sorry, this patch arrived corrupted on the list. The error message is not correct because the child process returned an error status. This can mean that execvp failed, or something else. It would also make sense to add the status value to the error message. Thanks, Florian
Thanks Florian for the review. > Sorry, this patch arrived corrupted on the list. > > The error message is not correct because the child process returned an > error status. This can mean that execvp failed, or something else. It > would also make sense to add the status value to the error message. > Reposting the patch with corrected error message. Please let me know if it works. From f1cc58ee37ded9a6bb3f5764143c6ea8c3572741 Mon Sep 17 00:00:00 2001 From: Girish Joshi <girish946@gmail.com> Date: Sun, 10 May 2020 01:22:04 +0530 Subject: [PATCH] build: Used FAIL_EXIT1 () on failure to exec child BZ #23990 --- support/test-container.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/support/test-container.c b/support/test-container.c index afc23db148..e9109f9e3d 100644 --- a/support/test-container.c +++ b/support/test-container.c @@ -392,7 +392,7 @@ recursive_remove (char *path) /* "rm" would have already printed a suitable error message. */ if (! WIFEXITED (status) || WEXITSTATUS (status) != 0) - exit (1); + FAIL_EXIT1 ("exec child returned status: %d", status); break; }
Thanks Florian for the review. > Sorry, this patch arrived corrupted on the list. > > The error message is not correct because the child process returned an > error status. This can mean that execvp failed, or something else. It > would also make sense to add the status value to the error message. > > Thanks, > Florian > Reposting the patch with corrected error message. Please let me know if it works. From f1cc58ee37ded9a6bb3f5764143c6ea8c3572741 Mon Sep 17 00:00:00 2001 From: Girish Joshi <girish946@gmail.com> Date: Sun, 10 May 2020 01:22:04 +0530 Subject: [PATCH] build: Used FAIL_EXIT1 () on failure to exec child BZ #23990 --- support/test-container.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/support/test-container.c b/support/test-container.c index afc23db148..e9109f9e3d 100644 --- a/support/test-container.c +++ b/support/test-container.c @@ -392,7 +392,7 @@ recursive_remove (char *path) /* "rm" would have already printed a suitable error message. */ if (! WIFEXITED (status) || WEXITSTATUS (status) != 0) - exit (1); + FAIL_EXIT1 ("exec child returned status: %d", status); break; } -- 2.21.3 Thanks. Girish Joshi
On 23/05/2020 07:05, Girish Joshi via Libc-alpha wrote: > Thanks Florian for the review. > >> Sorry, this patch arrived corrupted on the list. >> >> The error message is not correct because the child process returned an >> error status. This can mean that execvp failed, or something else. It >> would also make sense to add the status value to the error message. >> >> Thanks, >> Florian >> > > Reposting the patch with corrected error message. > Please let me know if it works. > > From f1cc58ee37ded9a6bb3f5764143c6ea8c3572741 Mon Sep 17 00:00:00 2001 > From: Girish Joshi <girish946@gmail.com> > Date: Sun, 10 May 2020 01:22:04 +0530 > Subject: [PATCH] build: Used FAIL_EXIT1 () on failure to exec child BZ #23990 LGTM, thanks. I will push it upstream for you. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> > > --- > support/test-container.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/support/test-container.c b/support/test-container.c > index afc23db148..e9109f9e3d 100644 > --- a/support/test-container.c > +++ b/support/test-container.c > @@ -392,7 +392,7 @@ recursive_remove (char *path) > /* "rm" would have already printed a suitable error message. */ > if (! WIFEXITED (status) > || WEXITSTATUS (status) != 0) > - exit (1); > + FAIL_EXIT1 ("exec child returned status: %d", status); > > break; > } > -- > 2.21.3 > > Thanks. > > Girish Joshi >
> LGTM, thanks. > > I will push it upstream for you. > > Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> Thanks Adhemerval. Girish Joshi
diff --git a/support/test-container.c b/support/test-container.c index afc23db148..1423320b8a 100644 --- a/support/test-container.c +++ b/support/test-container.c @@ -392,7 +392,7 @@ recursive_remove (char *path) /* "rm" would have already printed a suitable error message. */ if (! WIFEXITED (status) || WEXITSTATUS (status) != 0) - exit (1); + FAIL_EXIT1 ("failed to exec child"); break; } -- 2.21.3
From 9c3e8d18343e29aa1f65d1403d4c3878dd2b9865 Mon Sep 17 00:00:00 2001 From: Girish Joshi <girish946@gmail.com> Date: Sun, 10 May 2020 01:22:04 +0530 Subject: [PATCH] build: Used FAIL_EXIT1 () on failure to exec child [BZ #23990] --- support/test-container.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Girish Joshi