these tests only print strerror result, which can be confusing to look up.
authorderaadt <deraadt@openbsd.org>
Fri, 23 Aug 2024 02:49:20 +0000 (02:49 +0000)
committerderaadt <deraadt@openbsd.org>
Fri, 23 Aug 2024 02:49:20 +0000 (02:49 +0000)
print errno also.

15 files changed:
regress/sys/kern/execve/doexec.c
regress/sys/kern/execve/good/badinterplen
regress/sys/kern/execve/good/devnullscript
regress/sys/kern/execve/good/empty
regress/sys/kern/execve/good/goodaout
regress/sys/kern/execve/good/goodscript
regress/sys/kern/execve/good/nonexistent
regress/sys/kern/execve/good/nonexistshell
regress/sys/kern/execve/good/scriptarg
regress/sys/kern/execve/good/scriptarg-nospace
regress/sys/kern/execve/good/truncaout
regress/sys/kern/execve/tests/goodaout.c
regress/sys/kern/execve/tests/goodscript.in
regress/sys/kern/execve/tests/scriptarg-nospace.in
regress/sys/kern/execve/tests/scriptarg.in

index c22d49a..79d76d4 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: doexec.c,v 1.5 2003/09/02 23:52:17 david Exp $        */
+/*     $OpenBSD: doexec.c,v 1.6 2024/08/23 02:49:20 deraadt Exp $      */
 /*     $NetBSD: doexec.c,v 1.3 1995/04/20 22:43:13 cgd Exp $   */
 
 /*
@@ -46,7 +46,7 @@ main(int argc, char *argv[])
        }
 
        if (execve(argv[1], &argv[1], NULL) == -1) {
-               printf("%s\n", strerror(errno));
+               printf("errno=%d\t%s\n", errno, strerror(errno));
                exit(1);
        }
 
index a0f8bc9..544c981 100644 (file)
@@ -1 +1 @@
-Exec format error
+errno=8        Exec format error
index a0f8bc9..544c981 100644 (file)
@@ -1 +1 @@
-Exec format error
+errno=8        Exec format error
index ddc8869..567cebb 100644 (file)
@@ -1 +1 @@
-No such file or directory
+errno=2        No such file or directory
index ddc8869..567cebb 100644 (file)
@@ -1 +1 @@
-No such file or directory
+errno=2        No such file or directory
index f3b372c..27fa685 100644 (file)
@@ -1,2 +1,2 @@
-+ echo succeeded
-succeeded
++ echo errno=0 succeeded
+errno=0        succeeded
index f3b372c..27fa685 100644 (file)
@@ -1,2 +1,2 @@
-+ echo succeeded
-succeeded
++ echo errno=0 succeeded
+errno=0        succeeded
index a0f8bc9..544c981 100644 (file)
@@ -1 +1 @@
-Exec format error
+errno=8        Exec format error
index f491db9..6863e71 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: goodaout.c,v 1.5 2017/02/16 20:59:20 patrick Exp $    */
+/*     $OpenBSD: goodaout.c,v 1.6 2024/08/23 02:49:20 deraadt Exp $    */
 /*     $NetBSD: goodaout.c,v 1.3 1995/04/20 22:44:20 cgd Exp $ */
 
 /*
@@ -38,6 +38,6 @@
 int
 main(int argc, char *argv[])
 {
-       printf("succeeded\n");
+       printf("errno=0 succeeded\n");
        exit(0);
 }
index 331f77c..b48292b 100644 (file)
@@ -1,5 +1,5 @@
 #! /bin/csh
-#      $OpenBSD: goodscript.in,v 1.2 2001/01/29 02:05:56 niklas Exp $
+#      $OpenBSD: goodscript.in,v 1.3 2024/08/23 02:49:20 deraadt Exp $
 
 
-echo succeeded
+echo 'errno=0  succeeded'
index c3fe849..9351158 100644 (file)
@@ -1,5 +1,5 @@
 #!/bin/sh -x
-#      $OpenBSD: scriptarg-nospace.in,v 1.2 2001/01/29 02:05:56 niklas Exp $
+#      $OpenBSD: scriptarg-nospace.in,v 1.3 2024/08/23 02:49:20 deraadt Exp $
 
 
-echo succeeded
+echo 'errno=0  succeeded'
index 2c09479..c1e1a08 100644 (file)
@@ -1,5 +1,5 @@
 #! /bin/sh -x
-#      $OpenBSD: scriptarg.in,v 1.2 2001/01/29 02:05:57 niklas Exp $
+#      $OpenBSD: scriptarg.in,v 1.3 2024/08/23 02:49:20 deraadt Exp $
 
 
-echo succeeded
+echo 'errno=0  succeeded'