Author: jmmv
Date: Fri Jan 10 10:39:01 2014
New Revision: 260506
URL: http://svnweb.freebsd.org/changeset/base/260506

Log:
  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

Added:
  head/bin/sh/tests/Kyuafile   (contents, props changed)
  head/bin/test/tests/Kyuafile   (contents, props changed)
Modified:
  head/bin/sh/tests/Makefile
  head/bin/test/tests/Makefile

Added: head/bin/sh/tests/Kyuafile
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/bin/sh/tests/Kyuafile  Fri Jan 10 10:39:01 2014        (r260506)
@@ -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"}

Modified: head/bin/sh/tests/Makefile
==============================================================================
--- head/bin/sh/tests/Makefile  Fri Jan 10 10:36:14 2014        (r260505)
+++ head/bin/sh/tests/Makefile  Fri Jan 10 10:39:01 2014        (r260506)
@@ -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'

Added: head/bin/test/tests/Kyuafile
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/bin/test/tests/Kyuafile        Fri Jan 10 10:39:01 2014        
(r260506)
@@ -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"}

Modified: head/bin/test/tests/Makefile
==============================================================================
--- head/bin/test/tests/Makefile        Fri Jan 10 10:36:14 2014        
(r260505)
+++ head/bin/test/tests/Makefile        Fri Jan 10 10:39:01 2014        
(r260506)
@@ -3,6 +3,7 @@
 .include <bsd.own.mk>
 
 TESTSDIR=      ${TESTSBASE}/bin/test
+KYUAFILE=      yes
 
 TAP_TESTS_SH=  legacy_test
 
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to