From a3026baf6c50ba1902aeb7732844806b59cde162 Mon Sep 17 00:00:00 2001 From: Damien Le Moal Date: Wed, 5 Sep 2018 17:02:37 +0900 Subject: [PATCH] zbd: Fix test scripts 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 Signed-off-by: Damien Le Moal Signed-off-by: Jens Axboe --- t/zbd/run-tests-against-regular-nullb | 4 +++- t/zbd/run-tests-against-zoned-nullb | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/t/zbd/run-tests-against-regular-nullb b/t/zbd/run-tests-against-regular-nullb index 133c7c41..0f6e4b66 100755 --- a/t/zbd/run-tests-against-regular-nullb +++ b/t/zbd/run-tests-against-regular-nullb @@ -4,6 +4,8 @@ # # 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 $? @@ -22,4 +24,4 @@ modprobe null_blk nr_devices=0 && echo 1 > memory_backed && echo 1 > power -"$(dirname "$0")"/test-zbd-support "$@" /dev/nullb0 +"${scriptdir}"/test-zbd-support "$@" /dev/nullb0 diff --git a/t/zbd/run-tests-against-zoned-nullb b/t/zbd/run-tests-against-zoned-nullb index 7d9eb439..9336716d 100755 --- a/t/zbd/run-tests-against-zoned-nullb +++ b/t/zbd/run-tests-against-zoned-nullb @@ -4,6 +4,8 @@ # # 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 $? @@ -24,4 +26,4 @@ modprobe null_blk nr_devices=0 && echo 1 > memory_backed && echo 1 > power -"$(dirname "$0")"/test-zbd-support "$@" /dev/nullb0 +"${scriptdir}"/test-zbd-support "$@" /dev/nullb0 -- 2.25.1