To achieve that a partition is busy, it is easiest to use it as swap partition. So check if mkswap, swapon, and swapoff are available.
Signed-off-by: Sebastian Parschauer <[email protected]> --- tests/t-lib-helpers.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/t-lib-helpers.sh b/tests/t-lib-helpers.sh index 9312343..962b4f1 100644 --- a/tests/t-lib-helpers.sh +++ b/tests/t-lib-helpers.sh @@ -362,6 +362,12 @@ require_xfs_() mkfs.xfs -V || skip_ "this test requires XFS support" } +require_swap_() +{ + mkswap -V && swapon -V && swapoff -V || \ + skip_ "this test requires swap support" +} + require_dvhtool_() { dvhtool --help \ -- 2.16.1

