about summary refs log tree commit diff
path: root/Test
diff options
context:
space:
mode:
authorOliver Kiddle <opk@zsh.org>2015-12-31 12:53:13 +0100
committerOliver Kiddle <opk@zsh.org>2015-12-31 12:53:13 +0100
commit4f5d7b7b378e6fe93de19a600717deaab7a76116 (patch)
treea2c9910927a93e91fce498d9f2dd5f9a49640b67 /Test
parent3ca4ffa972bc7ef76ba3a2da43e0f338f291ae90 (diff)
downloadzsh-4f5d7b7b378e6fe93de19a600717deaab7a76116.tar.gz
zsh-4f5d7b7b378e6fe93de19a600717deaab7a76116.tar.xz
zsh-4f5d7b7b378e6fe93de19a600717deaab7a76116.zip
37453 (with Bart, started by Baptiste Daroussin, 37315): try to improve detection of noatime filesystem
Diffstat (limited to 'Test')
-rw-r--r--Test/C02cond.ztst2
1 files changed, 1 insertions, 1 deletions
diff --git a/Test/C02cond.ztst b/Test/C02cond.ztst
index 9e1369689..0b4608a21 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 test -f /etc/mtab && { grep $(df . 2>/dev/null| tail -n1 | awk '{print $1}') /etc/mtab | grep -q noatime; }; 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 ]]