selftests: ublk: two fixes
Subsystems (3)
cover selftests: ublk: two fixes
Hello Jens,
The 1st patch fixes recover test & ublk utility, and the 2nd patch removes one useless variable from 'struct dev_ctx', both are introduced recently.
Thanks,
Ming Lei (2):
selftests: ublk: fix recover test
selftests: ublk: remove useless 'delay_us' from 'struct dev_ctx'
tools/testing/selftests/ublk/kublk.c | 1 + tools/testing/selftests/ublk/kublk.h | 3 --- tools/testing/selftests/ublk/test_generic_05.sh | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-)
Signature · 1 line
2.47.0
PATCH 1/2 selftests: ublk: fix recover test
When adding recovery test:
- 'break' is missed for handling '-g' argument
- test name of test_generic_05.sh is wrong
So fix the two.
--- tools/testing/selftests/ublk/kublk.c | 1 + tools/testing/selftests/ublk/test_generic_05.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
tools/testing/selftests/ublk/kublk.c +1 -0
@@ -1354,6 +1354,7 @@ int main(int argc, char *argv[]) value =strtol (optarg,NULL ,10 );if (value) ctx.flags |=UBLK_F_NEED_GET_DATA ; +break ;case 0 :if (!strcmp (longopts[option_idx].name,"debug_mask" )) ublk_dbg_mask =strtol (optarg,NULL ,16 );
tools/testing/selftests/ublk/test_generic_05.sh +1 -1
@@ -3,7 +3,7 @@ . "$(cd "$(dirname "$0")" && pwd)"/test_common.sh -TID="generic_04" +TID="generic_05" ERR_CODE=0 ublk_run_recover_test()
Signature · 1 line
2.47.0
Re: [PATCH 6.15 1/2] selftests: ublk: fix recover test
Quoted 10 lines · Ming Lei
When adding recovery test:
- 'break' is missed for handling '-g' argument
- test name of
test_generic_05.shis wrongSo fix the two.
Fixes 57e13a2e8cd2 ("selftests: ublk: support user recovery")Signed-off-by Ming Lei <[email protected]>
Quoted 33 lines
--- tools/testing/selftests/ublk/kublk.c | 1 + tools/testing/selftests/ublk/test_generic_05.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)tools/testing/selftests/ublk/kublk.c +1
-0@@ -1354,6 +1354,7 @@ int main(int argc, char *argv[]) value =strtol (optarg,NULL ,10 );if (value) ctx.flags |=UBLK_F_NEED_GET_DATA ; +break ;case 0 :if (!strcmp (longopts[option_idx].name,"debug_mask" )) ublk_dbg_mask =strtol (optarg,NULL ,16 );tools/testing/selftests/ublk/test_generic_05.sh +1
-1@@ -3,7 +3,7 @@ . "$(cd "$(dirname "$0")" && pwd)"/test_common.sh -TID="generic_04" +TID="generic_05" ERR_CODE=0 ublk_run_recover_test()Signature · 1 line
2.47.0
PATCH 2/2 selftests: ublk: remove useless 'delay_us' from 'struct dev_ctx'
In reply to Ming Lei'delay_us' shouldn't be added to 'struct dev_ctx' since now it is handled by per-target command line & 'struct fault_inject_ctx'.
So remove it.
--- tools/testing/selftests/ublk/kublk.h | 3 --- 1 file changed, 3 deletions(-)
tools/testing/selftests/ublk/kublk.h +0 -3
@@ -86,9 +86,6 @@ struct dev_ctx { unsigned int fg:1; unsigned int recovery:1; -/* fault_inject */ -long long delay_us; -int _evtfd;int _shmid;
Signature · 1 line
2.47.0
Re: [PATCH 6.15 2/2] selftests: ublk: remove useless 'delay_us' from 'struct dev_ctx'
Quoted 7 lines · Ming Lei
'
delay_us' shouldn't be added to 'structdev_ctx' since now it is handled by per-target command line & 'structfault_inject_ctx'.So remove it.
Fixes 81586652bb1f ("selftests: ublk: add generic_06 for covering fault inject")Signed-off-by Ming Lei <[email protected]>
Quoted 21 lines
--- tools/testing/selftests/ublk/kublk.h | 3 --- 1 file changed, 3 deletions(-)tools/testing/selftests/ublk/kublk.h +0
-3@@ -86,9 +86,6 @@ struct dev_ctx { unsigned int fg:1; unsigned int recovery:1; -/* fault_inject */ -long long delay_us; -int _evtfd;int _shmid;Signature · 1 line
2.47.0
Quoted 10 lines · Ming Lei
The 1st patch fixes recover test & ublk utility, and the 2nd patch removes one useless variable from 'struct
dev_ctx', both are introduced recently.Thanks,
Ming Lei (2):
selftests: ublk: fix recover test
selftests: ublk: remove useless 'delay_us' from 'structdev_ctx'[...]
Applied, thanks!
[1/2] selftests: ublk: fix recover test
commit: 5533bc70aedc7c9872841ac8649344f8cbc6bc4c
[2/2] selftests: ublk: remove useless 'delay_us' from 'struct dev_ctx'
commit: 8f503637898313c048bf21e386e09be90e30cc31Best regards,
Signature · 1 line
Jens Axboe