Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug in C02cont.ztst's -N test
- X-seq: zsh-workers 38372
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: Matthew Martin <phy1729@xxxxxxxxx>
- Subject: Re: Bug in C02cont.ztst's -N test
- Date: Sat, 30 Apr 2016 01:28:28 +0000
- Cc: zsh-workers@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=	daniel.shahaf.name; h=cc:content-transfer-encoding:content-type	:date:from:in-reply-to:message-id:mime-version:references	:subject:to:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=tPS58krrHdlo/Knk	KvVV8+tK7Ho=; b=PlzXbgi+cWey/5m+pc+53nocFuDTLof/lap0nLH3+lWqt1Ak	uQ8+L20EsDrNR5QrvDtm9fCwpsyA/l7pcB+cuZt1yu7LLn31MuK28/b+PAhJVJAf	GvmKS5PO1v5Uw02GZdOVrUUD3Elchknlysxzd446Mnz/O+K9NibLtrtnyhs=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=	messagingengine.com; h=cc:content-transfer-encoding:content-type	:date:from:in-reply-to:message-id:mime-version:references	:subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=tPS58krrHdlo/Kn	kKvVV8+tK7Ho=; b=U/2SKMS83XVwGZWV5Hy5BcSSVfYeZkZNul/NvgiYq3pKPh/	Ddgs1UduLbaorMAxUG+QSB4JQIkZk1tToAofE1xNlWhy/ip/53sodslCgPC7oL/O	a3D97bpHKULkLC1ybvpdticlK+nxtWfgpBlVuC2BPfijeXcPurlpbHRsNKQE=
- In-reply-to: <20160430010131.GA34472@CptOrmolo.darkstar>
- 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>
Matthew Martin wrote on Fri, Apr 29, 2016 at 20:01:31 -0500:
> @@ -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.)
Couldn't we sleep less, e.g., with the following? —
    elif ! () {
             repeat 58 {
               sleep 1
               if [[ $unmodified_ls != "$(ls -lu $unmodified)" ]]; then return 0; fi
             }
             return 1
           }; then
      ZTST_skip="…"
I assume we don't need to bother with fancy exponential (doubling)
backoffs in this context...
Cheers,
Daniel
Messages sorted by:
Reverse Date,
Date,
Thread,
Author