Minix Man Pages

Man Page or Keyword Search:
Man Architecture
Apropos Keyword Search (all sections) Output format
home | help
KYUA-DEBUG(1)             BSD General Commands Manual            KYUA-DEBUG(1)

NAME
     debug -- Executes a single test case with facilities for debugging

SYNOPSIS
     debug [--build-root path] [--kyuafile file] [--stdout path]
           [--stderr path] test_case

DESCRIPTION
     The debug command provides a mechanism to execute a single test case
     bypassing some of the Kyua infrastructure and allowing the user to poke
     into the execution behavior of the test.

     The test case to run is selected by providing a test filter that matches
     a single test case; see kyua-test-filters(7).  The test case is executed
     and its result is printed as the last line of the output of the tool.

     At the moment, the debug command allows the following aspects of a test
     case execution to be tweaked:

     +o   Redirection of the test case's stdout and stderr to the console (the
         default) or to arbitraty files.  See the --stdout and --stderr
         options below.

     The following subcommand options are recognized:

     --build-root path
         Specifies the build root in which to find the test programs
         referenced by the Kyuafile, if different from the Kyuafile's
         directory.  See kyua-build-root(7) for more information.

     --kyuafile file, -k file
         Specifies the Kyuafile to process.  Defaults to Kyuafile file in the
         current directory.

     --stderr path
         Specifies the file to which to send the standard error of the test
         program's body.  The default is /dev/stderr, which is a special that
         redirects the output to the console.

     --stdout path
         Specifies the file to which to send the standard output of the test
         program's body.  The default is /dev/stdout, which is a special that
         redirects the output to the console.

     For example, consider the following Kyua session:

           $ kyua test
           kernel/fs:mkdir  ->  passed
           kernel/fs:rmdir  ->  failed: Invalid argument

           1/2 passed (1 failed)

     At this point, we do not have a lot of information regarding the failure
     of the 'kernel/fs:rmdir' test.  We can run this test through the debug
     command to inspect its output a bit closer, hoping that the test case is
     kind enough to log its progress:

           $ kyua debug kernel/fs:rmdir
           Trying rmdir('foo')
           Trying rmdir(NULL)
           kernel/fs:rmdir  ->  failed: Invalid argument

     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.

EXIT STATUS
     The debug command returns 0 if the test case passes or 1 if the test case
     fails.

     Additional exit codes may be returned as described in kyua(1).

SEE ALSO
     kyua(1), kyua-build-root(7), kyua-test-filters(7)

BSD                            September 9, 2012                           BSD

NAME | SYNOPSIS | DESCRIPTION | EXIT STATUS | SEE ALSO