The goal is to possibly improve the speed of the FreeBSD test suite by having additional approach of test running in parallel without additional complexity on a test case side. For example, some network related tests already spawn jails to isolate many details but still have clashing jail naming, routing entries, etc.
It introduces a new general concept of an execution environment. By default this is current approach without changes, i.e. a test case is running within a so called "host" environment. The second execution environment is added to run a test case within a temporary jail, it allows to isolate it more and run in parallel with other tests (of course, if conceptually it's possible for a specific test).
The changes of Kyua/ATF interfaces, from bottom to top:
1 ATF based tests
- The new execenv metadata property can be set to explicitly ask for an execution environment: "host" or "jail". If it’s not defined, as all existing tests do, then it means "host".
- The new execenv.jail metadata property can be optionally defined to ask Kyua to use specific jail(8) parameters during creation of a temporary jail. An example is "vnet allow.raw_sockets".
2 Kyuafile
- The same new metadata properties can be defined on Kyuafile level: execenv and execenv_jail.
- Note that historically ATF uses dotted style of metadata naming, while Kyua uses underscore style. Hence execenv.jail vs. execenv_jail.
3 kyua.conf, kyua CLI
- The new execenv engine configuration variable can be set to a list of execution environments to run only tests designed for. Tests of not listed environments are skipped.
- By default, this variable lists all execution environments supported by a Kyua binary, e.g. execenv="host jail".
- This variable can be changed via kyua.conf or via kyua CLI's -v parameter. For example, kyua -v execenv=host test will run only host-based tests and skip jail-based ones.
- Current value of this variable can be examined with kyua config.