8 atf_set "descr" "Run ztest"
10 atf_set "require.config" "rt_long"
15 ARGS="-VVVVV -f ${TMPDIR:-/tmp}"
16 if atf_config_has ztest_extra_args; then
17 ARGS="${ARGS} $(atf_config_get ztest_extra_args)"
23 atf_fail "Testcase failed"
31 # ATF Test Program Init Function
35 atf_add_test_case ztest
38 save_ztest_artifacts()
40 # If artifacts_dir is defined, save test artifacts for
41 # post-mortem analysis
42 if atf_config_has artifacts_dir; then
43 TC_ARTIFACTS_DIR=`atf_config_get artifacts_dir`/cddl/usr.bin/ztest/$(atf_get ident)
44 mkdir -p $TC_ARTIFACTS_DIR
45 TC_CORE_DIR=/var/crash
46 if atf_config_has core_dir; then
47 TC_CORE_DIR=`atf_config_get core_dir`
49 mv *ztest*.core* $TC_ARTIFACTS_DIR || true
50 mv ${TC_CORE_DIR}/*ztest*.core* $TC_ARTIFACTS_DIR || true