p The test case to run is selected by providing a test filter that matches a single test case; see .Xr kyua-test-filters 7 . The test case is executed and its result is printed as the last line of the output of the tool.
p At the moment, the .Nm command allows the following aspects of a test case execution to be tweaked: l -bullet t Redirection of the test case's stdout and stderr to the console (the default) or to arbitraty files. See the .Fl -stdout and .Fl -stderr options below. .El
p The following subcommand options are recognized: l -tag -width XX t Fl -build-root Ar path Specifies the build root in which to find the test programs referenced by the Kyuafile, if different from the Kyuafile's directory. See .Xr kyua-build-root 7 for more information. t Fl -kyuafile Ar file , Fl k Ar file Specifies the Kyuafile to process. Defaults to
a Kyuafile file in the current directory. t Fl -stderr Ar path Specifies the file to which to send the standard error of the test program's body. The default is
a /dev/stderr , which is a special that redirects the output to the console. t Fl -stdout Ar path Specifies the file to which to send the standard output of the test program's body. The default is
a /dev/stdout , which is a special that redirects the output to the console. .El
p For example, consider the following Kyua session: d -literal -offset indent $ kyua test kernel/fs:mkdir -> passed kernel/fs:rmdir -> failed: Invalid argument 1/2 passed (1 failed) .Ed
p At this point, we do not have a lot of information regarding the failure of the .Sq kernel/fs:rmdir test. We can run this test through the .Nm command to inspect its output a bit closer, hoping that the test case is kind enough to log its progress: d -literal -offset indent $ kyua debug kernel/fs:rmdir Trying rmdir('foo') Trying rmdir(NULL) kernel/fs:rmdir -> failed: Invalid argument .Ed
p Luckily, the offending test case was printing status lines as it progressed, so we could see the last attempted call and we can know match the failure message to the problem. .Sh EXIT STATUS The .Nm command returns 0 if the test case passes or 1 if the test case fails.
p Additional exit codes may be returned as described in .Xr kyua 1 . .Sh SEE ALSO .Xr kyua 1 , .Xr kyua-build-root 7 , .Xr kyua-test-filters 7