Testsuite: add command cat2
authorJeremy Harris <jgh146exb@wizmail.org>
Fri, 8 Sep 2023 08:59:52 +0000 (09:59 +0100)
committerJeremy Harris <jgh146exb@wizmail.org>
Fri, 8 Sep 2023 08:59:52 +0000 (09:59 +0100)
The /dev/stderr trick manages to fail on Gnu HURD

test/Makefile.in
test/runtest
test/scripts/0000-Basic/0628
test/scripts/0000-Basic/0629
test/scripts/0000-Basic/0630
test/scripts/0000-Basic/0631

index 4c09ce3185a98f230e8e563509d48e78e866ccbc..f7a2a4695b68df277dd446a5c9badba5ba5a2a22 100644 (file)
@@ -30,7 +30,6 @@ binaries:     $(BINARIES)
 sysbinaries:   FORCE binaries
                rm -f bin.sys/*
                bin/locate initdb postgres pg_ctl psql mysqld mysql
 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:
                ls -la bin.sys
 
 # Compile and link the programs:
index 1730a9889328c25acbebb4921b61a289b2bee1d0..edaec6b2525565397dd4e776c3540de5916828aa 100755 (executable)
@@ -2639,6 +2639,12 @@ if (/^(ln|ls|du|mkdir|mkfifo|touch|cp|cat)\s/ ||
   run_system("$_ >>test-stdout 2>>test-stderr");
   return 1;
   }
   run_system("$_ >>test-stdout 2>>test-stderr");
   return 1;
   }
+if (/^cat2\s/)
+  {
+  s/^cat2/cat/;
+  run_system("$_ 2>&1 >test-stderr");
+  return 1;
+  }
 
 
 
 
 
 
index cb8cdd76d1d3b48156e2213b223266e8aa477781..3748e075fad0e5f9deeef57bdde7182ac01f2db5 100644 (file)
@@ -66,6 +66,7 @@ killdaemon
 1
 cat DIR/spool/log/serverdebuglog_1
 #
 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
 #
 no_msglog_check
index a4219d03834edd2e35505fd7d1773b6ab51ab96c..8ca41aeae878a5e6a19cea7f6047e4fd0f5e7713 100644 (file)
@@ -21,6 +21,6 @@ QUIT
 #
 killdaemon
 #
 #
 killdaemon
 #
-cp DIR/spool/log/serverdebuglog_rcpt DIR/bin.sys/stderr
+cat2 DIR/spool/log/serverdebuglog_rcpt
 #
 no_msglog_check
 #
 no_msglog_check
index b5a7c1e8dc94a50752be457ca495cb8bfd578e75..fff6890512fb89d49c0a2067b11a717b5b61d4cd 100644 (file)
@@ -25,6 +25,6 @@ QUIT
 #
 killdaemon
 #
 #
 killdaemon
 #
-cp DIR/spool/log/serverdebuglog_router DIR/bin.sys/stderr
+cat2 DIR/spool/log/serverdebuglog_router
 #
 no_msglog_check
 #
 no_msglog_check
index 24c8efab99c949d58f4196f0b8125f16928a1e13..32d6dc0fc2bd17d5d2b96a139cce77078b9088b7 100644 (file)
@@ -25,6 +25,6 @@ QUIT
 #
 killdaemon
 #
 #
 killdaemon
 #
-cp DIR/spool/log/serverdebuglog_acl DIR/bin.sys/stderr
+cat2 DIR/spool/log/serverdebuglog_acl
 #
 no_msglog_check
 #
 no_msglog_check