Module Name: src
Committed By: gdt
Date: Tue May 20 14:23:43 UTC 2014
Modified Files:
src/share/man/man7: tests.atf.7
Log Message:
Explain that tests should be run as root, and that in theory it's ok
to run them multiuser.
Discussed on current-users with in put from martin@ and gson@.
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/share/man/man7/tests.atf.7
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/share/man/man7/tests.atf.7
diff -u src/share/man/man7/tests.atf.7:1.3 src/share/man/man7/tests.atf.7:1.4
--- src/share/man/man7/tests.atf.7:1.3 Tue Mar 18 18:20:40 2014
+++ src/share/man/man7/tests.atf.7 Tue May 20 14:23:43 2014
@@ -1,4 +1,4 @@
-.\" $NetBSD: tests.atf.7,v 1.3 2014/03/18 18:20:40 riastradh Exp $
+.\" $NetBSD: tests.atf.7,v 1.4 2014/05/20 14:23:43 gdt Exp $
.\"
.\" Copyright (c) 2010 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -143,6 +143,21 @@ see
.Xr atf-test-program 1
for more details, but be aware that you should only be doing this if you are
debugging failing tests.
+.Ss Test environment considerations
+Tests can be invoked as an unprivileged user, in which case tests that
+require privileges will be skipped.
+If run as root, an unprivileged user will be used for tests that
+require privileges.
+For maximal coverage, the standard approach is to invoke tests as root.
+.Pp
+Ideally, tests are self-contained and do not either depend on or
+perturb the host environment, aside from skipping tests when optional
+facilities are not available.
+In reality, tests load and unload modules, and do other things that
+might cause problems.
+While it is not entirely safe to run tests on a multi-user system,
+permanent problems or crashes from doing so are viewed as bugs and
+should be reported.
.Ss Configuring the tests
Some test cases in the
.Nx