From f16da4d7744438d52f69cac40d8d374626b44ade Mon Sep 17 00:00:00 2001 From: deraadt Date: Fri, 23 Aug 2024 02:49:20 +0000 Subject: [PATCH] these tests only print strerror result, which can be confusing to look up. print errno also. --- regress/sys/kern/execve/doexec.c | 4 ++-- regress/sys/kern/execve/good/badinterplen | 2 +- regress/sys/kern/execve/good/devnullscript | 2 +- regress/sys/kern/execve/good/empty | 2 +- regress/sys/kern/execve/good/goodaout | 2 +- regress/sys/kern/execve/good/goodscript | 2 +- regress/sys/kern/execve/good/nonexistent | 2 +- regress/sys/kern/execve/good/nonexistshell | 2 +- regress/sys/kern/execve/good/scriptarg | 4 ++-- regress/sys/kern/execve/good/scriptarg-nospace | 4 ++-- regress/sys/kern/execve/good/truncaout | 2 +- regress/sys/kern/execve/tests/goodaout.c | 4 ++-- regress/sys/kern/execve/tests/goodscript.in | 4 ++-- regress/sys/kern/execve/tests/scriptarg-nospace.in | 4 ++-- regress/sys/kern/execve/tests/scriptarg.in | 4 ++-- 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' -- 2.20.1