All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 6.15 0/2] selftests: ublk: two fixes
@ 2025-04-21 23:59 Ming Lei
  2025-04-21 23:59 ` [PATCH 6.15 1/2] selftests: ublk: fix recover test Ming Lei
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Ming Lei @ 2025-04-21 23:59 UTC (permalink / raw)
  To: Jens Axboe, linux-block; +Cc: Uday Shankar, Ming Lei

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(-)

-- 
2.47.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 6.15 1/2] selftests: ublk: fix recover test
  2025-04-21 23:59 [PATCH 6.15 0/2] selftests: ublk: two fixes Ming Lei
@ 2025-04-21 23:59 ` Ming Lei
  2025-04-22  0:07   ` Uday Shankar
  2025-04-21 23:59 ` [PATCH 6.15 2/2] selftests: ublk: remove useless 'delay_us' from 'struct dev_ctx' Ming Lei
  2025-04-23 20:00 ` [PATCH 6.15 0/2] selftests: ublk: two fixes Jens Axboe
  2 siblings, 1 reply; 6+ messages in thread
From: Ming Lei @ 2025-04-21 23:59 UTC (permalink / raw)
  To: Jens Axboe, linux-block; +Cc: Uday Shankar, Ming Lei

When adding recovery test:

- 'break' is missed for handling '-g' argument

- test name of test_generic_05.sh is wrong

So fix the two.

Fixes: 57e13a2e8cd2 ("selftests: ublk: support user recovery")
Signed-off-by: Ming Lei <ming.lei@redhat.com>
---
 tools/testing/selftests/ublk/kublk.c            | 1 +
 tools/testing/selftests/ublk/test_generic_05.sh | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/ublk/kublk.c b/tools/testing/selftests/ublk/kublk.c
index 759f06637146..e57a1486bb48 100644
--- a/tools/testing/selftests/ublk/kublk.c
+++ b/tools/testing/selftests/ublk/kublk.c
@@ -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);
diff --git a/tools/testing/selftests/ublk/test_generic_05.sh b/tools/testing/selftests/ublk/test_generic_05.sh
index 714630b4b329..3bb00a347402 100755
--- a/tools/testing/selftests/ublk/test_generic_05.sh
+++ b/tools/testing/selftests/ublk/test_generic_05.sh
@@ -3,7 +3,7 @@
 
 . "$(cd "$(dirname "$0")" && pwd)"/test_common.sh
 
-TID="generic_04"
+TID="generic_05"
 ERR_CODE=0
 
 ublk_run_recover_test()
-- 
2.47.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 6.15 2/2] selftests: ublk: remove useless 'delay_us' from 'struct dev_ctx'
  2025-04-21 23:59 [PATCH 6.15 0/2] selftests: ublk: two fixes Ming Lei
  2025-04-21 23:59 ` [PATCH 6.15 1/2] selftests: ublk: fix recover test Ming Lei
@ 2025-04-21 23:59 ` Ming Lei
  2025-04-22  0:07   ` Uday Shankar
  2025-04-23 20:00 ` [PATCH 6.15 0/2] selftests: ublk: two fixes Jens Axboe
  2 siblings, 1 reply; 6+ messages in thread
From: Ming Lei @ 2025-04-21 23:59 UTC (permalink / raw)
  To: Jens Axboe, linux-block; +Cc: Uday Shankar, 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.

Fixes: 81586652bb1f ("selftests: ublk: add generic_06 for covering fault inject")
Signed-off-by: Ming Lei <ming.lei@redhat.com>
---
 tools/testing/selftests/ublk/kublk.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/tools/testing/selftests/ublk/kublk.h b/tools/testing/selftests/ublk/kublk.h
index 29571eb296f1..918db5cd633f 100644
--- a/tools/testing/selftests/ublk/kublk.h
+++ b/tools/testing/selftests/ublk/kublk.h
@@ -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;
 
-- 
2.47.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 6.15 1/2] selftests: ublk: fix recover test
  2025-04-21 23:59 ` [PATCH 6.15 1/2] selftests: ublk: fix recover test Ming Lei
