-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ublk/rc: prefer to rublk over miniublk
Add one wrapper script for using rublk to run ublk tests, and prefer to rublk because it is well implemented and more reliable. This way has been run for months in rublk's github CI test. https://github.com/ming1/rublk Signed-off-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
- Loading branch information
Showing
4 changed files
with
38 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/bash | ||
# SPDX-License-Identifier: GPL-3.0+ | ||
# Copyright (C) 2023 Ming Lei <ming.lei@redhat.com> | ||
# | ||
# rublk wrapper for adapting miniublk's command line | ||
|
||
PARA=() | ||
ACT=$1 | ||
for arg in "$@"; do | ||
if [ "$arg" = "-t" ]; then | ||
continue | ||
fi | ||
|
||
if [ "$ACT" = "recover" ]; then | ||
if [ "$arg" = "loop" ] || [ "$arg" = "null" ]; then | ||
continue; | ||
fi | ||
|
||
if [ -f "$arg" ]; then | ||
continue | ||
fi | ||
|
||
if [ "$arg" = "-f" ]; then | ||
continue | ||
fi | ||
PARA+=("$arg") | ||
else | ||
PARA+=("$arg") | ||
fi | ||
done | ||
rublk "${PARA[@]}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters