e354a5
commit 083d644d420f49c992667f4c7a54848ad3dee54d
e354a5
Author: Michael Hudson-Doyle <michael.hudson@canonical.com>
e354a5
Date:   Wed Mar 11 13:05:25 2020 +1300
e354a5
e354a5
    test-container: print errno when execvp fails
e354a5
    
e354a5
    I'm debugging a situation where lots of tests using test-container fail
e354a5
    and it's possible knowing errno would help understand why.
e354a5
    
e354a5
    Reviewed-by: DJ Delorie <dj@redhat.com>
e354a5
e354a5
diff --git a/support/test-container.c b/support/test-container.c
e354a5
index 9488ec7b4a824380..9eff8baeef0e9d8a 100644
e354a5
--- a/support/test-container.c
e354a5
+++ b/support/test-container.c
e354a5
@@ -1145,7 +1145,7 @@ main (int argc, char **argv)
e354a5
   execvp (new_child_exec, new_child_proc);
e354a5
 
e354a5
   /* Or don't run the child?  */
e354a5
-  FAIL_EXIT1 ("Unable to exec %s\n", new_child_exec);
e354a5
+  FAIL_EXIT1 ("Unable to exec %s: %s\n", new_child_exec, strerror (errno));
e354a5
 
e354a5
   /* Because gcc won't know error () never returns...  */
e354a5
   exit (EXIT_UNSUPPORTED);