[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cygwin failing tests/mv/mv-special-1

From: Paul Eggert
Subject: Re: cygwin failing tests/mv/mv-special-1
Date: Tue, 19 Apr 2005 00:29:15 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux)

address@hidden (Eric Blake) writes:

> why not use ${BUILD_SRC_DIR?}/test instead of the shell builtin
> test, so that you are guaranteed to have a working `test -e'?

If this turns into a widespread problem (i.e., widespread to other
platforms) that might be worth the hassle of adding the extra
coupling, but for now I'd rather just skip the problematic tests.

> Weird - the directory has more permissions than I specified,
> including write permissions; and which permissions are displayed by
> ls changes seemingly at random.

It sounds like this goes beyond what coreutils can work around.

> On a side note, I take it that
> :ext:address@hidden:/cvsroot/coreutils is not the master
> coreutils repository, because it often takes up to 48 hours to see
> your patches.

Yes, that's right; it's synced from the development CVS tree, which is
not publicly-accessible.

> Is there another public-accessible repository with less delay?

Sorry, no.

> However, now the mv-special-1 test is a false positive on cygwin (at least
> until the cygwin maintainers fix their buggy rename(2) that currently
> converts fifos into regular files, even while preserving the inode if the
> rename did not cross devices, as shown below).  So mv/mv-special-1
> should probably also add a check that mv-null is still a fifo in its new
> home.

Thanks for reporting that; I installed the following patch to try to fix this.

2005-04-19  Paul Eggert  <address@hidden>

        * tests/mv/mv-special-1: Use test -p to test for fifos, rather
        than the (incorrect) test -f and the (inadequate) ls.  ls is
        inadequate because on some hosts a buggy mv will create a file of
        the wrong type (problem reported by Eric Blake).  Skip this test
        if test -p doesn't work.

--- mv-special-1        14 Apr 2005 20:35:14 -0000      1.24
+++ mv-special-1        19 Apr 2005 07:26:18 -0000      1.25
@@ -27,6 +27,7 @@ mkdir $tmp || framework_failure=1
 cd $tmp || framework_failure=1
 rm -f $null || framework_failure=1
 mknod $null p || framework_failure=1
+test -p $null || framework_failure=1
 mkdir -p $dir/a/b/c $dir/d/e/f || framework_failure=1
 touch $dir/a/b/c/file1 $dir/d/e/f/file2 || framework_failure=1
@@ -43,11 +44,10 @@ fi
 mv --verbose $null $dir $other_partition_tmpdir > out || fail=1
 # Make sure the files are gone.
-test -f $null && fail=1
+test -p $null && fail=1
 test -d $dir && fail=1
 # Make sure they were moved.
-# Since `test -e' is not portable, use `ls'.
-ls $other_partition_tmpdir/$null > /dev/null || fail=1
+test -p $other_partition_tmpdir/$null || fail=1
 test -d $other_partition_tmpdir/$dir/a/b/c || fail=1
 # POSIX says rename (A, B) can succeed if A and B are on different file 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]