Boost logo

Boost :

From: Jeremy Maitin-Shepard (jbms_at_[hidden])
Date: 2003-12-02 22:59:12

Beman Dawes <bdawes_at_[hidden]> writes:


> If you put something together, I can test it here. A little command line program
> that takes two paths, and returns "same" or "different" would be easy
> to test.

The source to a test program is attached.

> Incidentally, I'm not worried about older versions of Windows. Win 2K and Win XP
> are the most serious concerns.

> I'm also concerned about POSIX corner cases. I'm not sure what they may be, but
> mounted filesystems, samba, etc, might be starting places to test.

On Linux, testing using stat reveals that bind mounted filesystems are
not a problem (files on a bind-mounted filesystem are equivalent to the
corresponding file on the non-bind-mounted filesystem). I believe that
NFS shares will not be a problem as far as hard links. The same remote
file/directory accessed through two different NFS mounts has a
different device id depending on the mount, and therefore does not show
as equivalent. This behavior does not seem unreasonable. Samba shares
have the same issue with device ids, and also there is the issue that
DOS 8.3 paths do not show as equivalent to the long-name path.

On Windows, "substitution" mounts do not pose a problem for testing
using the GetFileInformationByHandle. Neither do DOS 8.3 file names.
(i.e. a DOS 8.3 path compares equivalent to the full-length path) DOS
8.3 paths do not appear to be equivalent to the full-length path on
network shares. These tests were performed on a FAT32 filesystem on a
computer with the Windows ME operating system. Presumably, this
platform is one of the more limited ones, but it would certainly be
better to have more complete test data from someone with more Windows
operating system machines available.

You can test any additional cases about which you are concerned.

Jeremy Maitin-Shepard

Boost list run by bdawes at, gregod at, cpdaniel at, john at