mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-14 14:55:41 +00:00
share/man/man7/tests.7
Added a section on test suite configuration, and cleaned up up grammar errors and awkward prose. The config variables were discussed on freebsd-testing. Discussed with: Garrett Cooper, jmmv MFC after: 2 weeks Sponsored by: Spectra Logic Corporation
This commit is contained in:
parent
5637e3c775
commit
b2b6c6a803
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=263428
@ -26,7 +26,7 @@
|
|||||||
.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
||||||
.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
.\"
|
.\"
|
||||||
.Dd October 19, 2013
|
.Dd March 20, 2014
|
||||||
.Dt TESTS 7
|
.Dt TESTS 7
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -36,30 +36,29 @@
|
|||||||
The
|
The
|
||||||
.Fx
|
.Fx
|
||||||
test suite provides a collection of automated tests for two major purposes.
|
test suite provides a collection of automated tests for two major purposes.
|
||||||
On the one hand, the test suite aids
|
On one hand, the test suite aids
|
||||||
.Em developers
|
.Em developers
|
||||||
in catching bugs and regressions in the code when they performing modifications
|
to detect bugs and regressions when they modify the source tree. On the other
|
||||||
to the source tree.
|
hand, it allows
|
||||||
On the other hand, the test suite allows
|
|
||||||
.Em end users
|
.Em end users
|
||||||
(and, in particular, system administrators) to verify that fresh installations
|
(and, in particular, system administrators) to verify that fresh installations
|
||||||
of the
|
of the
|
||||||
.Fx
|
.Fx
|
||||||
operating system behave correctly in their hardware platform and also to ensure
|
operating system behave correctly on their hardware platform and also to ensure
|
||||||
that the system does not suffer from regressions during regular system
|
that the system does not suffer from regressions during regular operation and
|
||||||
operation and maintenance.
|
maintenance.
|
||||||
.Pp
|
.Pp
|
||||||
The
|
The
|
||||||
.Fx
|
.Fx
|
||||||
test suite is installed under the
|
test suite is installed in the
|
||||||
.Pa /usr/tests
|
.Pa /usr/tests
|
||||||
hierarchy.
|
hierarchy.
|
||||||
.Pp
|
.Pp
|
||||||
This manual page describes how to execute the test suite and how to configure
|
This manual page describes how to run the test suite and how to configure
|
||||||
some of its optional features.
|
some of its optional features.
|
||||||
.Ss When to run the tests?
|
.Ss When to run the tests?
|
||||||
Before diving into the details of how to run the test suite, here are some
|
Before diving into the details of how to run the test suite, here are some
|
||||||
scenarios in which you should be running them:
|
scenarios in which you should run it:
|
||||||
.Bl -bullet -offset indent
|
.Bl -bullet -offset indent
|
||||||
.It
|
.It
|
||||||
After a fresh installation of
|
After a fresh installation of
|
||||||
@ -72,8 +71,7 @@ to a different version to ensure that the new code works well on your
|
|||||||
hardware platform and that the upgrade did not introduce regressions in your
|
hardware platform and that the upgrade did not introduce regressions in your
|
||||||
configuration.
|
configuration.
|
||||||
.It
|
.It
|
||||||
After performing changes to the source tree to catch any bugs and/or regressions
|
After modifying the source tree to detect any new bugs and/or regressions.
|
||||||
introduced by the modifications.
|
|
||||||
.It
|
.It
|
||||||
Periodically, maybe from a
|
Periodically, maybe from a
|
||||||
.Xr cron 8
|
.Xr cron 8
|
||||||
@ -82,18 +80,18 @@ third-party packages or manual modifications to configuration files) do not
|
|||||||
introduce unexpected failures.
|
introduce unexpected failures.
|
||||||
.El
|
.El
|
||||||
.Ss Running the tests
|
.Ss Running the tests
|
||||||
First of all, you will need to install the
|
First, you will need to install the
|
||||||
.Sq ports/devel/kyua
|
.Sq devel/kyua
|
||||||
package.
|
package from
|
||||||
.Pp
|
.Xr ports 7 .
|
||||||
Use the following command to run the whole test suite:
|
Then use the following command to run the whole test suite:
|
||||||
.Bd -literal -offset indent
|
.Bd -literal -offset indent
|
||||||
$ kyua test -k /usr/tests/Kyuafile
|
$ kyua test -k /usr/tests/Kyuafile
|
||||||
.Ed
|
.Ed
|
||||||
.Pp
|
.Pp
|
||||||
The above will go through all test programs in
|
The above will iterate through all test programs in
|
||||||
.Pa /usr/tests
|
.Pa /usr/tests
|
||||||
recursively, execute them, store their results and debugging data in Kyua
|
recursively, execute them, store their results and debugging data in Kyua's
|
||||||
database (by default in
|
database (by default in
|
||||||
.Pa ~/.kyua/store.db ) ,
|
.Pa ~/.kyua/store.db ) ,
|
||||||
and print a summary of the results.
|
and print a summary of the results.
|
||||||
@ -111,15 +109,15 @@ utilities:
|
|||||||
$ kyua test -k /usr/tests/Kyuafile bin/cp usr.bin/cut
|
$ kyua test -k /usr/tests/Kyuafile bin/cp usr.bin/cut
|
||||||
.Ed
|
.Ed
|
||||||
.Ss Obtaining reports of the tests execution
|
.Ss Obtaining reports of the tests execution
|
||||||
Additional information of the results of the execution can be later extracted
|
Additional information about the test results can be retrieved
|
||||||
from the database by using the various reporting commands of Kyua.
|
by using Kyua's various reporting commands.
|
||||||
For example, the following would extract a plain-text report of the executed
|
For example, the following would print a plain-text report of the executed
|
||||||
tests and show which ones failed:
|
tests and show which ones failed:
|
||||||
.Bd -literal -offset indent
|
.Bd -literal -offset indent
|
||||||
$ kyua report
|
$ kyua report
|
||||||
.Ed
|
.Ed
|
||||||
.Pp
|
.Pp
|
||||||
This other example would generate an HTML report ready to be published on a
|
This example would generate an HTML report ready to be published on a
|
||||||
web server:
|
web server:
|
||||||
.Bd -literal -offset indent
|
.Bd -literal -offset indent
|
||||||
$ kyua report-html --output ~/public_html/tests
|
$ kyua report-html --output ~/public_html/tests
|
||||||
@ -128,30 +126,47 @@ $ kyua report-html --output ~/public_html/tests
|
|||||||
For further details on the command-line interface of Kyua, please refer
|
For further details on the command-line interface of Kyua, please refer
|
||||||
to its manual page
|
to its manual page
|
||||||
.Xr kyua 1 .
|
.Xr kyua 1 .
|
||||||
.\".Ss Configuring the tests
|
.Ss Configuring the tests
|
||||||
.\"Some test cases in the
|
Some test cases in the
|
||||||
.\".Fx
|
.Fx
|
||||||
.\"test suite require the administrator to manually set up some configuration
|
test suite require manual configuration by the administrator before they can be
|
||||||
.\"properties before they can run.
|
run. Unless certain properties are defined, the tests that require them will
|
||||||
.\"Unless these properties are defined, the tests that require them will be marked
|
be skipped.
|
||||||
.\"as skipped and thus they will not be really executed.
|
.Pp
|
||||||
.\".Pp
|
Test suites are configured by defining their configuration
|
||||||
.\"Test suites are configured by defining the values to their configuration
|
variables in
|
||||||
.\"variables in
|
.Pa /usr/local/etc/kyua/kyua.conf .
|
||||||
.\".Pa /usr/local/etc/kyua/kyua.conf .
|
The format of this file is detailed in
|
||||||
.\"The format of this file is detailed in
|
.Xr kyua.conf 5 .
|
||||||
.\".Xr kyua.conf 5 .
|
.Pp
|
||||||
.\".Pp
|
The following configuration variables are available in the
|
||||||
.\"The following configuration variables are available in the
|
.Fx
|
||||||
.\".Fx
|
test suite:
|
||||||
.\"test suite:
|
.Bl -tag -width "allow_sysctl_side_effects"
|
||||||
.\".Bl -tag
|
.It allow_devfs_side_effects
|
||||||
.\".It NONE REGISTERED YET
|
If defined, enables tests that may destroy and recreate semipermanent device
|
||||||
.\"TBD.
|
nodes, like disk devices. Without this variable, tests may still create and
|
||||||
|
destroy devices nodes that are normally transient, like /dev/tap* and
|
||||||
|
/dev/pts*, as long as they clean them up afterwards. However, tests that
|
||||||
|
require this variable have a relaxed cleanup requirement; they must recreate
|
||||||
|
any devices that they destroyed, but not necessarily with the same devnames.
|
||||||
|
.It allow_sysctl_side_effects
|
||||||
|
Enables tests that change globally significant
|
||||||
|
.Xr sysctl 8
|
||||||
|
variables. The tests will undo any changes in their cleanup phases.
|
||||||
|
.It disks
|
||||||
|
Must be set to a space delimited list of disk device nodes. Tests that need
|
||||||
|
destructive access to disks must use these devices. Tests are not required to
|
||||||
|
preserve any data present on these disks.
|
||||||
|
.It fibs
|
||||||
|
Must be set to a space delimited list of FIBs (routing tables). Tests that
|
||||||
|
need to modify a routing table may use any of these. Tests will cleanup any
|
||||||
|
new routes that they create.
|
||||||
|
.El
|
||||||
.Ss What to do if something fails?
|
.Ss What to do if something fails?
|
||||||
If there is
|
If there is
|
||||||
.Em any failure
|
.Em any failure
|
||||||
during the execution of the test suite, please considering reporting it to the
|
during the execution of the test suite, please consider reporting it to the
|
||||||
.Fx
|
.Fx
|
||||||
developers so that the failure can be analyzed and fixed.
|
developers so that the failure can be analyzed and fixed.
|
||||||
To do so, either send a message to the appropriate mailing list or file a
|
To do so, either send a message to the appropriate mailing list or file a
|
||||||
@ -173,7 +188,7 @@ User-specific configuration file for
|
|||||||
.Xr kyua 1 ;
|
.Xr kyua 1 ;
|
||||||
overrides the system file.
|
overrides the system file.
|
||||||
.It Pa ~/.kyua/store.db
|
.It Pa ~/.kyua/store.db
|
||||||
Default database used by Kyua to maintain the data of the executed tests.
|
Default result database used by Kyua.
|
||||||
.It Pa /usr/tests/
|
.It Pa /usr/tests/
|
||||||
Location of the
|
Location of the
|
||||||
.Fx
|
.Fx
|
||||||
@ -184,9 +199,7 @@ Top-level test suite definition file.
|
|||||||
.Sh SEE ALSO
|
.Sh SEE ALSO
|
||||||
.Xr kyua 1 .
|
.Xr kyua 1 .
|
||||||
.Sh HISTORY
|
.Sh HISTORY
|
||||||
The collection of test programs in
|
This test suite first appeared in
|
||||||
.Pa /usr/tests
|
|
||||||
first appeared in
|
|
||||||
.Fx 11.0 .
|
.Fx 11.0 .
|
||||||
.Pp
|
.Pp
|
||||||
The
|
The
|
||||||
|
Loading…
Reference in New Issue
Block a user