Pádraig Brady wrote: > On 17/09/10 11:06, Pádraig Brady wrote: >> On 17/09/10 10:34, Jim Meyering wrote: >>>> FAIL: misc/stat-mount (exit: 1) >>>> =============================== >>> ... >>>> + stat_mnt=/shared/home >>>> + test /shared = /shared/home >>>> + fail=1 >>> ... >>>> Here, the failure is that I have /home bind-mounted on /shared/home, >>>> and since I ran the test under /home, the mount location reported by >>>> df is different than the one reported by stat -c%m. This is a new >>>> test, and I'm not sure what to do about the issue (whether stat needs >>>> fixing to deal with bind mounts, or whether the test is at fault). >>> >>> If there's a reliable mechanism to determine >>> that there is a potentially interfering bind mount, >>> I'd like to skip this test. >> >> Oops, invalid test. >> I had forgotten I resolved the bind mount in that case also. >> I'll cook up a fix this evening to skip the test if the inodes match >> or something like that. > > Note `stat -c%m` was outputting the bind mount (/shared/home) in this case, > while df was just outputting the original mount point for the device. > > One could assume the difference is due to bind mounts if > the dev,inode were the same and pass in that case. > Alternatively, one could run `stat -c%m` in a loop to get > the base device mount point. However one could contrive a > situation (using bind mounts) where df is outputting > the original mount point for the device, while stat is > outputting the current different alias. > So in summary it's usually but not always valid > to compare the mount points from `df` and `stat`. > So I'll adjust the test as follows, to just > check that stat outputs something.
Thanks. This certainly won't provoke a false positive ;-)
