Changeset View
Changeset View
Standalone View
Standalone View
head/share/man/man7/tests.7
Show All 20 Lines | |||||
.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | .\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||||
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE | ||||
.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | .\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER | .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER | ||||
.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | .\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | ||||
.\" 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 June 2, 2019 | .Dd June 25, 2020 | ||||
.Dt TESTS 7 | .Dt TESTS 7 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm tests | .Nm tests | ||||
.Nd introduction to the | .Nd introduction to the | ||||
.Fx | .Fx | ||||
Test Suite | Test Suite | ||||
.Sh DESCRIPTION | .Sh DESCRIPTION | ||||
Show All 18 Lines | |||||
.Pa /usr/tests | .Pa /usr/tests | ||||
hierarchy. | hierarchy. | ||||
.Pp | .Pp | ||||
This manual page describes how to run 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. | ||||
For information on writing the tests, see | For information on writing the tests, see | ||||
.Xr atf 7 . | .Xr atf 7 . | ||||
.Ss Installing the test suite | .Ss Installing the test suite | ||||
The test suite is installed by default as of | |||||
.Fx | |||||
11.0-RELEASE. | |||||
.Pp | |||||
If the | If the | ||||
.Pa /usr/tests | .Pa /usr/tests | ||||
directory is missing, then you will have to enable the build of the test | directory is missing, then you will have to enable the build of the test | ||||
suite, rebuild your system and install the results. | suite, rebuild your system and install the results. | ||||
You can do so by setting | You can do so by setting | ||||
.Sq WITH_TESTS=yes | .Sq WITH_TESTS=yes | ||||
in your | in your | ||||
.Pa /etc/src.conf | .Pa /etc/src.conf | ||||
Show All 21 Lines | |||||
.It | .It | ||||
Periodically, maybe from a | Periodically, maybe from a | ||||
.Xr cron 8 | .Xr cron 8 | ||||
job, to ensure that any changes to the system (such as the installation of | job, to ensure that any changes to the system (such as the installation of | ||||
third-party packages or manual modifications to configuration files) do not | 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, you will need to install the | Use the following command to run the whole test suite: | ||||
.Sq devel/kyua | |||||
package from | |||||
.Xr ports 7 . | |||||
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 iterate 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's | recursively, execute them, store their results and debugging data in Kyua's | ||||
database (by default in | database (by default in | ||||
Show All 35 Lines | |||||
.Fx | .Fx | ||||
Test Suite require manual configuration by the administrator before they can be | Test Suite require manual configuration by the administrator before they can be | ||||
run. | run. | ||||
Unless certain properties are defined, the tests that require them will be | Unless certain properties are defined, the tests that require them will be | ||||
skipped. | skipped. | ||||
.Pp | .Pp | ||||
Test suites are configured by defining their configuration | Test suites are configured by defining their configuration | ||||
variables in | variables in | ||||
.Pa /usr/local/etc/kyua/kyua.conf . | .Pa /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 -width "allow_sysctl_side_effects" | ||||
.It allow_devfs_side_effects | .It allow_devfs_side_effects | ||||
Show All 30 Lines | |||||
For more details please refer to: | For more details please refer to: | ||||
.Bl -bullet -offset indent -compact | .Bl -bullet -offset indent -compact | ||||
.It | .It | ||||
.Lk https://lists.freebsd.org/ "FreeBSD Mailing Lists" | .Lk https://lists.freebsd.org/ "FreeBSD Mailing Lists" | ||||
.It | .It | ||||
.Lk https://www.freebsd.org/support.html "Problem Reporting" | .Lk https://www.freebsd.org/support.html "Problem Reporting" | ||||
.El | .El | ||||
.Sh FILES | .Sh FILES | ||||
.Bl -tag -compact -width usrXlocalXetcXkyuaXkyuaXconfXX | .Bl -tag -compact -width "/etc/kyua/kyua.conf" | ||||
.It Pa /usr/local/etc/kyua/kyua.conf | .It Pa /etc/kyua/kyua.conf | ||||
System-wide configuration file for | System-wide configuration file for | ||||
.Xr kyua 1 . | .Xr kyua 1 . | ||||
.It Pa ~/.kyua/kyua.conf | .It Pa ~/.kyua/kyua.conf | ||||
User-specific configuration file for | 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 result database used by Kyua. | Default result database used by Kyua. | ||||
.It Pa /usr/tests/ | .It Pa /usr/tests/ | ||||
Location of the | Location of the | ||||
.Fx | .Fx | ||||
Test Suite. | Test Suite. | ||||
.It Pa /usr/tests/Kyuafile | .It Pa /usr/tests/Kyuafile | ||||
Top-level test suite definition file. | Top-level test suite definition file. | ||||
.El | .El | ||||
.Sh SEE ALSO | .Sh SEE ALSO | ||||
.Xr kyua 1 , | .Xr kyua 1 , | ||||
.Xr atf 7 , | .Xr atf 7 , | ||||
.Xr build 7 | .Xr build 7 | ||||
.Sh HISTORY | .Sh HISTORY | ||||
The | The | ||||
.Fx | .Fx | ||||
Test Suite first appeared in | Test Suite first appeared in | ||||
.Fx 10.1 . | .Fx 10.1 | ||||
and was installed by default in | |||||
.Fx 11.0 . | |||||
.Pp | .Pp | ||||
The | The | ||||
.Nm | .Nm | ||||
manual page first appeared in | manual page first appeared in | ||||
.Nx 6.0 | .Nx 6.0 | ||||
and was later ported to | and was later ported to | ||||
.Fx 10.1 . | .Fx 10.1 . | ||||
.Pp | |||||
The test driver, | |||||
.Xr kyua 1 , | |||||
was imported as part of the base system in | |||||
.Fx 13.0 , | |||||
previously being available only in | |||||
.Xr ports 7 . | |||||
.Sh AUTHORS | .Sh AUTHORS | ||||
.An Julio Merino Aq Mt jmmv@FreeBSD.org | .An Julio Merino Aq Mt jmmv@FreeBSD.org |