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
This commit is contained in:
Julio Merino 2014-01-10 10:39:01 +00:00
parent d7efee230d
commit 287083efce
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=260506
4 changed files with 26 additions and 0 deletions

12
bin/sh/tests/Kyuafile Normal file
View File

@ -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"}

View File

@ -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'

12
bin/test/tests/Kyuafile Normal file
View File

@ -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"}

View File

@ -3,6 +3,7 @@
.include <bsd.own.mk>
TESTSDIR= ${TESTSBASE}/bin/test
KYUAFILE= yes
TAP_TESTS_SH= legacy_test