From d8cadda3b9b656870d54fe89dc94e72ecd496013 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 5 Dec 2009 17:41:28 +0100 Subject: tests: readdir-mountpoint-inode avoid false-positive w/virtualbox * tests/ls/readdir-mountpoint-inode: With some systems, stat can succeed on a mount point and report that the inode number is 0. Since ls displays "?" for those, that would otherwise show up as a difference. Skip such mount points. Reported by Sergei Steshenko in http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/19142 --- tests/ls/readdir-mountpoint-inode | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/ls/readdir-mountpoint-inode b/tests/ls/readdir-mountpoint-inode index c0214732a..979b579b0 100755 --- a/tests/ls/readdir-mountpoint-inode +++ b/tests/ls/readdir-mountpoint-inode @@ -65,6 +65,8 @@ inode_via_readdir() for dir in $mount_points; do readdir_inode=$(inode_via_readdir $dir) stat_inode=$(env stat --format=%i $dir) + # If stat fails or says the inode is 0, skip $dir. + case $stat_inode in 0|'') continue;; esac test "$readdir_inode" = "$stat_inode" || fail=1 done -- cgit v1.2.3-54-g00ecf