Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] Tests for 50126, 50136, and 50149



On one of my Mac, running macOS Monterey (11.1) on Apple M1 CPU,
E01options fails as shown below (output with ZTST_verbose=2).
The test passes on another Mac, macOS Mojave (10.14.6) with intel CPU.
Anyone using macOS please test on your Mac to see it fails or not.


Running test: regression test: multios with nullexec
ZTST_test: expecting status: 0
Input: /tmp/zsh.ztst.51589/ztst.in, output: /tmp/zsh.ztst.51589/ztst.out, error: /tmp/zsh.ztst.51589/ztst.terr
ZTST_execchunk: status 0
ZTST_test: test produced standard output:

ZTST_test: and standard error:

--- /tmp/zsh.ztst.51589/ztst.out    2022-05-02 13:24:56.000000000 +0900
+++ /tmp/zsh.ztst.51589/ztst.tout   2022-05-02 13:24:56.000000000 +0900
@@ -1 +0,0 @@
-some words
Test ./E01options.ztst failed: output differs from expected as shown above for:
  ( exec 3>&1 3>&2; print -u 3 some words )
Error output:
some words
Was testing: regression test: multios with nullexec
./E01options.ztst: test failed.


Note the two empty lines after "ZTST_test: test produced standard output:"
and "ZTST_test: and standard error:". This means at this point ztsts.{tout,terr}
are both empty.
But after the diff output, it says:
Error output:
some words
so at this point ztst.terr does have the correct data "some words"...?

If I add a "sleep 1" after ( exec ... ):

   ( exec 3>&1 3>&2; print -u 3 some words )
   sleep 1

then the test passes. But not sure whether this is a correct fix.



Messages sorted by: Reverse Date, Date, Thread, Author