[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cygwin failing tests/mv/mv-special-1
From: |
Eric Blake |
Subject: |
Re: cygwin failing tests/mv/mv-special-1 |
Date: |
Fri, 15 Apr 2005 06:53:41 -0600 |
User-agent: |
Mozilla Thunderbird 1.0.2 (Windows/20050317) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Paul Eggert on 4/14/2005 2:37 PM:
> Thanks for that bug report. I installed this patch: does it fix both
> your problems?
Almost - there are some further cleanups that can be made. First, we
might as well dereference symlinks (one of the CANDIDATE_TMP_DIRS could be
a cross-device symlink instead of a mount point). Second, this is
coreutils, so we have a reliable test(1) - the comment about `test -e' not
being portable is irrelavant. Third, mv-special-1 is not being careful
that the named pipe is still a named pipe on the destination.
2005-04-15 Eric Blake <address@hidden> (tiny change)
* tests/mv/mv-special-1: Use our own test(1) to check that
hierarchy was correctly moved.
* tests/mv/setup (dot_mount_point): Dereference symlinks when
learning device number.
- --
Life is short - so eat dessert first!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCX7lV84KuGfSFAYARAgJoAJ9PRrTye40nmA1oVBMLutYkrYfh7QCeJ3tb
OBGpeaxOxrfwwwOqcFeEodc=
=j0Mw
-----END PGP SIGNATURE-----
Index: tests/mv/mv-special-1
===================================================================
RCS file: /cvsroot/coreutils/coreutils/tests/mv/mv-special-1,v
retrieving revision 1.24
diff -u -p -r1.24 mv-special-1
--- tests/mv/mv-special-1 14 Apr 2005 20:35:14 -0000 1.24
+++ tests/mv/mv-special-1 15 Apr 2005 12:51:52 -0000
@@ -43,11 +43,11 @@ fi
fail=0
mv --verbose $null $dir $other_partition_tmpdir > out || fail=1
# Make sure the files are gone.
-test -f $null && fail=1
+# shell builtin test -e is not portable, so use our own
+${BUILD_SRC_DIR?}/test -e $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
+$BUILD_SRC_DIR/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
systems,
Index: tests/mv/setup
===================================================================
RCS file: /cvsroot/coreutils/coreutils/tests/mv/setup,v
retrieving revision 1.13
diff -u -p -r1.13 setup
--- tests/mv/setup 14 Apr 2005 20:35:34 -0000 1.13
+++ tests/mv/setup 15 Apr 2005 12:51:52 -0000
@@ -9,13 +9,13 @@ test "${CANDIDATE_TMP_DIRS+set}" = set \
other_partition_tmpdir=
-dot_mount_point=`stat -c %d .`
+dot_mount_point=`stat -Lc %d .`
for d in $CANDIDATE_TMP_DIRS; do
# Skip nonexistent directories.
test -d $d || continue
- d_mount_point=`stat -c %d $d`
+ d_mount_point=`stat -Lc %d $d`
# Same partition? Skip it.
test x$d_mount_point = x$dot_mount_point && continue