From nobody Sat Sep 2 19:40:06 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RdQGZ5wXVz4rrGQ; Sat, 2 Sep 2023 19:40:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RdQGZ5V9fz3YTX; Sat, 2 Sep 2023 19:40:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693683606; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8+RBkja4pWYFImRFIiDGIRE7l7Aptc9BtEvharK54ls=; b=frYC/h24c+OExuxY/S7LshVBMoMugg4IXM4O9+Z03rithr+WkgXSXYoYnY1m919E26f1d3 tXCvK8HSvh8W3R/6n1kCFBAJ0c9sFi0H61KrEPKwzc5XBdWxjfaRV7d9wl8gQUd1rCUSCl L0ug0mFtFg+8WL1RJJxCxDLIV5H5vjdLxr5W8SEXuB0MWz6GD6eBA+lwVJuUKtzFyalAES FefwgfevtlNZBO+a7ecf/IqN1RMAHItkExxlZtpgpOeW6ai7LtdrM9LIm4J0W7j6l+8hZn 2hmZJ6v01iSm1CzShE4Jju0DxWfLF9QV//Xk8E8kSuozDwO9/yWlSPB1BuCulg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693683606; a=rsa-sha256; cv=none; b=j8p8Ue91+1XXk5pOilE2tHxeGe5K8F9Bu5qqKg6HvWM5WgObAcbNSiPeMNxwQDj2UZ/J5L hoxsdeOfgqb0dbqfhgxVIbJ13cMFvLbnJtzw0yFPI80kTL/g0ytVsj63KgmNzBXesDhfq1 yye/S46ym763VutO2FaJgInWlXF2vSxr3GZSIzx7p/x5Vj/DsIqbXIG+z2mTHPekRkZghc c5rBia0X9YpU4/PMJd9NTl6heU3zKTlEm7xq7zwYDzdOk9LaS3sVOa6FJuJpQYw9plsLFE PuYfPveOHI6krptlx0o+V1bGEeT/k2fRR92i9MOHpRP6gKx+hwIgWf0Tca29hw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693683606; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8+RBkja4pWYFImRFIiDGIRE7l7Aptc9BtEvharK54ls=; b=QKbX0bzuH0zH++xfImGqn4bO25YncVab6UnR8Ec7ccKEvvcSfsOKVXanKmJU+gT69psckG Dhy396ZzHPvzD37K7uOpfKUl+WnMFeTtFYllosAe4PSEcTDZYJ9wgxRyxGDFLcDV1yEI5R 13JMEGAZUOmYOVz2loWhFAr2s0aXOd2NL3i0iMsxRDv5m2vzQtX7r7eAA5SZvUdUlwjk+J c+yGzMlbxNevUMDEZ3xZ5EIO68y1HzC51zIUJ9voJbQfFbZpOkuWI7amZA7WPT3IY3FXcR P8C2xM1la4GUNwaei3D3nsr/1Hi7cwlr3S6bIvBJgKNrHjGSDu4CFGD3Si7ExQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RdQGZ4b6czvsR; Sat, 2 Sep 2023 19:40:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 382Je6ZV028774; Sat, 2 Sep 2023 19:40:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 382Je6Hn028769; Sat, 2 Sep 2023 19:40:06 GMT (envelope-from git) Date: Sat, 2 Sep 2023 19:40:06 GMT Message-Id: <202309021940.382Je6Hn028769@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: ea82362219ee - main - tests: Skip all tests that require mdconfig when /dev/mdctl missing List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ea82362219ee715cfbb195b2114e73fdc8599fa5 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=ea82362219ee715cfbb195b2114e73fdc8599fa5 commit ea82362219ee715cfbb195b2114e73fdc8599fa5 Author: Warner Losh AuthorDate: 2023-09-02 19:12:31 +0000 Commit: Warner Losh CommitDate: 2023-09-02 19:16:22 +0000 tests: Skip all tests that require mdconfig when /dev/mdctl missing When run in a jail, /dev/mdctl is missing. So skip any tests that use mdconfig or mdmfs with md in this case: they can't possibly work. This is in line with other tests that test for presence of required features and skip if they aren't present. I did this instead of checking for jails so they can still run in jails that allow creation of md devices. Sponsored by: Netflix --- tests/sys/acl/00.sh | 4 ++++ tests/sys/acl/01.sh | 4 ++++ tests/sys/acl/02.sh | 4 ++++ tests/sys/acl/03.sh | 4 ++++ tests/sys/acl/04.sh | 4 ++++ tests/sys/cddl/zfs/tests/cache/cache_test.sh | 1 + tests/sys/geom/class/eli/conf.sh | 1 + tests/sys/geom/class/geom_subr.sh | 1 + tests/sys/geom/class/mirror/8_test.sh | 5 +++++ tests/sys/kern/sendfile_test.sh | 1 + tests/sys/mac/bsdextended/matches_test.sh | 1 + 11 files changed, 30 insertions(+) diff --git a/tests/sys/acl/00.sh b/tests/sys/acl/00.sh index 42b06cb8c484..5853aac2cac8 100644 --- a/tests/sys/acl/00.sh +++ b/tests/sys/acl/00.sh @@ -43,6 +43,10 @@ if [ $(id -u) -ne 0 ]; then echo "1..0 # SKIP you must be root" exit 0 fi +if [ ! -c /dev/mdctl ]; then + echo "1..0 # SKIP no /dev/mdctl to create md devices" + exit 0 +fi echo "1..4" diff --git a/tests/sys/acl/01.sh b/tests/sys/acl/01.sh index 3521ef37e663..044d1b81ab68 100644 --- a/tests/sys/acl/01.sh +++ b/tests/sys/acl/01.sh @@ -45,6 +45,10 @@ if [ $(id -u) -ne 0 ]; then echo "1..0 # SKIP you must be root" exit 0 fi +if [ ! -c /dev/mdctl ]; then + echo "1..0 # SKIP no /dev/mdctl to create md devices" + exit 0 +fi echo "1..4" diff --git a/tests/sys/acl/02.sh b/tests/sys/acl/02.sh index 069995d9906f..98fe1345b069 100644 --- a/tests/sys/acl/02.sh +++ b/tests/sys/acl/02.sh @@ -43,6 +43,10 @@ if [ $(id -u) -ne 0 ]; then echo "1..0 # SKIP you must be root" exit 0 fi +if [ ! -c /dev/mdctl ]; then + echo "1..0 # SKIP no /dev/mdctl to create md devices" + exit 0 +fi echo "1..4" diff --git a/tests/sys/acl/03.sh b/tests/sys/acl/03.sh index 2de58e31ba3a..4c85638ca8db 100644 --- a/tests/sys/acl/03.sh +++ b/tests/sys/acl/03.sh @@ -40,6 +40,10 @@ if [ $(id -u) -ne 0 ]; then echo "1..0 # SKIP you must be root" exit 0 fi +if [ ! -c /dev/mdctl ]; then + echo "1..0 # SKIP no /dev/mdctl to create md devices" + exit 0 +fi echo "1..5" diff --git a/tests/sys/acl/04.sh b/tests/sys/acl/04.sh index 33ce5ab9bc17..cfe4b1cb08a8 100644 --- a/tests/sys/acl/04.sh +++ b/tests/sys/acl/04.sh @@ -37,6 +37,10 @@ if [ $(id -u) -ne 0 ]; then echo "1..0 # SKIP you must be root" exit 0 fi +if [ ! -c /dev/mdctl ]; then + echo "1..0 # SKIP no /dev/mdctl to create md devices" + exit 0 +fi echo "1..3" diff --git a/tests/sys/cddl/zfs/tests/cache/cache_test.sh b/tests/sys/cddl/zfs/tests/cache/cache_test.sh index 4d77d9fa56a7..79b09dd93183 100755 --- a/tests/sys/cddl/zfs/tests/cache/cache_test.sh +++ b/tests/sys/cddl/zfs/tests/cache/cache_test.sh @@ -280,6 +280,7 @@ cache_010_neg_body() . $(atf_get_srcdir)/cache.kshlib . $(atf_get_srcdir)/cache.cfg + [ -c /dev/mdctl ] || atf_skip "no /dev/mdctl to create md devices" verify_disk_count "$DISKS" 1 ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/cache_010_neg.ksh || atf_fail "Testcase failed" diff --git a/tests/sys/geom/class/eli/conf.sh b/tests/sys/geom/class/eli/conf.sh index fe7c9c2528ea..a21e645f1637 100644 --- a/tests/sys/geom/class/eli/conf.sh +++ b/tests/sys/geom/class/eli/conf.sh @@ -8,6 +8,7 @@ attach_md() { local test_md + [ -c /dev/mdctl ] || atf_skip "no /dev/mdctl to create md devices" test_md=$(mdconfig -a "$@") || atf_fail "failed to allocate md(4)" echo $test_md >> $TEST_MDS_FILE || exit echo $test_md diff --git a/tests/sys/geom/class/geom_subr.sh b/tests/sys/geom/class/geom_subr.sh index 7e572ccd5175..f8eca4c6b220 100644 --- a/tests/sys/geom/class/geom_subr.sh +++ b/tests/sys/geom/class/geom_subr.sh @@ -16,6 +16,7 @@ attach_md() { local test_md + [ -c /dev/mdctl ] || atf_skip "no /dev/mdctl to create md devices" test_md=$(mdconfig -a "$@") || exit echo $test_md >> $TEST_MDS_FILE || exit echo $test_md diff --git a/tests/sys/geom/class/mirror/8_test.sh b/tests/sys/geom/class/mirror/8_test.sh index 21f6b83c85f7..5b3e5c3543a1 100644 --- a/tests/sys/geom/class/mirror/8_test.sh +++ b/tests/sys/geom/class/mirror/8_test.sh @@ -4,6 +4,11 @@ . `dirname $0`/conf.sh +if ! [ -c /dev/mdctl ]; then + echo "1..0 # SKIP no /dev/mdctl to create md devices" + exit 0 +fi + echo 1..1 ddbs=2048 diff --git a/tests/sys/kern/sendfile_test.sh b/tests/sys/kern/sendfile_test.sh index 03d2c882241c..2e9779d6779c 100755 --- a/tests/sys/kern/sendfile_test.sh +++ b/tests/sys/kern/sendfile_test.sh @@ -124,6 +124,7 @@ alloc_md() { local md + [ -c /dev/mdctl ] || atf_skip "no /dev/mdctl to create md devices" md=$(mdconfig -a -t swap -s 256M) || atf_fail "mdconfig -a failed" echo ${md} >> $MD_DEVS echo ${md} diff --git a/tests/sys/mac/bsdextended/matches_test.sh b/tests/sys/mac/bsdextended/matches_test.sh index 40774594fd18..2a28be0f231b 100644 --- a/tests/sys/mac/bsdextended/matches_test.sh +++ b/tests/sys/mac/bsdextended/matches_test.sh @@ -27,6 +27,7 @@ setup() { check_ko mkdir mnt + [ -c /dev/mdctl ] || atf_skip "no /dev/mdctl to create md devices" mdmfs -s 25m md mnt \ || atf_fail "failed to mount md device" chmod a+rwx mnt