mirror of
https://github.com/versity/scoutfs.git
synced 2026-09-20 15:04:42 +00:00
The first commit of the scoutfs-tests suite which uses multiple mounts on one host to test multi-node scoutfs. Signed-off-by: Zach Brown <zab@versity.com>
26 lines
551 B
Bash
26 lines
551 B
Bash
|
|
#
|
|
# Make sure that all the base command arguments are found in the path.
|
|
# This isn't strictly necessary as the test will naturally fail if the
|
|
# command isn't found, but it's nice to fail fast and clearly
|
|
# communicate why.
|
|
#
|
|
t_require_commands() {
|
|
local c
|
|
|
|
for c in "$@"; do
|
|
which "$c" >/dev/null 2>&1 || \
|
|
t_fail "command $c not found in path"
|
|
done
|
|
}
|
|
|
|
#
|
|
# make sure that we have at least this many mounts
|
|
#
|
|
t_require_mounts() {
|
|
local req="1"
|
|
|
|
test "$T_NR_MOUNTS" -ge "$req" || \
|
|
t_fail "$req mounts required, only have $T_NR_MOUNTS"
|
|
}
|