mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2025-09-10 07:59:52 +02:00
tests: ls: don't always skip a capability test
* tests/ls/no-cap.sh: Move to being a root only test, since commit v9.5-132-g2a6bed933 we now need to call setcap to make the test effective. Otherwise we would have always just skipped the test.
This commit is contained in:
@@ -19,13 +19,17 @@
|
||||
. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
|
||||
print_ver_ ls
|
||||
require_strace_ capget
|
||||
require_root_
|
||||
|
||||
touch file || framework_failure_
|
||||
|
||||
setcap 'cap_net_bind_service=ep' file ||
|
||||
skip_ "setcap doesn't work"
|
||||
|
||||
LS_COLORS=ca=1; export LS_COLORS
|
||||
strace -e capget ls --color=always > /dev/null 2> out || fail=1
|
||||
$EGREP 'capget\(' out || skip_ "your ls doesn't call capget"
|
||||
|
||||
rm -f out
|
||||
|
||||
LS_COLORS=ca=:; export LS_COLORS
|
||||
strace -e capget ls --color=always > /dev/null 2> out || fail=1
|
||||
$EGREP 'capget\(' out && fail=1
|
||||
|
||||
Reference in New Issue
Block a user