From: Michael Hudson-Doyle Date: Wed, 11 Mar 2020 00:05:25 +0000 (+1300) Subject: test-container: print errno when execvp fails X-Git-Tag: glibc-2.32~509 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=083d644d420f49c992667f4c7a54848ad3dee54d;p=thirdparty%2Fglibc.git test-container: print errno when execvp fails I'm debugging a situation where lots of tests using test-container fail and it's possible knowing errno would help understand why. Reviewed-by: DJ Delorie --- diff --git a/support/test-container.c b/support/test-container.c index e970eb2c18a..dff2ff379ea 100644 --- a/support/test-container.c +++ b/support/test-container.c @@ -1145,7 +1145,7 @@ main (int argc, char **argv) execvp (new_child_exec, new_child_proc); /* Or don't run the child? */ - FAIL_EXIT1 ("Unable to exec %s\n", new_child_exec); + FAIL_EXIT1 ("Unable to exec %s: %s\n", new_child_exec, strerror (errno)); /* Because gcc won't know error () never returns... */ exit (EXIT_UNSUPPORTED);