Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Id: Zsh Workers List <zsh-workers.zsh.org>
List-Post: <mailto:zsh-workers@zsh.org>
List-Help: <mailto:zsh-workers-help@zsh.org>
X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham
	autolearn_force=no version=3.4.1
Date: Sat, 30 Apr 2016 00:46:39 +0000
From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: Jason L Tibbitts III <tibbs@math.uh.edu>
Cc: zsh-workers@zsh.org
Subject: Re: Bug in C02cont.ztst's -N test
Message-ID: <20160430004639.GA1360@tarsus.local2>
References: <ufa1t5pl0yg.fsf@epithumia.math.uh.edu>
 <160429131027.ZM22749@torch.brasslantern.com>
 <ufashy4ghvy.fsf@epithumia.math.uh.edu>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
In-Reply-To: <ufashy4ghvy.fsf@epithumia.math.uh.edu>
User-Agent: Mutt/1.5.23 (2014-03-12)
X-Seq: zsh-workers 38363

Jason L Tibbitts III wrote on Fri, Apr 29, 2016 at 17:38:41 -0500:
> In this case I was building on a filesystem mounted with noatime
>(because I forgot how I configured something), but the test simply has
>no way to tell as it it doesn't appear possible to get the mount
>options from within the chroot.

I suppose the test could just do away with the df/mtab parsing and
simply do:

    touch foo
    sleep 2
    cat foo
    if (( $(zstat +atime foo) > $(zstat +mtime foo) )); then
      [[ ! -N foo ]]
    else
      ZTST_skip="cwd appears to be mounted noatime"
    fi

Bonus points if there's a way to write the condition portably without
relying on _other_ zsh functionality...

