summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2024-08-23 02:49:21 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2024-08-23 02:49:21 +0000
commit157bacfb6edc3dc723732ae4a8d691138045f87b (patch)
treecaa93ba98dc48e1f83d99974adcddb89739fcfdb /regress
parent298a157b062ef7a27bbe22fcc687faeeda7f1475 (diff)
these tests only print strerror result, which can be confusing to look up.
print errno also.
Diffstat (limited to 'regress')
-rw-r--r--regress/sys/kern/execve/doexec.c4
-rw-r--r--regress/sys/kern/execve/good/badinterplen2
-rw-r--r--regress/sys/kern/execve/good/devnullscript2
-rw-r--r--regress/sys/kern/execve/good/empty2
-rw-r--r--regress/sys/kern/execve/good/goodaout2
-rw-r--r--regress/sys/kern/execve/good/goodscript2
-rw-r--r--regress/sys/kern/execve/good/nonexistent2
-rw-r--r--regress/sys/kern/execve/good/nonexistshell2
-rw-r--r--regress/sys/kern/execve/good/scriptarg4
-rw-r--r--regress/sys/kern/execve/good/scriptarg-nospace4
-rw-r--r--regress/sys/kern/execve/good/truncaout2
-rw-r--r--regress/sys/kern/execve/tests/goodaout.c4
-rw-r--r--regress/sys/kern/execve/tests/goodscript.in4
-rw-r--r--regress/sys/kern/execve/tests/scriptarg-nospace.in4
-rw-r--r--regress/sys/kern/execve/tests/scriptarg.in4
15 files changed, 22 insertions, 22 deletions
diff --git a/regress/sys/kern/execve/doexec.c b/regress/sys/kern/execve/doexec.c
index c22d49ae1bc..79d76d42115 100644
--- a/regress/sys/kern/execve/doexec.c
+++ b/regress/sys/kern/execve/doexec.c
@@ -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);
}
diff --git a/regress/sys/kern/execve/good/badinterplen b/regress/sys/kern/execve/good/badinterplen
index a0f8bc9fa2e..544c98199ee 100644
--- a/regress/sys/kern/execve/good/badinterplen
+++ b/regress/sys/kern/execve/good/badinterplen
@@ -1 +1 @@
-Exec format error
+errno=8 Exec format error
diff --git a/regress/sys/kern/execve/good/devnullscript b/regress/sys/kern/execve/good/devnullscript
index fd58f1d4fad..1ff7ef04b57 100644
--- a/regress/sys/kern/execve/good/devnullscript
+++ b/regress/sys/kern/execve/good/devnullscript
@@ -1 +1 @@
-Permission denied
+errno=13 Permission denied
diff --git a/regress/sys/kern/execve/good/empty b/regress/sys/kern/execve/good/empty
index a0f8bc9fa2e..544c98199ee 100644
--- a/regress/sys/kern/execve/good/empty
+++ b/regress/sys/kern/execve/good/empty
@@ -1 +1 @@
-Exec format error
+errno=8 Exec format error
diff --git a/regress/sys/kern/execve/good/goodaout b/regress/sys/kern/execve/good/goodaout
index 774a5c0df4b..d446d6148b6 100644
--- a/regress/sys/kern/execve/good/goodaout
+++ b/regress/sys/kern/execve/good/goodaout
@@ -1 +1 @@
-succeeded
+errno=0 succeeded
diff --git a/regress/sys/kern/execve/good/goodscript b/regress/sys/kern/execve/good/goodscript
index 774a5c0df4b..d446d6148b6 100644
--- a/regress/sys/kern/execve/good/goodscript
+++ b/regress/sys/kern/execve/good/goodscript
@@ -1 +1 @@
-succeeded
+errno=0 succeeded
diff --git a/regress/sys/kern/execve/good/nonexistent b/regress/sys/kern/execve/good/nonexistent
index ddc886910ed..567cebb4a9a 100644
--- a/regress/sys/kern/execve/good/nonexistent
+++ b/regress/sys/kern/execve/good/nonexistent
@@ -1 +1 @@
-No such file or directory
+errno=2 No such file or directory
diff --git a/regress/sys/kern/execve/good/nonexistshell b/regress/sys/kern/execve/good/nonexistshell
index ddc886910ed..567cebb4a9a 100644
--- a/regress/sys/kern/execve/good/nonexistshell
+++ b/regress/sys/kern/execve/good/nonexistshell
@@ -1 +1 @@
-No such file or directory
+errno=2 No such file or directory
diff --git a/regress/sys/kern/execve/good/scriptarg b/regress/sys/kern/execve/good/scriptarg
index f3b372c72fe..27fa685c2b5 100644
--- a/regress/sys/kern/execve/good/scriptarg
+++ b/regress/sys/kern/execve/good/scriptarg
@@ -1,2 +1,2 @@
-+ echo succeeded
-succeeded
++ echo errno=0 succeeded
+errno=0 succeeded
diff --git a/regress/sys/kern/execve/good/scriptarg-nospace b/regress/sys/kern/execve/good/scriptarg-nospace
index f3b372c72fe..27fa685c2b5 100644
--- a/regress/sys/kern/execve/good/scriptarg-nospace
+++ b/regress/sys/kern/execve/good/scriptarg-nospace
@@ -1,2 +1,2 @@
-+ echo succeeded
-succeeded
++ echo errno=0 succeeded
+errno=0 succeeded
diff --git a/regress/sys/kern/execve/good/truncaout b/regress/sys/kern/execve/good/truncaout
index a0f8bc9fa2e..544c98199ee 100644
--- a/regress/sys/kern/execve/good/truncaout
+++ b/regress/sys/kern/execve/good/truncaout
@@ -1 +1 @@
-Exec format error
+errno=8 Exec format error
diff --git a/regress/sys/kern/execve/tests/goodaout.c b/regress/sys/kern/execve/tests/goodaout.c
index f491db991e8..6863e71d03f 100644
--- a/regress/sys/kern/execve/tests/goodaout.c
+++ b/regress/sys/kern/execve/tests/goodaout.c
@@ -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);
}
diff --git a/regress/sys/kern/execve/tests/goodscript.in b/regress/sys/kern/execve/tests/goodscript.in
index 331f77c6527..b48292b55a8 100644
--- a/regress/sys/kern/execve/tests/goodscript.in
+++ b/regress/sys/kern/execve/tests/goodscript.in
@@ -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'
diff --git a/regress/sys/kern/execve/tests/scriptarg-nospace.in b/regress/sys/kern/execve/tests/scriptarg-nospace.in
index c3fe849cb5a..93511587871 100644
--- a/regress/sys/kern/execve/tests/scriptarg-nospace.in
+++ b/regress/sys/kern/execve/tests/scriptarg-nospace.in
@@ -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'
diff --git a/regress/sys/kern/execve/tests/scriptarg.in b/regress/sys/kern/execve/tests/scriptarg.in
index 2c09479a435..c1e1a082635 100644
--- a/regress/sys/kern/execve/tests/scriptarg.in
+++ b/regress/sys/kern/execve/tests/scriptarg.in
@@ -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'