]> www.infradead.org Git - users/sagi/blktests.git/commitdiff
block/033: additional fix
authorShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Tue, 23 Apr 2024 04:35:26 +0000 (13:35 +0900)
committerShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Tue, 23 Apr 2024 06:37:43 +0000 (15:37 +0900)
The previous commit moved the UBLK_PROG definition from tests/ublk/rc to
common/ublk end. Move that again from common/ublk end to start. Also,
the UBLK_PROG local variable in block/033 is no longer required. Remove
it.

Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
common/ublk
tests/block/033

index c065db21aaddc59587b6c8654f71917e243b7719..7f12b81d10c12e4ed488e631e00e66ab67f3a4e8 100644 (file)
@@ -6,6 +6,12 @@
 
 . common/shellcheck
 
+if which rublk > /dev/null 2>&1; then
+       export UBLK_PROG="src/rublk_wrapper.sh"
+else
+       export UBLK_PROG="src/miniublk"
+fi
+
 _have_ublk() {
        _have_driver ublk_drv
        _have_program "${UBLK_PROG}"
@@ -40,9 +46,3 @@ _exit_ublk() {
        udevadm settle
        modprobe -r -q ublk_drv
 }
-
-if which rublk > /dev/null 2>&1; then
-       export UBLK_PROG="src/rublk_wrapper.sh"
-else
-       export UBLK_PROG="src/miniublk"
-fi
index 510e1c56edd71c5a1a48d451984bbf9c1baf38be..d91d4269255ae160d9b8ec1522252e1f2d9d464b 100755 (executable)
@@ -17,8 +17,6 @@ requires() {
 }
 
 test() {
-       local UBLK_PROG="src/miniublk"
-
        echo "Running ${TEST_NAME}"
 
        if ! _init_ublk; then