Subject: Re: Bug in C02cont.ztst's -N test
From: Daniel Shahaf <[email-masked]>
To: Jason L Tibbitts III <[email-masked]>
Cc: [email-masked]
Date: Sat, 30 Apr 2016 00:46:39 +0000
List-Id: Zsh Workers List <zsh-workers.zsh.org>

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...