Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Clarifications to tests(7)

I found that tests(7) did not give guidance as to whether one should
invoke atf-run (for the tests included with NetBSD) as root, and
whether one had to worry about the state of the system.  The following
patch is my best guess at the right answers.  I'll commit it if there
are no objections.

Index: tests.atf.7
RCS file: /cvsroot/src/share/man/man7/tests.atf.7,v
retrieving revision 1.3
diff -u -p -r1.3 tests.atf.7
--- tests.atf.7 18 Mar 2014 18:20:40 -0000      1.3
+++ tests.atf.7 8 May 2014 20:07:44 -0000
@@ -143,6 +143,16 @@ 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 do
+not require privileges.
+For maximal coverage, the standard approach is to invoke tests as root.
+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.
 .Ss Configuring the tests
 Some test cases in the

Attachment: pgpxkcJS7GI5P.pgp
Description: PGP signature

Home | Main Index | Thread Index | Old Index