Fix handling of the path to the test-zbd-support script to avoid an
error when the tests are run directly when in fio/t/zbd using the
command "./run-against...".
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
#
# This file is released under the GPL.
+scriptdir="$(cd "$(dirname "$0")" && pwd)"
+
for d in /sys/kernel/config/nullb/*; do [ -d "$d" ] && rmdir "$d"; done
modprobe -r null_blk
modprobe null_blk nr_devices=0 || return $?
echo 1 > memory_backed &&
echo 1 > power
-"$(dirname "$0")"/test-zbd-support "$@" /dev/nullb0
+"${scriptdir}"/test-zbd-support "$@" /dev/nullb0
#
# This file is released under the GPL.
+scriptdir="$(cd "$(dirname "$0")" && pwd)"
+
for d in /sys/kernel/config/nullb/*; do [ -d "$d" ] && rmdir "$d"; done
modprobe -r null_blk
modprobe null_blk nr_devices=0 || return $?
echo 1 > memory_backed &&
echo 1 > power
-"$(dirname "$0")"/test-zbd-support "$@" /dev/nullb0
+"${scriptdir}"/test-zbd-support "$@" /dev/nullb0