From owner-svn-src-head@freebsd.org Wed Aug 15 13:05:06 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2E9C41083D20; Wed, 15 Aug 2018 13:05:06 +0000 (UTC) (envelope-from will@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D84FA8B7A2; Wed, 15 Aug 2018 13:05:05 +0000 (UTC) (envelope-from will@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B98C429FF; Wed, 15 Aug 2018 13:05:05 +0000 (UTC) (envelope-from will@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7FD55fR022435; Wed, 15 Aug 2018 13:05:05 GMT (envelope-from will@FreeBSD.org) Received: (from will@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7FD54QJ022431; Wed, 15 Aug 2018 13:05:04 GMT (envelope-from will@FreeBSD.org) Message-Id: <201808151305.w7FD54QJ022431@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: will set sender to will@FreeBSD.org using -f From: Will Andrews Date: Wed, 15 Aug 2018 13:05:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r337840 - in head: cddl/usr.bin/ztest cddl/usr.bin/ztest/tests etc/mtree X-SVN-Group: head X-SVN-Commit-Author: will X-SVN-Commit-Paths: in head: cddl/usr.bin/ztest cddl/usr.bin/ztest/tests etc/mtree X-SVN-Commit-Revision: 337840 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2018 13:05:06 -0000 Author: will Date: Wed Aug 15 13:05:04 2018 New Revision: 337840 URL: https://svnweb.freebsd.org/changeset/base/337840 Log: zfs: add ztest to the kyua test suite. This program is currently failing, and has been for >6 months on HEAD. Ideally, this should be run 24x7 in CI, to discover hard-to-find bugs that only manifest with concurrent i/o. Requested by: lwhsu, mmacy Added: head/cddl/usr.bin/ztest/tests/ head/cddl/usr.bin/ztest/tests/Makefile (contents, props changed) head/cddl/usr.bin/ztest/tests/ztest.sh (contents, props changed) Modified: head/cddl/usr.bin/ztest/Makefile head/etc/mtree/BSD.tests.dist Modified: head/cddl/usr.bin/ztest/Makefile ============================================================================== --- head/cddl/usr.bin/ztest/Makefile Wed Aug 15 13:03:01 2018 (r337839) +++ head/cddl/usr.bin/ztest/Makefile Wed Aug 15 13:05:04 2018 (r337840) @@ -25,4 +25,7 @@ CSTD= c99 # it without debugging. CFLAGS+= -g -DDEBUG=1 -Wno-format +HAS_TESTS= +SUBDIR.${MK_TESTS}+= tests + .include Added: head/cddl/usr.bin/ztest/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/usr.bin/ztest/tests/Makefile Wed Aug 15 13:05:04 2018 (r337840) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +.include + +ATF_TESTS_SH+= ztest + +.include Added: head/cddl/usr.bin/ztest/tests/ztest.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/usr.bin/ztest/tests/ztest.sh Wed Aug 15 13:05:04 2018 (r337840) @@ -0,0 +1,52 @@ +# +# Test Case: ztest +# $FreeBSD$ +# +atf_test_case ztest +ztest_head() +{ + atf_set "descr" "Run ztest" + atf_set "timeout" 900 + atf_set "require.config" "rt_long" +} + +ztest_body() +{ + ARGS="-VVVVV -f ${TMPDIR:-/tmp}" + if atf_config_has ztest_extra_args; then + ARGS="${ARGS} $(atf_config_get ztest_extra_args)" + fi + ztest ${ARGS} + if [ $? != 0 ]; then + echo "failing" + save_ztest_artifacts + atf_fail "Testcase failed" + else + echo "passing" + atf_pass + fi +} + +# +# ATF Test Program Init Function +# +atf_init_test_cases() +{ + atf_add_test_case ztest +} + +save_ztest_artifacts() +{ + # If artifacts_dir is defined, save test artifacts for + # post-mortem analysis + if atf_config_has artifacts_dir; then + TC_ARTIFACTS_DIR=`atf_config_get artifacts_dir`/cddl/usr.bin/ztest/$(atf_get ident) + mkdir -p $TC_ARTIFACTS_DIR + TC_CORE_DIR=/var/crash + if atf_config_has core_dir; then + TC_CORE_DIR=`atf_config_get core_dir` + fi + mv *ztest*.core* $TC_ARTIFACTS_DIR || true + mv ${TC_CORE_DIR}/*ztest*.core* $TC_ARTIFACTS_DIR || true + fi +} Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Wed Aug 15 13:03:01 2018 (r337839) +++ head/etc/mtree/BSD.tests.dist Wed Aug 15 13:05:04 2018 (r337840) @@ -67,6 +67,8 @@ usr.bin ctfconvert .. + ztest + .. .. usr.sbin dtrace