bug-coreutils
[Top][All Lists]
Advanced

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

cygwin failing tests/mv/mv-special-1


From: Eric Blake
Subject: cygwin failing tests/mv/mv-special-1
Date: Thu, 14 Apr 2005 15:25:35 +0000

On cygwin, tests/mv/mv-special-1 is failing because it makes invalid 
assumptions.  First, tests/mv/setup is comparing mount points to determine if a 
directory is on a different device, but this is not very robust.  It is 
possible to mount a device to more than one location, and in fact, my machine 
had both / and /cygdrive/c on subdirectories of the same C:\ drive, such that 
/src/coreutils/tests/mv and /cygdrive/c/TEMP have different mount points but 
are on the same device.  The attached patch looks at stat's devno report 
instead, and with the patch and judicious use of CANDIDATE_TMP_DIRS, I can 
re-run mv-special-1 to copy to an NFS-mounted /cygdrive/u on a different 
machine.

Second, POSIX states that rename(2) only has to fail with EXDEV if the 
implementation cannot support cross-device renames.  Windows, amazingly enough, 
can copy regular files (but not directories or special files) between drive 
letters, so rename can succeed in cygwin even when it is cross-device.  
Therefore, the --verbose output is different, because mv(1) did not have to 
remove the regular files since rename succeeded.  The fact that rename 
succeeded on mv-null appears to be a cygwin bug, because it converted the pipe 
into a regular file.  But the fact that the test suite expects a line 
mentioning removal of the regular files is probably a test suite bug, and I'm 
not sure how to work around it.  The attached log shows the failure after my 
patch.

2005-04-14  Eric Blake  <address@hidden>  (tiny change)

        * tests/mv/setup: Check devno, not mount point, when finding other
        partition.
        * tests/mv/mv-special-1: Output difference on test failure.

Attachment: coreutils.log
Description: Binary data

Attachment: coreutils.patch
Description: Binary data


reply via email to

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