From owner-svn-src-all@freebsd.org Fri Dec 22 16:15:01 2017 Return-Path: Delivered-To: svn-src-all@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 EA967EA26D8; Fri, 22 Dec 2017 16:15:01 +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 B40AA7CA80; Fri, 22 Dec 2017 16:15:01 +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 vBMGF0SZ021425; Fri, 22 Dec 2017 16:15:00 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBMGF05r021424; Fri, 22 Dec 2017 16:15:00 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201712221615.vBMGF05r021424@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 22 Dec 2017 16:15:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327081 - stable/11/tests/sys/geom/class/nop X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/11/tests/sys/geom/class/nop X-SVN-Commit-Revision: 327081 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Dec 2017 16:15:02 -0000 Author: markj Date: Fri Dec 22 16:15:00 2017 New Revision: 327081 URL: https://svnweb.freebsd.org/changeset/base/327081 Log: MFC r326877: Skip gnop tests if the corresponding kernel module isn't available. Modified: stable/11/tests/sys/geom/class/nop/nop_test.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/tests/sys/geom/class/nop/nop_test.sh ============================================================================== --- stable/11/tests/sys/geom/class/nop/nop_test.sh Fri Dec 22 16:14:20 2017 (r327080) +++ stable/11/tests/sys/geom/class/nop/nop_test.sh Fri Dec 22 16:15:00 2017 (r327081) @@ -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 }