summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2010-09-20 15:07:02 +0100
committerPádraig Brady <P@draigBrady.com>2010-09-20 15:07:02 +0100
commitf57cb371fa0a940f41163a27bf2d460c1a4d2d35 (patch)
treef197dc2f5fe73945e8469ffc915d1b9b7e299272 /tests
parent0a238bcb8720b6b29cc331928be12642525b8df5 (diff)
downloadcoreutils-f57cb371fa0a940f41163a27bf2d460c1a4d2d35.tar.xz
tests: fix an erroneous stat failure with bind mounts
* tests/misc/stat-mount: Don't try to correlate the mount points output by df and stat, as they're similar, but sometimes different in the presence of bind mounts. * doc/coretuils.texi (stat invocation): Clarify the bind mount difference between stat and df.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/misc/stat-mount10
1 files changed, 2 insertions, 8 deletions
diff --git a/tests/misc/stat-mount b/tests/misc/stat-mount
index c1c43d49c..a99291f6d 100755
--- a/tests/misc/stat-mount
+++ b/tests/misc/stat-mount
@@ -18,14 +18,8 @@
. "${srcdir=.}/init.sh"; path_prepend_ ../src
-# Note we assume that the current directory is not bind mounted
-# (as then, stat and df may have different results).
-# This should be the case given the directory is temporary
-# for the duration of the test.
-
df_mnt=$(df -P . | sed -n '2s/.* \([^ ]*$\)/\1/p')
-stat_mnt=$(stat -c%m .)
-
-test "$df_mnt" = "$stat_mnt" || fail=1
+stat_mnt=$(stat -c%m .) || fail=1
+test "$stat_mnt" || fail=1
Exit $fail