diff options
Diffstat (limited to 'tests/t-lib-helpers.sh')
-rw-r--r-- | tests/t-lib-helpers.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/t-lib-helpers.sh b/tests/t-lib-helpers.sh index dddb44e..33151bb 100644 --- a/tests/t-lib-helpers.sh +++ b/tests/t-lib-helpers.sh @@ -418,3 +418,13 @@ require_64bit_() ;; esac } + +# Check if the specified filesystem is either built into the kernel, or can be loaded +# as a module +# Usage: has_filesystem vfat +# Ruturns 0 if the filesystem is available, otherwise skips the test +require_filesystem_() +{ + grep -q $1 /proc/filesystems && return 0 + modprobe --quiet --dry-run $1 || skip_ "this test requires kernel support for $1" +} |