executes a given command and analyzes its results, including exit code, stdout and stderr. In the first synopsis form, will exe‐ cute the provided command and apply checks specified by argu‐ ments. By default it will act as if it was run with 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 synop‐ sis form, will print information about all supported options and their purpose. The following options are available: Analyzes termination status. Must be one of: checks that the program ex‐ ited cleanly and that its exit status is equal to The exit code can be omitted altogether, in which case any clean exit is ac‐ cepted. ignores the exit check. checks that the program exited due to a signal and that the signal that terminated it is The signal can be specified both as a number or as a name, or it can also be omitted altogether, in which case any signal is accepted. Most of these checkers can be prefixed by the string, which ef‐ fectively reverses the check. Analyzes standard output. Must be one of: checks that stdout is empty ignores stdout compares std‐ out with given file compares stdout with inline value looks for a regular expression in stdout saves stdout to given file Most of these checkers can be prefixed by the string, which effectively reverses the check. Analyzes standard error (syntax identical to above) Executes as a shell command line, executing it with the system shell defined by You should avoid using this flag if at all possible to prevent shell quoting issues. exits 0 on suc‐ cess, and other (unspecified) value on failure. Path to the sys‐ tem shell to be used when the is given to run commands. The fol‐ lowing are sample invocations from within a test case. Note that we use the function provided by instead of executing directly: # 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