]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
test-container: print errno when execvp fails
authorMichael Hudson-Doyle <michael.hudson@canonical.com>
Wed, 11 Mar 2020 00:05:25 +0000 (13:05 +1300)
committerDJ Delorie <dj@redhat.com>
Wed, 11 Mar 2020 20:00:58 +0000 (16:00 -0400)
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 <dj@redhat.com>
support/test-container.c

index e970eb2c18a351a8ba74f118efffdb5873eb6634..dff2ff379eaaf2d739fb9f02ca7405af4d6c11c9 100644 (file)
@@ -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);