Subject: Re: Bug in C02cont.ztst's -N test
From: Bart Schaefer <[email-masked]>
To: [email-masked]
Date: Fri, 29 Apr 2016 13:10:27 -0700
List-Id: Zsh Workers List <zsh-workers.zsh.org>

On Apr 28,  7:20pm, Jason L Tibbitts III wrote:
} Subject: Bug in C02cont.ztst's -N test
}
} When building zsh in a chroot created by the "mock" tool (used in Fedora
} and derivatives to build packages in a clean chroot)

This test has been changed as of 2015/12/31 so the newer test should be
in zsh-5.2.  What version are you attempting to build?

The new test is

  elif { df -k -- ${$({mount || /sbin/mount} | awk '/noatime/ {print $1,$3}'):-""} | tr -s ' ' | fgrep "$(df -k . | tail -1 | tr -s ' ')" } >&/dev/null; then
    ZTST_skip="[[ -N file ]] not supported with noatime file system"

(that whole "elif ...; then" is one long line containing "" in case it
gets wrapped or misjoined by email clients.  However I guess a line of
output from df that begins with a hyphen would still break that.

diff --git a/Test/C02cond.ztst b/Test/C02cond.ztst
index 88cad0d..f9fc185 100644
--- a/Test/C02cond.ztst
+++ b/Test/C02cond.ztst
@@ -154,7 +154,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 { df -k -- ${$({mount || /sbin/mount} | awk '/noatime/ {print $1,$3}'):-""} | tr -s ' ' | fgrep -- "$(df -k . | tail -1 | tr -s ' ')" } >&/dev/null; then
     ZTST_skip="[[ -N file ]] not supported with noatime file system"
   else
     [[ -N $newnewnew && ! -N $unmodified ]]