diff mbox series

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

Message ID 20231113133503.2768452-1-ming.lei@redhat.com (mailing list archive)
State New, archived
Headers show
Series common/ublk: allow to run ublk test without building miniublk | expand

Commit Message

Ming Lei Nov. 13, 2023, 1:35 p.m. UTC
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>
---
 common/ublk | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Shin'ichiro Kawasaki Nov. 17, 2023, 7:27 a.m. UTC | #1
On Nov 13, 2023 / 21:35, Ming Lei wrote:
> 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>

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

Patch

diff --git a/common/ublk b/common/ublk
index 8278d56..5ccbb50 100644
--- a/common/ublk
+++ b/common/ublk
@@ -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() {