From owner-svn-src-stable@freebsd.org Thu Feb 13 20:46:06 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 70942234DD8; Thu, 13 Feb 2020 20:46:06 +0000 (UTC) (envelope-from asomers@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48JT7L2H11z4Y3g; Thu, 13 Feb 2020 20:46:06 +0000 (UTC) (envelope-from asomers@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 495F5189B0; Thu, 13 Feb 2020 20:46:06 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01DKk642005908; Thu, 13 Feb 2020 20:46:06 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01DKk6KO005907; Thu, 13 Feb 2020 20:46:06 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <202002132046.01DKk6KO005907@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 13 Feb 2020 20:46:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r357880 - stable/12/tests/sys/geom/class/eli X-SVN-Group: stable-12 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: stable/12/tests/sys/geom/class/eli X-SVN-Commit-Revision: 357880 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 20:46:06 -0000 Author: asomers Date: Thu Feb 13 20:46:05 2020 New Revision: 357880 URL: https://svnweb.freebsd.org/changeset/base/357880 Log: MFC r357211: geli: add a test case for attaching multiple providers with 1 command Reviewed by: cem Sponsored by: Axcient Differential Revision: https://reviews.freebsd.org/D23400 Modified: stable/12/tests/sys/geom/class/eli/attach_test.sh Directory Properties: stable/12/ (props changed) Modified: stable/12/tests/sys/geom/class/eli/attach_test.sh ============================================================================== --- stable/12/tests/sys/geom/class/eli/attach_test.sh Thu Feb 13 20:45:32 2020 (r357879) +++ stable/12/tests/sys/geom/class/eli/attach_test.sh Thu Feb 13 20:46:05 2020 (r357880) @@ -68,6 +68,36 @@ attach_r_cleanup() geli_test_cleanup } +atf_test_case attach_multiple cleanup +attach_multiple_head() +{ + atf_set "descr" "geli attach can attach multiple providers" + atf_set "require.user" "root" +} +attach_multiple_body() +{ + geli_test_setup + + sectors=100 + md0=$(attach_md -t malloc -s `expr $sectors + 1`) + md1=$(attach_md -t malloc -s `expr $sectors + 1`) + md2=$(attach_md -t malloc -s `expr $sectors + 1`) + atf_check dd if=/dev/random of=keyfile bs=512 count=16 status=none + + atf_check geli init -B none -P -K keyfile ${md0} + atf_check geli init -B none -P -K keyfile ${md1} + atf_check geli init -B none -P -K keyfile ${md2} + atf_check geli attach -p -k keyfile ${md0} ${md1} ${md2} + # verify that it did create all 3 geli devices + atf_check -s exit:0 test -c /dev/${md0}.eli + atf_check -s exit:0 test -c /dev/${md1}.eli + atf_check -s exit:0 test -c /dev/${md2}.eli +} +attach_multiple_cleanup() +{ + geli_test_cleanup +} + atf_test_case nokey cleanup nokey_head() { @@ -95,5 +125,6 @@ atf_init_test_cases() { atf_add_test_case attach_d atf_add_test_case attach_r + atf_add_test_case attach_multiple atf_add_test_case nokey }