diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2023-09-08 09:59:52 +0100 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2023-09-08 09:59:52 +0100 |
commit | f2259efecaf2978bc2baf9b7d9c012e3d01daea0 (patch) | |
tree | b25cb031b79a710d8ab2a9656186b4d111aba4af | |
parent | 78277ccae7b78f89799b5921b2c5e89c5c9a01f6 (diff) |
Testsuite: add command cat2
The /dev/stderr trick manages to fail on Gnu HURD
-rw-r--r-- | test/Makefile.in | 1 | ||||
-rwxr-xr-x | test/runtest | 6 | ||||
-rw-r--r-- | test/scripts/0000-Basic/0628 | 3 | ||||
-rw-r--r-- | test/scripts/0000-Basic/0629 | 2 | ||||
-rw-r--r-- | test/scripts/0000-Basic/0630 | 2 | ||||
-rw-r--r-- | test/scripts/0000-Basic/0631 | 2 |
6 files changed, 11 insertions, 5 deletions
diff --git a/test/Makefile.in b/test/Makefile.in index 4c09ce318..f7a2a4695 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -30,7 +30,6 @@ binaries: $(BINARIES) sysbinaries: FORCE binaries rm -f bin.sys/* bin/locate initdb postgres pg_ctl psql mysqld mysql - if [ -e /dev/stderr ]; then ln -s /dev/stderr bin.sys/stderr; else ln -s /proc/self/fd/2 bin.sys/stderr; fi ls -la bin.sys # Compile and link the programs: diff --git a/test/runtest b/test/runtest index 1730a9889..edaec6b25 100755 --- a/test/runtest +++ b/test/runtest @@ -2639,6 +2639,12 @@ if (/^(ln|ls|du|mkdir|mkfifo|touch|cp|cat)\s/ || run_system("$_ >>test-stdout 2>>test-stderr"); return 1; } +if (/^cat2\s/) + { + s/^cat2/cat/; + run_system("$_ 2>&1 >test-stderr"); + return 1; + } diff --git a/test/scripts/0000-Basic/0628 b/test/scripts/0000-Basic/0628 index cb8cdd76d..3748e075f 100644 --- a/test/scripts/0000-Basic/0628 +++ b/test/scripts/0000-Basic/0628 @@ -66,6 +66,7 @@ killdaemon 1 cat DIR/spool/log/serverdebuglog_1 # -cp DIR/spool/log/serverdebuglog_2 DIR/bin.sys/stderr +# copy this file to stderr +cat2 DIR/spool/log/serverdebuglog_2 # no_msglog_check diff --git a/test/scripts/0000-Basic/0629 b/test/scripts/0000-Basic/0629 index a4219d038..8ca41aeae 100644 --- a/test/scripts/0000-Basic/0629 +++ b/test/scripts/0000-Basic/0629 @@ -21,6 +21,6 @@ QUIT # killdaemon # -cp DIR/spool/log/serverdebuglog_rcpt DIR/bin.sys/stderr +cat2 DIR/spool/log/serverdebuglog_rcpt # no_msglog_check diff --git a/test/scripts/0000-Basic/0630 b/test/scripts/0000-Basic/0630 index b5a7c1e8d..fff689051 100644 --- a/test/scripts/0000-Basic/0630 +++ b/test/scripts/0000-Basic/0630 @@ -25,6 +25,6 @@ QUIT # killdaemon # -cp DIR/spool/log/serverdebuglog_router DIR/bin.sys/stderr +cat2 DIR/spool/log/serverdebuglog_router # no_msglog_check diff --git a/test/scripts/0000-Basic/0631 b/test/scripts/0000-Basic/0631 index 24c8efab9..32d6dc0fc 100644 --- a/test/scripts/0000-Basic/0631 +++ b/test/scripts/0000-Basic/0631 @@ -25,6 +25,6 @@ QUIT # killdaemon # -cp DIR/spool/log/serverdebuglog_acl DIR/bin.sys/stderr +cat2 DIR/spool/log/serverdebuglog_acl # no_msglog_check |