From: Jim Meyering Date: Sat, 5 Dec 2009 16:41:28 +0000 (+0100) Subject: tests: readdir-mountpoint-inode avoid false-positive w/virtualbox X-Git-Tag: v8.2~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d8cadda3b9b656870d54fe89dc94e72ecd496013;p=thirdparty%2Fcoreutils.git 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 --- diff --git a/tests/ls/readdir-mountpoint-inode b/tests/ls/readdir-mountpoint-inode index c0214732af..979b579b00 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