Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug in C02cont.ztst's -N test
- X-seq: zsh-workers 38370
- From: Matthew Martin <phy1729@xxxxxxxxx>
- To: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- Subject: Re: Bug in C02cont.ztst's -N test
- Date: Fri, 29 Apr 2016 20:01:31 -0500
- Cc: zsh-workers@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=miIep2ICYO0zAYqU5RtATqOcB2UHH+2r7AEDLNTpqGE=; b=CRPzWbb1uV4X1ZOsnPQbP3HlmTHkC9kug4MVpJDrsz2xYF667Y0URe6XBhoB+5UPsB 0DRdTqBpoe+oTyAVTNemSNiTsY1bjFidNhR4TPh1FIFjpieERnyqS0PVm6g2nmOdCj0r uMxW/1lI9l6u4JrBW/34i2ajlZ3VG7SSJTLS5lVeno6mVta8pj3aB2xbtuHIgWA+i/ds aU6rnEED8QcI2eUpZrX0AVAsjRDUOocf8NFf043a/d9WoL1ICLtxlfP+0gffx9A3f3Ni QY6aGiNS5Cmd7ERxUjwAytNQdvTJQxY8e3qIiwBAorEUEn+Nz3a4l4NDPkDcuWyRchu/ 0C6Q==
- In-reply-to: <20160430004639.GA1360@tarsus.local2>
- 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>
On Sat, Apr 30, 2016 at 12:46:39AM +0000, Daniel Shahaf wrote:
> Bonus points if there's a way to write the condition portably without
> relying on _other_ zsh functionality...
That was discussed on IRC last night.
diff --git a/Test/C02cond.ztst b/Test/C02cond.ztst
index 88cad0d..8343fe2 100644
--- a/Test/C02cond.ztst
+++ b/Test/C02cond.ztst
@@ -23,6 +23,7 @@
zlnfs=${filetmpprefix}zlnfs
touch $unmodified
+ unmodified_ls="$(ls -lu $unmodified)"
touch zerolength
chgrp $EGID zerolength
@@ -154,7 +155,7 @@
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 sleep 58; [[ $unmodified_ls == "$(ls -lu $unmodified)" ]]; then
ZTST_skip="[[ -N file ]] not supported with noatime file system"
else
[[ -N $newnewnew && ! -N $unmodified ]]
but who wants to sleep for 60 seconds? (There's a sleep 2 earlier.)
- Matthew Martin
Messages sorted by:
Reverse Date,
Date,
Thread,
Author