bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#29167: Acknowledgement (tests/ls/readdir-mountpoint-inode.sh is unst


From: Thomas Deutschmann
Subject: bug#29167: Acknowledgement (tests/ls/readdir-mountpoint-inode.sh is unstable and should require root privileges)
Date: Mon, 6 Nov 2017 13:06:37 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:21.0) Gecko/20100101 Thunderbird/52.4.0

Hi,

here's a better fix (from Sebastian Kühn via
https://bugs.gentoo.org/353164):

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


-- 
Regards,
Thomas Deutschmann / Gentoo Linux Developer
C4DD 695F A713 8F24 2AA1 5638 5849 7EE5 1D5D 74A5





reply via email to

[Prev in Thread] Current Thread [Next in Thread]