Skip to content

Commit 58eec4f

Browse files
calebsanderaxboe
authored andcommitted
selftests: ublk: fix fio arguments in run_io_and_recover()
run_io_and_recover() invokes fio with --size="${size}", but the variable size doesn't exist. Thus, the argument expands to --size=, which causes fio to exit immediately with an error without issuing any I/O. Pass the value for size as the first argument to the function. Signed-off-by: Caleb Sander Mateos <csander@purestorage.com> Reviewed-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent fe8c018 commit 58eec4f

4 files changed

Lines changed: 6 additions & 5 deletions

File tree

tools/testing/selftests/ublk/test_common.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,11 +333,12 @@ run_io_and_kill_daemon()
333333

334334
run_io_and_recover()
335335
{
336-
local action=$1
336+
local size=$1
337+
local action=$2
337338
local state
338339
local dev_id
339340

340-
shift 1
341+
shift 2
341342
dev_id=$(_add_ublk_dev "$@")
342343
_check_add_dev "$TID" $?
343344

tools/testing/selftests/ublk/test_generic_04.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ERR_CODE=0
88

99
ublk_run_recover_test()
1010
{
11-
run_io_and_recover "kill_daemon" "$@"
11+
run_io_and_recover 256M "kill_daemon" "$@"
1212
ERR_CODE=$?
1313
if [ ${ERR_CODE} -ne 0 ]; then
1414
echo "$TID failure: $*"

tools/testing/selftests/ublk/test_generic_05.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ERR_CODE=0
88

99
ublk_run_recover_test()
1010
{
11-
run_io_and_recover "kill_daemon" "$@"
11+
run_io_and_recover 256M "kill_daemon" "$@"
1212
ERR_CODE=$?
1313
if [ ${ERR_CODE} -ne 0 ]; then
1414
echo "$TID failure: $*"

tools/testing/selftests/ublk/test_generic_11.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ERR_CODE=0
88

99
ublk_run_quiesce_recover()
1010
{
11-
run_io_and_recover "quiesce_dev" "$@"
11+
run_io_and_recover 256M "quiesce_dev" "$@"
1212
ERR_CODE=$?
1313
if [ ${ERR_CODE} -ne 0 ]; then
1414
echo "$TID failure: $*"

0 commit comments

Comments
 (0)