mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
tests: stat-vs-dirent.sh: avoid a false failure
* tests/ls/stat-vs-dirent.sh: Skip the test if we can't stat(1), as the file may have been removed, or have a malformed name due to '\n' etc. in the file name.
This commit is contained in:
1 parent
ac4841298e
commit
0cfb60e90d
1 file changed
+2
-1
@@ -32,7 +32,8 @@ while :; do
|
||||
file=$(sed -n '1s/^ *[0-9][0-9]* //p;q' tmp)
|
||||
|
||||
# Get its inode number (stat.st_ino) via stat(1)'s call to lstat.
|
||||
st_ino=$(stat --format=%i "$t/$file")
|
||||
st_ino=$(stat --format=%i "$t/$file") ||
|
||||
skip_ "error stating: $t/$file" # removed or newlines in name etc.
|
||||
|
||||
# Make sure that they are the same.
|
||||
# We know from experience that there may be mismatches on some
|
||||
|
||||
Reference in new issue
Block a user