ATF-CHECK(1) | General Commands Manual | ATF-CHECK(1) |
atf-check | [-s qual:value] [-o action:arg ...] [-e action:arg ...] [-x] command |
atf-check | -h |
In the first synopsis form, atf-check will execute the provided command and apply checks specified by arguments. By default it will act as if it was run with -s exit:0 -o empty -e empty. Multiple checks for the same output channel are allowed and, if specified, their results will be combined as a logical and (meaning that the output must match all the provided checks).
In the second synopsis form, atf-check will print information about all supported options and their purpose.
The following options are available:
Most of these checkers can be prefixed by the ‘not-' string, which effectively reverses the check.
Most of these checkers can be prefixed by the ‘not-' string, which effectively reverses the check.
# Exit code 0, nothing on stdout/stderr atf-check 'true' # Typical usage if failure is expected atf-check -s not-exit:0 'false' # Checking stdout/stderr echo foobar >expout atf-check -o file:expout -e inline:"xx\tyy\n" \ 'echo foobar ; printf "xx\tyy\n" >&2' # Checking for a crash atf-check -s signal:sigsegv my_program # Combined checks atf-check -o match:foo -o not-match:bar echo foo baz
June 27, 2010 | NetBSD 6.1 |