diff options
| author | Thomas Deutschmann <whissi@gentoo.org> | 2017-11-06 21:32:53 -0800 |
|---|---|---|
| committer | Pádraig Brady <P@draigBrady.com> | 2017-11-06 21:34:40 -0800 |
| commit | aebefc25f9adc5c3e5376a16e61d95e364ea282c (patch) | |
| tree | d307d27632d2fc16d046ae4f9a6469a8202865fd | |
| parent | doc: fix "Up" field of realpath usage examples (diff) | |
| download | coreutils-aebefc25f9adc5c3e5376a16e61d95e364ea282c.tar.gz coreutils-aebefc25f9adc5c3e5376a16e61d95e364ea282c.zip | |
tests: avoid false failure with inaccessible mount points
* tests/ls/readdir-mountpoint-inode.sh: Skip the test
if any mount points are inaccessible by the current user.
Fixes https://bugs.gnu.org/29167
Reported at: https://bugs.gentoo.org/353164
| -rwxr-xr-x | tests/ls/readdir-mountpoint-inode.sh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/ls/readdir-mountpoint-inode.sh b/tests/ls/readdir-mountpoint-inode.sh index b4ca9e46e..5270df079 100755 --- a/tests/ls/readdir-mountpoint-inode.sh +++ b/tests/ls/readdir-mountpoint-inode.sh @@ -55,7 +55,10 @@ inode_via_readdir() esac opts=$(ls_ignore_options "$base") parent_dir=$(dirname "$mount_point") - eval "ls -i $opts '$parent_dir'" | sed 's/ .*//' + ls_out=$(eval "ls -i $opts '$parent_dir'") + test $? -eq 0 || \ + skip_ "'$parent_dir' is not readable for current user" + echo $ls_out | sed 's/ .*//' } while read dir; do |
