zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: stop [[ -N file ]] test failing under NFS
@ 2006-12-19 11:41 Peter Stephenson
  0 siblings, 0 replies; only message in thread
From: Peter Stephenson @ 2006-12-19 11:41 UTC (permalink / raw)
  To: Zsh hackers list

This is to prevent the perennial error in the test suite when using [[
-N file ]] under NFS because it doesn't store modification time and
access time separately.  The "-fstype nfs" test of find is widely enough
supported that we can use that (I've written it so we're no worse off if
it doesn't work).

Probably something similar would work on HFS+, but as is widely known we
don't have a Mac OS X expert.

Index: Test/C02cond.ztst
===================================================================
RCS file: /cvsroot/zsh/zsh/Test/C02cond.ztst,v
retrieving revision 1.15
diff -u -r1.15 C02cond.ztst
--- Test/C02cond.ztst	2 Feb 2005 17:03:51 -0000	1.15
+++ Test/C02cond.ztst	19 Dec 2006 11:27:44 -0000
@@ -131,6 +131,9 @@
   if [[ $OSTYPE == "cygwin" ]]; then
     print -u8 "Warning: not testing [[ -N file ]] (not supported on Cygwin)"
     true
+  elif [[ "$(find . -prune -fstype nfs 2>/dev/null)" == "." ]]; then
+    print -u8 "Warning: not testing [[ -N file ]] (not supported with NFS)"
+    true
   else
     [[ -N newnewnew && ! -N unmodified ]]
   fi

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


To access the latest news from CSR copy this link into a web browser:  http://www.csr.com/email_sig.php


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-12-19 11:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-19 11:41 PATCH: stop [[ -N file ]] test failing under NFS Peter Stephenson

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