bectl(8) tests: attempt to load the ZFS module

Observed in a CI test image, bectl_create test will run and be marked as
skipped because the module is not loaded. The first zpool invocation will
automagically load the module, but bectl_create is still skipped. Subsequent
tests all pass as expected because the module is now loaded and everything
is OK.

MFC after:	3 days
This commit is contained in:
Kyle Evans 2018-11-19 17:09:57 +00:00
parent 4ab5187d38
commit 6fc21012a3

View File

@ -34,7 +34,7 @@ bectl_create_setup()
disk=$2
mnt=$3
kldstat -qm zfs || atf_skip "ZFS module not loaded on the current system"
kldload -n -q zfs || atf_skip "ZFS module not loaded on the current system"
atf_check mkdir -p ${mnt}
atf_check truncate -s 1G ${disk}
atf_check zpool create -o altroot=${mnt} ${zpool} ${disk}