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