tests: avoid test failure when running as root or in Cygwin
* testsuite/panic-tests.sh: When running as root or in Cygwin, skip the test.
This commit is contained in:
1 parent
a6aebe155c
commit
39c9ba576e
1 file changed
+7
@@ -27,6 +27,13 @@ mkdir a || framework_failure_
|
||||
touch a/a || framework_failure_
|
||||
chmod a-w a || framework_failure_
|
||||
|
||||
# skip the test when running as root or when running in Cygwin
|
||||
# (because in these cases, the directory is still actually writable)
|
||||
test `id -u` != 0 || skip_ 'running as root'
|
||||
case `uname -s` in
|
||||
CYGWIN*) skip_ 'running in cygwin' ;;
|
||||
esac
|
||||
|
||||
# Expected error message, with actual filename/errno trimmed
|
||||
cat <<\EOF >exp-err-temp || framework_failure_
|
||||
sed: couldn't open temporary file
|
||||
|
||||
Reference in new issue
Block a user