Skip to contentSkip to conversation

common/ublk: allow to run ublk test without building miniublk

PATCH Applied Ming Lei 2 participants 2 messages Nov 13, 2023 – Nov 17, 2023 Block layer

lore
Share & tools
lore

Ming Lei

author
#0 lore raw

PATCH 1/1 common/ublk: allow to run ublk test without building miniublk

Now rublk is enough for supporting ublk test, not necessary to build miniublk any more.

Convert ublk common helpers into ${UBLK_PROG}.

---
 common/ublk | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
common/ublk +4 -4
index 8278d56..5ccbb50 100644
@@ -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() {
Signature · 1 line
2.41.0
#1 lore raw
Quoted 6 lines · Ming Lei

Now rublk is enough for supporting ublk test, not necessary to build miniublk any more.

Convert ublk common helpers into ${UBLK_PROG}.

I've applied it with a minor edit to make shellcheck happy. Thanks!