From owner-svn-src-head@freebsd.org Fri Dec 15 17:10:52 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7366CE86AA0; Fri, 15 Dec 2017 17:10:52 +0000 (UTC) (envelope-from markj@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 mx1.freebsd.org (Postfix) with ESMTPS id 402DC7D62D; Fri, 15 Dec 2017 17:10:52 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBFHApt6086156; Fri, 15 Dec 2017 17:10:51 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBFHApAi086155; Fri, 15 Dec 2017 17:10:51 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201712151710.vBFHApAi086155@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 15 Dec 2017 17:10:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326877 - head/tests/sys/geom/class/nop X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/tests/sys/geom/class/nop X-SVN-Commit-Revision: 326877 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.25 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: Fri, 15 Dec 2017 17:10:52 -0000 Author: markj Date: Fri Dec 15 17:10:51 2017 New Revision: 326877 URL: https://svnweb.freebsd.org/changeset/base/326877 Log: Skip gnop tests if the corresponding kernel module isn't available. Reviewed by: asomers MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D13500 Modified: head/tests/sys/geom/class/nop/nop_test.sh Modified: head/tests/sys/geom/class/nop/nop_test.sh ============================================================================== --- head/tests/sys/geom/class/nop/nop_test.sh Fri Dec 15 12:37:32 2017 (r326876) +++ head/tests/sys/geom/class/nop/nop_test.sh Fri Dec 15 17:10:51 2017 (r326877) @@ -36,6 +36,7 @@ diskinfo_head() } diskinfo_body() { + load_gnop us=$(alloc_md) atf_check gnop create /dev/${us} md_secsize=$(diskinfo ${us} | cut -wf 2) @@ -62,6 +63,7 @@ io_head() } io_body() { + load_gnop us=$(alloc_md) atf_check gnop create /dev/${us} @@ -87,6 +89,7 @@ size_head() } size_body() { + load_gnop us=$(alloc_md) for mediasize in 65536 524288 1048576; do atf_check gnop create -s ${mediasize} /dev/${us} @@ -111,6 +114,7 @@ stripesize_head() } stripesize_body() { + load_gnop us=$(alloc_md) for ss in 512 1024 2048 4096 8192; do for sofs in `seq 0 512 ${ss}`; do @@ -163,4 +167,11 @@ common_cleanup() rm ${PLAINFILES} fi true +} + +load_gnop() +{ + if ! kldstat -q -m g_nop; then + geom nop load || atf_skip "could not load module for geom nop" + fi }