]> www.infradead.org Git - users/sagi/blktests.git/commitdiff
common/ublk: allow to run ublk test without building miniublk
authorMing Lei <ming.lei@redhat.com>
Mon, 13 Nov 2023 13:35:03 +0000 (21:35 +0800)
committerShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Fri, 17 Nov 2023 05:22:14 +0000 (14:22 +0900)
Now `rublk` is enough for supporting ublk test, not necessary to build
miniublk any more.

Convert ublk common helpers into ${UBLK_PROG}.

Signed-off-by: Ming Lei <ming.lei@redhat.com>
[Shin'ichiro: fixed a shellcheck warning]
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
common/ublk

index 8278d56df72f691eeacc88a53dda3afcdf89f9f2..c4d1e34042adb3680ef0ba63c7aa624f459011ae 100644 (file)
@@ -8,19 +8,19 @@
 
 _have_ublk() {
        _have_driver ublk_drv
-       _have_src_program miniublk
+       _have_program "${UBLK_PROG}"
 }
 
 _remove_ublk_devices() {
-       src/miniublk del -a
+       ${UBLK_PROG} del -a
 }
 
 _get_ublk_dev_state() {
-       src/miniublk list -n "$1" | grep "state" | awk '{print $11}'
+       ${UBLK_PROG} list -n "$1" | grep "state" | awk '{print $11}'
 }
 
 _get_ublk_daemon_pid() {
-       src/miniublk list -n "$1" | grep "pid" | awk '{print $7}'
+       ${UBLK_PROG} list -n "$1" | grep "pid" | awk '{print $7}'
 }
 
 _init_ublk() {