@ 2025-04-22  0:07   ` Uday Shankar
  0 siblings, 0 replies; 6+ messages in thread
From: Uday Shankar @ 2025-04-22  0:07 UTC (permalink / raw)
  To: Ming Lei; +Cc: Jens Axboe, linux-block

On Tue, Apr 22, 2025 at 07:59:41AM +0800, Ming Lei wrote:
> When adding recovery test:
> 
> - 'break' is missed for handling '-g' argument
> 
> - test name of test_generic_05.sh is wrong
> 
> So fix the two.
> 
> Fixes: 57e13a2e8cd2 ("selftests: ublk: support user recovery")
> Signed-off-by: Ming Lei <ming.lei@redhat.com>

Reviewed-by: Uday Shankar <ushankar@purestorage.com>

> ---
>  tools/testing/selftests/ublk/kublk.c            | 1 +
>  tools/testing/selftests/ublk/test_generic_05.sh | 2 +-
>  2 files changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/ublk/kublk.c b/tools/testing/selftests/ublk/kublk.c
> index 759f06637146..e57a1486bb48 100644
> --- a/tools/testing/selftests/ublk/kublk.c
> +++ b/tools/testing/selftests/ublk/kublk.c
> @@ -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);
> diff --git a/tools/testing/selftests/ublk/test_generic_05.sh b/tools/testing/selftests/ublk/test_generic_05.sh
> index 714630b4b329..3bb00a347402 100755
> --- a/tools/testing/selftests/ublk/test_generic_05.sh
> +++ b/tools/testing/selftests/ublk/test_generic_05.sh
> @@ -3,7 +3,7 @@
>  
>  . "$(cd "$(dirname "$0")" && pwd)"/test_common.sh
>  
> -TID="generic_04"
> +TID="generic_05"
>  ERR_CODE=0
>  
>  ublk_run_recover_test()
> -- 
> 2.47.0
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 6.15 2/2] selftests: ublk: remove useless 'delay_us' from 'struct dev_ctx'
  2025-04-21 23:59 ` [PATCH 6.15 2/2] selftests: ublk: remove useless 'delay_us' from 'struct dev_ctx' Ming Lei
@ 2025-04-22  0:07   ` Uday Shankar
  0 siblings, 0 replies; 6+ messages in thread
From: Uday Shankar @ 2025-04-22  0:07 UTC (permalink / raw)
  To: Ming Lei; +Cc: Jens Axboe, linux-block

On Tue, Apr 22, 2025 at 07:59:42AM +0800, Ming Lei wrote:
> '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.
> 
> Fixes: 81586652bb1f ("selftests: ublk: add generic_06 for covering fault inject")
> Signed-off-by: Ming Lei <ming.lei@redhat.com>

Reviewed-by: Uday Shankar <ushankar@purestorage.com>

> ---
>  tools/testing/selftests/ublk/kublk.h | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/tools/testing/selftests/ublk/kublk.h b/tools/testing/selftests/ublk/kublk.h
> index 29571eb296f1..918db5cd633f 100644
> --- a/tools/testing/selftests/ublk/kublk.h
> +++ b/tools/testing/selftests/ublk/kublk.h
> @@ -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;
>  
> -- 
> 2.47.0
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 6.15 0/2] selftests: ublk: two fixes
  2025-04-21 23:59 [PATCH 6.15 0/2] selftests: ublk: two fixes Ming Lei
  2025-04-21 23:59 ` [PATCH 6.15 1/2] selftests: ublk: fix recover test Ming Lei
  2025-04-21 23:59 ` [PATCH 6.15 2/2] selftests: ublk: remove useless 'delay_us' from 'struct dev_ctx' Ming Lei
@ 2025-04-23 20:00 ` Jens Axboe
  2 siblings, 0 replies; 6+ messages in thread
From: Jens Axboe @ 2025-04-23 20:00 UTC (permalink / raw)
  To: linux-block, Ming Lei; +Cc: Uday Shankar


On Tue, 22 Apr 2025 07:59:40 +0800, Ming Lei wrote:
> 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'
> 
> [...]

Applied, thanks!

[1/2] selftests: ublk: fix recover test
      commit: 5533bc70aedc7c9872841ac8649344f8cbc6bc4c
[2/2] selftests: ublk: remove useless 'delay_us' from 'struct dev_ctx'
      commit: 8f503637898313c048bf21e386e09be90e30cc31

Best regards,
-- 
Jens Axboe




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-04-23 20:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-21 23:59 [PATCH 6.15 0/2] selftests: ublk: two fixes Ming Lei
2025-04-21 23:59 ` [PATCH 6.15 1/2] selftests: ublk: fix recover test Ming Lei
2025-04-22  0:07   ` Uday Shankar
2025-04-21 23:59 ` [PATCH 6.15 2/2] selftests: ublk: remove useless 'delay_us' from 'struct dev_ctx' Ming Lei
2025-04-22  0:07   ` Uday Shankar
2025-04-23 20:00 ` [PATCH 6.15 0/2] selftests: ublk: two fixes Jens Axboe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.