Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Bug in C02cont.ztst's -N test



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



Messages sorted by: Reverse Date, Date, Thread, Author