aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRyan Moeller <[email protected]>2021-01-24 18:56:59 -0500
committerGitHub <[email protected]>2021-01-24 15:56:59 -0800
commita4acc47e4b52746233479716570d3a63e1dad29f (patch)
tree82cdb1db7fd06f204b4904c5f0ef09c1ed766965 /tests
parente2870fb24aff7a002d06022b2f264349a75458e6 (diff)
ZTS: Use swapctl to list swap devices on FreeBSD
Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Alexander Motin <[email protected]> Signed-off-by: Ryan Moeller <[email protected]> Closes #11503
Diffstat (limited to 'tests')
-rw-r--r--tests/zfs-tests/tests/functional/zvol/zvol_swap/zvol_swap.cfg2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/zfs-tests/tests/functional/zvol/zvol_swap/zvol_swap.cfg b/tests/zfs-tests/tests/functional/zvol/zvol_swap/zvol_swap.cfg
index 2ea8a4c72..54ecc18b5 100644
--- a/tests/zfs-tests/tests/functional/zvol/zvol_swap/zvol_swap.cfg
+++ b/tests/zfs-tests/tests/functional/zvol/zvol_swap/zvol_swap.cfg
@@ -35,6 +35,8 @@
#
if is_linux; then
SAVESWAPDEVS=$(swapon -s | nawk '(NR != 1) {print $1}')
+elif is_freebsd; then
+ SAVESWAPDEVS=$(swapctl -l | nawk '(NR != 1) {print $1}')
else
SAVESWAPDEVS=$(swap -l | nawk '(NR != 1) {print $1}')
fi