about summary refs log tree commit diff
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
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
-rw-r--r--ChangeLog3
-rw-r--r--Test/C02cond.ztst2
2 files changed, 4 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 893b4fa8a..9fde9c7ff 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2015-12-31  Oliver Kiddle  <opk@zsh.org>
 
+	* 37453 (with Bart, started by Baptiste Daroussin, 37315)
+	Test/C02cond.ztst: try to improve detection of noatime filesystem
+
 	* users/21114: Completion/Unix/Command/_dig: new completion
 
 2015-12-30  Barton E. Schaefer  <schaefer@zsh.org>
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 ]]