summaryrefslogtreecommitdiffstats
path: root/bin/sh
diff options
context:
space:
mode:
authorjmmv <jmmv@FreeBSD.org>2014-01-10 10:39:01 +0000
committerjmmv <jmmv@FreeBSD.org>2014-01-10 10:39:01 +0000
commitd2680a1ea6b481e1a47bc981a0818c5407f06fcf (patch)
treefb53e52579b547549223a537f6bda7411cbe878e /bin/sh
parent6747585ab996227788d41b519534c2ab3ba90737 (diff)
downloadFreeBSD-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/sh')
-rw-r--r--bin/sh/tests/Kyuafile12
-rw-r--r--bin/sh/tests/Makefile1
2 files changed, 13 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'
OpenPOWER on IntegriCloud