mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-04-12 06:57:33 +02:00
Run this command to remove the factored-out "fail=0" lines. perl -ni -e '/^fail=0$/ or print' $(g grep -l '^fail=0$') * tests/test-lib.sh: Initialize fail=0 here, not in 300+ scripts. * tests/...: nearly all bourne shell scripts Suggested by Eric Blake.
27 lines
417 B
Bash
Executable File
27 lines
417 B
Bash
Executable File
#!/bin/sh
|
|
# Ensure that chcon fails when it should.
|
|
# These tests don't use any actual SE Linux syscalls.
|
|
|
|
if test "$VERBOSE" = yes; then
|
|
set -x
|
|
chcon --version
|
|
fi
|
|
|
|
. $srcdir/test-lib.sh
|
|
|
|
|
|
# neither context nor file
|
|
chcon 2> /dev/null && fail=1
|
|
|
|
# No file
|
|
chcon CON 2> /dev/null && fail=1
|
|
|
|
# No file
|
|
touch f
|
|
chcon --reference=f 2> /dev/null && fail=1
|
|
|
|
# No file
|
|
chcon -u anyone 2> /dev/null && fail=1
|
|
|
|
Exit $fail
|