1*257e70f1SIgor Ostapenko.\" Copyright 2012-2024 The Kyua Authors. 2b0d29bc4SBrooks Davis.\" All rights reserved. 3b0d29bc4SBrooks Davis.\" 4b0d29bc4SBrooks Davis.\" Redistribution and use in source and binary forms, with or without 5b0d29bc4SBrooks Davis.\" modification, are permitted provided that the following conditions are 6b0d29bc4SBrooks Davis.\" met: 7b0d29bc4SBrooks Davis.\" 8b0d29bc4SBrooks Davis.\" * Redistributions of source code must retain the above copyright 9b0d29bc4SBrooks Davis.\" notice, this list of conditions and the following disclaimer. 10b0d29bc4SBrooks Davis.\" * Redistributions in binary form must reproduce the above copyright 11b0d29bc4SBrooks Davis.\" notice, this list of conditions and the following disclaimer in the 12b0d29bc4SBrooks Davis.\" documentation and/or other materials provided with the distribution. 13b0d29bc4SBrooks Davis.\" * Neither the name of Google Inc. nor the names of its contributors 14b0d29bc4SBrooks Davis.\" may be used to endorse or promote products derived from this software 15b0d29bc4SBrooks Davis.\" without specific prior written permission. 16b0d29bc4SBrooks Davis.\" 17b0d29bc4SBrooks Davis.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18b0d29bc4SBrooks Davis.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19b0d29bc4SBrooks Davis.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20b0d29bc4SBrooks Davis.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21b0d29bc4SBrooks Davis.\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22b0d29bc4SBrooks Davis.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23b0d29bc4SBrooks Davis.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24b0d29bc4SBrooks Davis.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25b0d29bc4SBrooks Davis.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26b0d29bc4SBrooks Davis.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27b0d29bc4SBrooks Davis.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28*257e70f1SIgor Ostapenko.Dd March 22, 2024 29b0d29bc4SBrooks Davis.Dt KYUA.CONF 5 30b0d29bc4SBrooks Davis.Os 31b0d29bc4SBrooks Davis.Sh NAME 32b0d29bc4SBrooks Davis.Nm kyua.conf 33b0d29bc4SBrooks Davis.Nd Configuration file for the kyua tool 34b0d29bc4SBrooks Davis.Sh SYNOPSIS 35b0d29bc4SBrooks Davis.Fn syntax "int version" 36b0d29bc4SBrooks Davis.Pp 37b0d29bc4SBrooks DavisVariables: 38b0d29bc4SBrooks Davis.Va architecture , 39*257e70f1SIgor Ostapenko.Va execenvs , 40b0d29bc4SBrooks Davis.Va platform , 41b0d29bc4SBrooks Davis.Va test_suites , 42b0d29bc4SBrooks Davis.Va unprivileged_user . 43b0d29bc4SBrooks Davis.Sh DESCRIPTION 44b0d29bc4SBrooks DavisThe configuration of Kyua is a simple collection of key/value pairs called 45b0d29bc4SBrooks Davisconfiguration variables. 46b0d29bc4SBrooks DavisThere are configuration variables that have a special meaning to the runtime 47b0d29bc4SBrooks Davisengine implemented by 48b0d29bc4SBrooks Davis.Xr kyua 1 , 49b0d29bc4SBrooks Davisand there are variables that only have meaning in the context of particular 50b0d29bc4SBrooks Davistest suites. 51b0d29bc4SBrooks Davis.Pp 52b0d29bc4SBrooks DavisConfiguration files are Lua scripts. 53b0d29bc4SBrooks DavisIn their most basic form, their whole purpose is to assign values to 54b0d29bc4SBrooks Davisvariables, but the user has the freedom to implement any logic he desires 55b0d29bc4SBrooks Davisto compute such values. 56b0d29bc4SBrooks Davis.Ss File versioning 57b0d29bc4SBrooks DavisEvery 58b0d29bc4SBrooks Davis.Nm 59b0d29bc4SBrooks Davisfile starts with a call to 60b0d29bc4SBrooks Davis.Fn syntax "int version" . 61b0d29bc4SBrooks DavisThis call determines the specific schema used by the file so that future 62b0d29bc4SBrooks Davisbackwards-incompatible modifications to the file can be introduced. 63b0d29bc4SBrooks Davis.Pp 64b0d29bc4SBrooks DavisAny new 65b0d29bc4SBrooks Davis.Nm 66b0d29bc4SBrooks Davisfile should set 67b0d29bc4SBrooks Davis.Fa version 68b0d29bc4SBrooks Davisto 69b0d29bc4SBrooks Davis.Sq 2 . 70b0d29bc4SBrooks Davis.Ss Runtime configuration variables 71b0d29bc4SBrooks DavisThe following variables are internally recognized by 72b0d29bc4SBrooks Davis.Xr kyua 1 : 73b0d29bc4SBrooks Davis.Bl -tag -width XX -offset indent 74b0d29bc4SBrooks Davis.It Va architecture 75b0d29bc4SBrooks DavisName of the system architecture (aka processor type). 76*257e70f1SIgor Ostapenko.It Va execenvs 77*257e70f1SIgor OstapenkoWhitespace-separated list of execution environment names. 78*257e70f1SIgor Ostapenko.Pp 79*257e70f1SIgor OstapenkoOnly tests which require one of the given execution environments will be run. 80*257e70f1SIgor Ostapenko.Pp 81*257e70f1SIgor OstapenkoSee 82*257e70f1SIgor Ostapenko.Xr kyuafile 5 83*257e70f1SIgor Ostapenkofor the list of possible execution environments. 84b0d29bc4SBrooks Davis.It Va parallelism 85b0d29bc4SBrooks DavisMaximum number of test cases to execute concurrently. 86b0d29bc4SBrooks Davis.It Va platform 87b0d29bc4SBrooks DavisName of the system platform (aka machine type). 88b0d29bc4SBrooks Davis.It Va unprivileged_user 89b0d29bc4SBrooks DavisName or UID of the unprivileged user. 90b0d29bc4SBrooks Davis.Pp 91b0d29bc4SBrooks DavisIf set, the given user must exist in the system and his privileges will be 92b0d29bc4SBrooks Davisused to run test cases that need regular privileges when 93b0d29bc4SBrooks Davis.Xr kyua 1 94b0d29bc4SBrooks Davisis executed as root. 95b0d29bc4SBrooks Davis.El 96b0d29bc4SBrooks Davis.Ss Test-suite configuration variables 97b0d29bc4SBrooks DavisEach test suite is able to recognize arbitrary configuration variables, and 98b0d29bc4SBrooks Davistheir type and meaning is specific to the test suite. 99b0d29bc4SBrooks DavisBecause the existence and naming of these variables depends on every test 100b0d29bc4SBrooks Davissuite, this manual page cannot detail them; please refer to the documentation 101b0d29bc4SBrooks Davisof the test suite you are working with for more details on this topic. 102b0d29bc4SBrooks Davis.Pp 103b0d29bc4SBrooks DavisTest-suite specific configuration variables are defined inside the 104b0d29bc4SBrooks Davis.Va test_suites 105b0d29bc4SBrooks Davisdictionary. 106b0d29bc4SBrooks DavisThe general syntax is: 107b0d29bc4SBrooks Davis.Bd -literal -offset indent 108b0d29bc4SBrooks Davistest_suites.<test_suite_name>.<variable_name> = <value> 109b0d29bc4SBrooks Davis.Ed 110b0d29bc4SBrooks Davis.Pp 111b0d29bc4SBrooks Daviswhere 112b0d29bc4SBrooks Davis.Va test_suite_name 113b0d29bc4SBrooks Davisis the name of the test suite, 114b0d29bc4SBrooks Davis.Va variable_name 115b0d29bc4SBrooks Davisis the name of the variable to set, and 116b0d29bc4SBrooks Davis.Va value 117b0d29bc4SBrooks Davisis a value. 118b0d29bc4SBrooks DavisThe value can be a string, an integer or a boolean. 119b0d29bc4SBrooks Davis.Sh FILES 120b0d29bc4SBrooks Davis.Bl -tag -width XX 121b0d29bc4SBrooks Davis.It __EGDIR__/kyua.conf 122b0d29bc4SBrooks DavisSample configuration file. 123b0d29bc4SBrooks Davis.El 124b0d29bc4SBrooks Davis.Sh EXAMPLES 125b0d29bc4SBrooks DavisThe following 126b0d29bc4SBrooks Davis.Nm 127b0d29bc4SBrooks Davisshows a simple configuration file that overrides a bunch of the built-in 128b0d29bc4SBrooks Davis.Xr kyua 1 129b0d29bc4SBrooks Davisconfiguration variables: 130b0d29bc4SBrooks Davis.Bd -literal -offset indent 131b0d29bc4SBrooks Davissyntax(2) 132b0d29bc4SBrooks Davis 133b0d29bc4SBrooks Davisarchitecture = 'x86_64' 134b0d29bc4SBrooks Davisplatform = 'amd64' 135b0d29bc4SBrooks Davis.Ed 136b0d29bc4SBrooks Davis.Pp 137b0d29bc4SBrooks DavisThe following is a more complex example that introduces the definition of 138b0d29bc4SBrooks Davisper-test suite configuration variables: 139b0d29bc4SBrooks Davis.Bd -literal -offset indent 140b0d29bc4SBrooks Davissyntax(2) 141b0d29bc4SBrooks Davis 142b0d29bc4SBrooks Davis-- Assign built-in variables. 143b0d29bc4SBrooks Davisunprivileged_user = '_tests' 144b0d29bc4SBrooks Davis 145b0d29bc4SBrooks Davis-- Assign test-suite variables. All of these must be strings. 146b0d29bc4SBrooks Davistest_suites.NetBSD.file_systems = 'ffs ext2fs' 147b0d29bc4SBrooks Davistest_suites.X11.graphics_driver = 'vesa' 148b0d29bc4SBrooks Davis.Ed 149b0d29bc4SBrooks Davis.Sh SEE ALSO 150b0d29bc4SBrooks Davis.Xr kyua 1 151