zsh-workers
 help / color / mirror / code / Atom feed
* Bug in C02cont.ztst's -N test
@ 2016-04-29  0:20 Jason L Tibbitts III
  2016-04-29 20:10 ` Bart Schaefer
  0 siblings, 1 reply; 18+ messages in thread
From: Jason L Tibbitts III @ 2016-04-29  0:20 UTC (permalink / raw)
  To: zsh-workers

C02cont.ztst has a test for -N which tries to disable itself if the
filesystem is mounted with noatime:

  if [[ $OSTYPE == "cygwin" ]]; then
    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
    ZTST_skip="[[ -N file ]] not supported with noatime file system"
  else
    [[ -N $newnewnew && ! -N $unmodified ]]
  fi

When building zsh in a chroot created by the "mock" tool (used in Fedora
and derivatives to build packages in a clean chroot) it's possible for
"df ." to give the following:

Filesystem     1K-blocks      Used Available Use% Mounted on
-              492127564 331926080 135179772  72% /

And, of course, "grep - /etc/mtab" errors out.

I guess the shortest solution is to add "--" in there, but that isn't
going to help the test do what it's supposed to do.

 - J<


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2016-05-10  3:32 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-29  0:20 Bug in C02cont.ztst's -N test Jason L Tibbitts III
2016-04-29 20:10 ` Bart Schaefer
2016-04-29 20:29   ` Jason L Tibbitts III
2016-04-29 20:31   ` Jason L Tibbitts III
2016-04-30  0:03     ` Bart Schaefer
2016-04-29 22:38   ` Jason L Tibbitts III
2016-04-30  0:46     ` Daniel Shahaf
2016-04-30  1:01       ` Matthew Martin
2016-04-30  1:28         ` Daniel Shahaf
2016-04-30  3:51           ` Bart Schaefer
2016-04-30 17:55             ` Bart Schaefer
2016-04-30 18:11               ` Bart Schaefer
2016-05-01  1:48                 ` Daniel Shahaf
2016-05-01  4:42                   ` Bart Schaefer
2016-05-09 13:42                 ` Jun T.
2016-05-09 16:21                   ` Bart Schaefer
2016-05-09 17:32                     ` Jun T.
2016-05-10  3:33                       ` Bart Schaefer

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