diff options
author | jmmv <jmmv@FreeBSD.org> | 2014-01-10 10:39:01 +0000 |
---|---|---|
committer | jmmv <jmmv@FreeBSD.org> | 2014-01-10 10:39:01 +0000 |
commit | d2680a1ea6b481e1a47bc981a0818c5407f06fcf (patch) | |
tree | fb53e52579b547549223a537f6bda7411cbe878e /bin | |
parent | 6747585ab996227788d41b519534c2ab3ba90737 (diff) | |
download | FreeBSD-src-d2680a1ea6b481e1a47bc981a0818c5407f06fcf.zip FreeBSD-src-d2680a1ea6b481e1a47bc981a0818c5407f06fcf.tar.gz |
Run the sh(1) and test(1) tests as unprivileged.
One of the tests for test(1) fails and some of the tests for sh(1) are
silently bypassed when running as root.
To fix these tests and ensure they all run, mark the test programs for
sh(1) and test(1) as requiring an unprivileged user. (This should and
will be the default in Kyua but isn't yet.)
MFC after: 1 week
Diffstat (limited to 'bin')
-rw-r--r-- | bin/sh/tests/Kyuafile | 12 | ||||
-rw-r--r-- | bin/sh/tests/Makefile | 1 | ||||
-rw-r--r-- | bin/test/tests/Kyuafile | 12 | ||||
-rw-r--r-- | bin/test/tests/Makefile | 1 |
4 files changed, 26 insertions, 0 deletions
diff --git a/bin/sh/tests/Kyuafile b/bin/sh/tests/Kyuafile new file mode 100644 index 0000000..b2e4b32 --- /dev/null +++ b/bin/sh/tests/Kyuafile @@ -0,0 +1,12 @@ +-- $FreeBSD$ + +syntax(2) + +test_suite("FreeBSD") + +-- Some tests in here are silently not run when the tests are executed as +-- root. Explicitly tell Kyua to drop privileges. +-- +-- TODO(jmmv): Kyua needs to do this by default, not only when explicitly +-- requested. See https://code.google.com/p/kyua/issues/detail?id=6 +tap_test_program{name="legacy_test", required_user="unprivileged"} diff --git a/bin/sh/tests/Makefile b/bin/sh/tests/Makefile index cd8b7a2..94bcba6 100644 --- a/bin/sh/tests/Makefile +++ b/bin/sh/tests/Makefile @@ -3,6 +3,7 @@ .include <bsd.own.mk> TESTSDIR= ${TESTSBASE}/bin/sh +KYUAFILE= yes TAP_TESTS_SH= legacy_test TAP_TESTS_SH_SED_legacy_test= -e 's,__SH__,/bin/sh,g' diff --git a/bin/test/tests/Kyuafile b/bin/test/tests/Kyuafile new file mode 100644 index 0000000..b2e4b32 --- /dev/null +++ b/bin/test/tests/Kyuafile @@ -0,0 +1,12 @@ +-- $FreeBSD$ + +syntax(2) + +test_suite("FreeBSD") + +-- Some tests in here are silently not run when the tests are executed as +-- root. Explicitly tell Kyua to drop privileges. +-- +-- TODO(jmmv): Kyua needs to do this by default, not only when explicitly +-- requested. See https://code.google.com/p/kyua/issues/detail?id=6 +tap_test_program{name="legacy_test", required_user="unprivileged"} diff --git a/bin/test/tests/Makefile b/bin/test/tests/Makefile index c5743de..dfffbed 100644 --- a/bin/test/tests/Makefile +++ b/bin/test/tests/Makefile @@ -3,6 +3,7 @@ .include <bsd.own.mk> TESTSDIR= ${TESTSBASE}/bin/test +KYUAFILE= yes TAP_TESTS_SH= legacy_test |