From: Frank Terbeck <ft@bewatermyfriend.org>
To: zsh-workers@zsh.org
Subject: Re: $pipestatus broken?
Date: Fri, 23 Dec 2011 11:49:22 +0100 [thread overview]
Message-ID: <877h1nwojx.fsf@ft.bewatermyfriend.org> (raw)
In-Reply-To: <111210065833.ZM6198@torch.brasslantern.com> (Bart Schaefer's message of "Sat, 10 Dec 2011 06:58:33 -0800")
Bart Schaefer wrote:
[...]
> With that loop, I get a single "1" 100% of the time unless I attach to
> the process with GDB, in which case it becomes random.
It's correct that this should output "0 0", though, right? With the right
hand side of the pipe being a loop, the last return code of the loop is
return code of the loop, correct?
If that's correct, the following adds a new test, that checks if the
problem happens on a given system (actually, if the problem appears at
least once in 2048 test runs - which has been triggered every time on my
test system so far). I didn't see anything about tests that are *expected*
to fail in `B01cd.ztst', so this makes the test suite fail at least once.
Therefore, I don't know if adding this is a good idea or not.
Regards, Frank
diff --git a/Test/A04redirect.ztst b/Test/A04redirect.ztst
index 3911b06..d349f33 100644
--- a/Test/A04redirect.ztst
+++ b/Test/A04redirect.ztst
@@ -441,3 +441,13 @@
0:failed assignment on non-posix-special, POSIX_BUILTINS
>output
?zsh: read-only variable: foo
+
+ repeat 2048; do (: | while read a; do
+ :
+ done;
+ print "${pipestatus[@]}")
+ done | sort -u
+0:Check whether `$pipestatus[]' behaves.
+>0 0
+F:This test checks for a bug in `$pipestatus[]' handling. If it breaks then
+F:the bug is still there or it reappeared. See workers-29973 for details.
next prev parent reply other threads:[~2011-12-23 14:55 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-10 12:24 Frank Terbeck
2011-12-10 12:48 ` Frank Terbeck
2011-12-10 14:58 ` Bart Schaefer
2011-12-11 14:37 ` Frank Terbeck
2011-12-23 10:49 ` Frank Terbeck [this message]
2011-12-23 21:31 ` Bart Schaefer
2011-12-23 22:11 ` Frank Terbeck
2011-12-24 9:32 ` Bart Schaefer
2011-12-24 9:59 ` Frank Terbeck
2011-12-24 18:23 ` Bart Schaefer
2011-12-24 18:46 ` Bart Schaefer
2011-12-24 17:37 ` Bart Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877h1nwojx.fsf@ft.bewatermyfriend.org \
--to=ft@bewatermyfriend.org \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).