mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
root tests: Set NON_ROOT_USERNAME if not set already.
* tests/test-lib.sh (require_root_): This avoids failure of a couple of root-only tests that require a value for that envvar.
This commit is contained in:
1 parent
157ff3506e
commit
504fa74e24
1 file changed
+6
-1
+6
-1
@@ -115,7 +115,12 @@ environment variable set to yes. E.g.,
|
||||
fi
|
||||
}
|
||||
|
||||
require_root_() { uid_is_privileged_ || skip_test_ "must be run as root"; }
|
||||
require_root_()
|
||||
{
|
||||
uid_is_privileged_ || skip_test_ "must be run as root"
|
||||
NON_ROOT_USERNAME=${NON_ROOT_USERNAME=nobody}
|
||||
}
|
||||
|
||||
skip_if_root_() { uid_is_privileged_ && skip_test_ "must be run as non-root"; }
|
||||
error_() { echo "$0: $@" 1>&2; (exit 1); exit 1; }
|
||||
framework_failure() { error_ 'failure in testing framework'; }
|
||||
|
||||
Reference in new issue
Block a user