linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] test_kho: always print restore status
@ 2025-11-18 18:10 Pratyush Yadav
  2025-11-18 20:31 ` Pasha Tatashin
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Pratyush Yadav @ 2025-11-18 18:10 UTC (permalink / raw)
  To: Andrew Morton, Alexander Graf, Mike Rapoport, Pasha Tatashin,
	Pratyush Yadav
  Cc: kexec, linux-mm, linux-kernel

Currently the KHO test only prints a message on success, and remains
silent on failure. This makes it difficult to notice a failing test. A
failing test is usually more interesting than a successful one.

Always print the test status after attempting restore.

Signed-off-by: Pratyush Yadav <pratyush@kernel.org>
---
 lib/test_kho.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/lib/test_kho.c b/lib/test_kho.c
index 85b60d87a50ad..47de562807955 100644
--- a/lib/test_kho.c
+++ b/lib/test_kho.c
@@ -306,7 +306,6 @@ static int kho_test_restore(phys_addr_t fdt_phys)
 	if (err)
 		return err;
 
-	pr_info("KHO restore succeeded\n");
 	return 0;
 }
 
@@ -319,8 +318,15 @@ static int __init kho_test_init(void)
 		return 0;
 
 	err = kho_retrieve_subtree(KHO_TEST_FDT, &fdt_phys);
-	if (!err)
-		return kho_test_restore(fdt_phys);
+	if (!err) {
+		err = kho_test_restore(fdt_phys);
+		if (err)
+			pr_err("KHO restore failed\n");
+		else
+			pr_info("KHO restore succeeded\n");
+
+		return err;
+	}
 
 	if (err != -ENOENT) {
 		pr_warn("failed to retrieve %s FDT: %d\n", KHO_TEST_FDT, err);

base-commit: f0bfdc2b69f5c600b88ee484c01b213712c63d94
-- 
2.47.3



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

* Re: [PATCH] test_kho: always print restore status
  2025-11-18 18:10 [PATCH] test_kho: always print restore status Pratyush Yadav
@ 2025-11-18 20:31 ` Pasha Tatashin
  2025-11-19  7:13 ` Mike Rapoport
  2025-11-20  1:18 ` SeongJae Park
  2 siblings, 0 replies; 4+ messages in thread
From: Pasha Tatashin @ 2025-11-18 20:31 UTC (permalink / raw)
  To: Pratyush Yadav
  Cc: Andrew Morton, Alexander Graf, Mike Rapoport, kexec, linux-mm,
	linux-kernel

On Tue, Nov 18, 2025 at 1:10 PM Pratyush Yadav <pratyush@kernel.org> wrote:
>
> Currently the KHO test only prints a message on success, and remains
> silent on failure. This makes it difficult to notice a failing test. A
> failing test is usually more interesting than a successful one.
>
> Always print the test status after attempting restore.
>
> Signed-off-by: Pratyush Yadav <pratyush@kernel.org>

Reviewed-by: Pasha Tatashin <pasha.tatashin@soleen.com>


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

* Re: [PATCH] test_kho: always print restore status
  2025-11-18 18:10 [PATCH] test_kho: always print restore status Pratyush Yadav
  2025-11-18 20:31 ` Pasha Tatashin
@ 2025-11-19  7:13 ` Mike Rapoport
  2025-11-20  1:18 ` SeongJae Park
  2 siblings, 0 replies; 4+ messages in thread
From: Mike Rapoport @ 2025-11-19  7:13 UTC (permalink / raw)
  To: Pratyush Yadav
  Cc: Andrew Morton, Alexander Graf, Pasha Tatashin, kexec, linux-mm,
	linux-kernel

On Tue, Nov 18, 2025 at 07:10:45PM +0100, Pratyush Yadav wrote:
> Currently the KHO test only prints a message on success, and remains
> silent on failure. This makes it difficult to notice a failing test. A
> failing test is usually more interesting than a successful one.
> 
> Always print the test status after attempting restore.
> 
> Signed-off-by: Pratyush Yadav <pratyush@kernel.org>

Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.org>

> ---
>  lib/test_kho.c | 12 +++++++++---
>  1 file changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/lib/test_kho.c b/lib/test_kho.c
> index 85b60d87a50ad..47de562807955 100644
> --- a/lib/test_kho.c
> +++ b/lib/test_kho.c
> @@ -306,7 +306,6 @@ static int kho_test_restore(phys_addr_t fdt_phys)
>  	if (err)
>  		return err;
>  
> -	pr_info("KHO restore succeeded\n");
>  	return 0;
>  }
>  
> @@ -319,8 +318,15 @@ static int __init kho_test_init(void)
>  		return 0;
>  
>  	err = kho_retrieve_subtree(KHO_TEST_FDT, &fdt_phys);
> -	if (!err)
> -		return kho_test_restore(fdt_phys);
> +	if (!err) {
> +		err = kho_test_restore(fdt_phys);
> +		if (err)
> +			pr_err("KHO restore failed\n");
> +		else
> +			pr_info("KHO restore succeeded\n");
> +
> +		return err;
> +	}
>  
>  	if (err != -ENOENT) {
>  		pr_warn("failed to retrieve %s FDT: %d\n", KHO_TEST_FDT, err);
> 
> base-commit: f0bfdc2b69f5c600b88ee484c01b213712c63d94
> -- 
> 2.47.3
> 

-- 
Sincerely yours,
Mike.


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

* Re: [PATCH] test_kho: always print restore status
  2025-11-18 18:10 [PATCH] test_kho: always print restore status Pratyush Yadav
  2025-11-18 20:31 ` Pasha Tatashin
  2025-11-19  7:13 ` Mike Rapoport
@ 2025-11-20  1:18 ` SeongJae Park
  2 siblings, 0 replies; 4+ messages in thread
From: SeongJae Park @ 2025-11-20  1:18 UTC (permalink / raw)
  To: Pratyush Yadav
  Cc: SeongJae Park, Andrew Morton, Alexander Graf, Mike Rapoport,
	Pasha Tatashin, kexec, linux-mm, linux-kernel, SeongJae Park

On Tue, 18 Nov 2025 19:10:45 +0100 Pratyush Yadav <pratyush@kernel.org> wrote:

> Currently the KHO test only prints a message on success, and remains
> silent on failure. This makes it difficult to notice a failing test. A
> failing test is usually more interesting than a successful one.
> 
> Always print the test status after attempting restore.
> 
> Signed-off-by: Pratyush Yadav <pratyush@kernel.org>

Acked-by: SeongJae Park <sj@kerneel.org>


Thanks,
SJ

[...]


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

end of thread, other threads:[~2025-11-20  1:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-18 18:10 [PATCH] test_kho: always print restore status Pratyush Yadav
2025-11-18 20:31 ` Pasha Tatashin
2025-11-19  7:13 ` Mike Rapoport
2025-11-20  1:18 ` SeongJae Park

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox