Skip to content

Commit 1104746

Browse files
prati0100akpm00
authored andcommitted
test_kho: always print restore status
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. Link: https://lkml.kernel.org/r/20251118181046.23321-1-pratyush@kernel.org Signed-off-by: Pratyush Yadav <pratyush@kernel.org> Reviewed-by: Pasha Tatashin <pasha.tatashin@soleen.com> Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.org> Acked-by: SeongJae Park <sj@kerneel.org> Cc: Alexander Graf <graf@amazon.com> Cc: Pratyush Yadav <pratyush@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent b155151 commit 1104746

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

lib/test_kho.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,6 @@ static int kho_test_restore(phys_addr_t fdt_phys)
306306
if (err)
307307
return err;
308308

309-
pr_info("KHO restore succeeded\n");
310309
return 0;
311310
}
312311

@@ -319,8 +318,15 @@ static int __init kho_test_init(void)
319318
return 0;
320319

321320
err = kho_retrieve_subtree(KHO_TEST_FDT, &fdt_phys);
322-
if (!err)
323-
return kho_test_restore(fdt_phys);
321+
if (!err) {
322+
err = kho_test_restore(fdt_phys);
323+
if (err)
324+
pr_err("KHO restore failed\n");
325+
else
326+
pr_info("KHO restore succeeded\n");
327+
328+
return err;
329+
}
324330

325331
if (err != -ENOENT) {
326332
pr_warn("failed to retrieve %s FDT: %d\n", KHO_TEST_FDT, err);

0 commit comments

Comments
 (0)