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