Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug in C02cont.ztst's -N test
- X-seq: zsh-workers 38375
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: Bug in C02cont.ztst's -N test
- Date: Sat, 30 Apr 2016 11:11:31 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=RVqUggM+6iiXMqv09PRMDHI6ttAVnPQh6XV1ffXGNAs=; b=vGVin/NgU3ELkpF8KcP0OjYbPbOx+lKtL8WstV7qbXuTeq7MWvSg4Q0l80+ohzKAIq Vtn95wfbYTdBonmQKfWVvNBnlvV45hdIwq7zYWQ9ERpmUtOSXE8o21QthmmQyYFQ1zNy ef+B8KGBppc3/zPN4basePJ32rsSiMsqNUERRpzBnygIoM2/DqhHmLDbK2j6uAETl9gC LpDJVb31TsyTgn9FEANRmbQ7nsub0AxFEYfWMsFn/Mx1jthXVRXzLS9z5OOoNa0uQ+Dj kcHhormv7e5DuYk1Uk3PjBy6L8WEZ0SILX5+LXagduCfIXimfTucvinGqLVRHkpy2Uyd iYpg==
- In-reply-to: <160430105547.ZM10892@torch.brasslantern.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <ufa1t5pl0yg.fsf@epithumia.math.uh.edu> <160429131027.ZM22749@torch.brasslantern.com> <ufashy4ghvy.fsf@epithumia.math.uh.edu> <20160430004639.GA1360@tarsus.local2> <20160430010131.GA34472@CptOrmolo.darkstar> <20160430012828.GA3334@tarsus.local2> <CAH+w=7b9kKY1Xr5YHFHMS4YzSptJWwU_N6p+s3R=Q=QjYYSo3w@mail.gmail.com> <160430105547.ZM10892@torch.brasslantern.com>
On Apr 30, 10:55am, Bart Schaefer wrote:
}
} waiting one minute between creating and accessing the file, not just
} between the runs of "ls".
I wrote that and I then I forgot to actually move the "cat".
Replacement patch:
diff --git a/Test/C02cond.ztst b/Test/C02cond.ztst
index f9fc185..d7a40ce 100644
--- a/Test/C02cond.ztst
+++ b/Test/C02cond.ztst
@@ -146,17 +146,28 @@
# can't be bothered with -S
- print -u $ZTST_fd 'This test takes two seconds...'
- sleep 2
- cat $unmodified
- touch $newnewnew
+ if [[ ${mtab::="$({mount || /sbin/mount})"} = *[(]?*[)] ]]; then
+ print -u $ZTST_fd 'This test takes two seconds...'
+ else
+ unmodified_ls="$(ls -lu $unmodified)"
+ print -u $ZTST_fd 'This test takes up to 60 seconds...'
+ fi
if [[ $OSTYPE == "cygwin" ]]; then
ZTST_skip="[[ -N file ]] not supported on Cygwin"
elif (( isnfs )); then
ZTST_skip="[[ -N file ]] not supported with NFS"
- elif { df -k -- ${$({mount || /sbin/mount} | awk '/noatime/ {print $1,$3}'):-""} | tr -s ' ' | fgrep -- "$(df -k . | tail -1 | tr -s ' ')" } >&/dev/null; then
+ elif { (( ! $+unmodified_ls )) &&
+ { sleep 2; cat $unmodified } &&
+ { df -k -- ${$(print -r -- "$mtab" |
+ awk '/noatime/ {print $1,$3}'):-""} | tr -s ' ' |
+ fgrep -- "$(df -k . | tail -1 | tr -s ' ')" } >&/dev/null } ||
+ { (( $+unmodified_ls )) &&
+ ! repeat 30; do ZTST_hashmark; sleep 2; cat $unmodified
+ [[ $unmodified_ls != "$(ls -lu $unmodified)" ]] && break
+ done }; then
ZTST_skip="[[ -N file ]] not supported with noatime file system"
else
+ touch $newnewnew
[[ -N $newnewnew && ! -N $unmodified ]]
fi
0:-N cond
Messages sorted by:
Reverse Date,
Date,
Thread,
Author