zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: zsh-workers@zsh.org
Subject: Re: [PATCH] portable mechanism to determine noatime
Date: Wed, 30 Dec 2015 18:49:05 +0100	[thread overview]
Message-ID: <19179.1451497745@thecus.kiddle.eu> (raw)
In-Reply-To: <26916.1449972782@thecus.kiddle.eu>

On 13 Dec, I wrote:
> df is adjusting the
> column widths according to maximum lengths of fields. That ends up
> varying between the one fs run and the multple fs run of df. That can be
> solved by piping to tr -s ' ' or wrapping it in ${=...}.

So is there any advance on the patch below or shall I commit it in
this form?

Oliver

diff --git a/Test/C02cond.ztst b/Test/C02cond.ztst
index 9e13696..0b4608a 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 ]]


  parent reply	other threads:[~2015-12-30 17:55 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-04 23:22 Baptiste Daroussin
2015-12-05  5:15 ` Eric Cook
2015-12-05 18:17   ` Eric Cook
2015-12-05 20:00     ` Matthew Martin
2015-12-06  1:25       ` Oliver Kiddle
2015-12-10  8:48         ` Bart Schaefer
2015-12-10  8:55           ` Bart Schaefer
2015-12-11  4:21             ` Oliver Kiddle
2015-12-12  6:49               ` Bart Schaefer
2015-12-13  2:13                 ` Oliver Kiddle
2015-12-13 16:22                   ` Bart Schaefer
2015-12-18  2:45                     ` Oliver Kiddle
2015-12-18  4:40                       ` Bart Schaefer
2015-12-30 17:49                   ` Oliver Kiddle [this message]
2015-12-30 22:43                     ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19179.1451497745@thecus.kiddle.eu \
    --to=okiddle@yahoo.co.uk \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).