summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authormarkj <markj@FreeBSD.org>2017-12-22 16:15:00 +0000
committermarkj <markj@FreeBSD.org>2017-12-22 16:15:00 +0000
commitbf1fc111ac5ab6873c61ebc694314dda9ed2c24e (patch)
tree4b62cc843ea368817e809aacc410840f4235eced /tests
parent53233529ef60d15cdd3ac6b89218add19e8d83ae (diff)
downloadFreeBSD-src-bf1fc111ac5ab6873c61ebc694314dda9ed2c24e.zip
FreeBSD-src-bf1fc111ac5ab6873c61ebc694314dda9ed2c24e.tar.gz
MFC r326877:
Skip gnop tests if the corresponding kernel module isn't available.
Diffstat (limited to 'tests')
-rw-r--r--tests/sys/geom/class/nop/nop_test.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/sys/geom/class/nop/nop_test.sh b/tests/sys/geom/class/nop/nop_test.sh
index 35cc191..edf5ac7 100644
--- a/tests/sys/geom/class/nop/nop_test.sh
+++ b/tests/sys/geom/class/nop/nop_test.sh
@@ -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
@@ -164,3 +168,10 @@ common_cleanup()
fi
true
}
+
+load_gnop()
+{
+ if ! kldstat -q -m g_nop; then
+ geom nop load || atf_skip "could not load module for geom nop"
+ fi
+}
OpenPOWER on IntegriCloud