From dfe5325c88eefce77070b9c1b84ed17455897309 Mon Sep 17 00:00:00 2001 From: Jan Michalski Date: Fri, 23 Oct 2026 15:49:12 +0000 Subject: [PATCH 1/7] DAOS-19846 dlck: various formatting fixes Signed-off-by: Jan Michalski --- src/common/btree.c | 12 +- src/include/daos/checker.h | 12 ++ src/utils/dlck/cmds/dlck_cmd_check.c | 3 +- .../dlck/tests/fault_injection_dlck.yaml | 2 +- .../DAOS_FAULT_CONT_INV_PAD/output.txt | 2 +- .../DAOS_FAULT_CONT_INV_PAD/{{UUID}}_vos-0 | 6 +- .../output.txt | 2 +- .../{{UUID}}_vos-0 | 6 +- .../DAOS_FAULT_CONT_INV_USED/output.txt | 2 +- .../DAOS_FAULT_CONT_INV_USED/{{UUID}}_vos-0 | 6 +- .../DAOS_FAULT_CONT_OPEN_UUID/{{UUID}}_vos-0 | 6 +- .../{{UUID}}_vos-0 | 3 +- .../{{UUID}}_vos-0 | 3 +- .../{{UUID}}_vos-0 | 3 +- .../DAOS_FAULT_DAE_INV_FLAGS/{{UUID}}_vos-0 | 5 +- .../DAOS_FAULT_DBD_COUNT/{{UUID}}_vos-0 | 5 +- .../DAOS_FAULT_DBD_MAGIC/{{UUID}}_vos-0 | 5 +- .../{{UUID}}_vos-0 | 6 +- .../{{UUID}}_vos-0 | 6 +- .../{{UUID}}_vos-0 | 6 +- .../DAOS_FAULT_OBJ_ILOG_MAGIC/{{UUID}}_vos-0 | 5 +- .../{{UUID}}_vos-0 | 109 +++++++++--------- .../{{UUID}}_vos-0 | 7 +- .../DLCK_FAULT_CONT_DOES_NOT_EXIST/output.txt | 3 +- .../{{UUID}}_vos-0 | 22 +++- .../DLCK_FAULT_ENGINE_JOIN/{{UUID}}_vos-0 | 5 +- .../DLCK_FAULT_POOL_NVME_HEALTH/output.txt | 11 +- .../{{UUID}}_vos-0 | 2 +- .../DLCK_FAULT_POOL_OPEN_BIO/output.txt | 12 +- .../DLCK_FAULT_POOL_OPEN_BIO/{{UUID}}_vos-0 | 21 +--- .../DLCK_FAULT_POOL_OPEN_MAGIC/{{UUID}}_vos-0 | 2 +- .../DLCK_FAULT_POOL_OPEN_UMEM/{{UUID}}_vos-0 | 2 +- .../DLCK_FAULT_POOL_OPEN_UUID/{{UUID}}_vos-0 | 2 +- .../{{UUID}}_vos-0 | 2 +- src/vos/vos_container.c | 14 ++- src/vos/vos_gc.c | 26 ++--- src/vos/vos_pool.c | 10 +- 37 files changed, 201 insertions(+), 155 deletions(-) diff --git a/src/common/btree.c b/src/common/btree.c index a04def665ab..678d97b93d6 100644 --- a/src/common/btree.c +++ b/src/common/btree.c @@ -4613,9 +4613,9 @@ btr_class_feats_init(unsigned int tree_class, uint64_t *tree_feats, struct btr_c #define TREE_CLASS_STR "Tree class... " #define TREE_FEATURES_STR "Tree features... " -#define INVALID_CLASS_FMT "Invalid class id: %d\n" -#define UNREGISTERED_CLASS_FMT "Unregistered class id %d\n" -#define UNSUPPORTED_FEATURES_FMT "Unsupported features " DF_X64 "/" DF_X64 "\n" +#define INVALID_CLASS_FMT "Invalid class id: %d" +#define UNREGISTERED_CLASS_FMT "Unregistered class id %d" +#define UNSUPPORTED_FEATURES_FMT "Unsupported features " DF_X64 "/" DF_X64 #define OK_STR "ok.\n" /** @@ -4654,14 +4654,14 @@ btr_class_init(umem_off_t root_off, struct btr_root *root, unsigned int tree_cla CK_PRINTF(ck, TREE_CLASS_STR); if (tree_class >= BTR_TYPE_MAX || DAOS_FAIL_CHECK(DAOS_FAULT_BTREE_OPEN_INV_CLASS)) { CK_APPENDFL_ERR(ck, INVALID_CLASS_FMT, tree_class); - D_DEBUG(DB_TRACE, INVALID_CLASS_FMT, tree_class); + D_DEBUG(DB_TRACE, INVALID_CLASS_FMT "\n", tree_class); return -DER_INVAL; } tc = &btr_class_registered[tree_class]; if (tc->tc_ops == NULL || DAOS_FAIL_CHECK(DAOS_FAULT_BTREE_OPEN_UNREG_CLASS)) { CK_APPENDFL_ERR(ck, UNREGISTERED_CLASS_FMT, tree_class); - D_DEBUG(DB_TRACE, UNREGISTERED_CLASS_FMT, tree_class); + D_DEBUG(DB_TRACE, UNREGISTERED_CLASS_FMT "\n", tree_class); return -DER_NONEXIST; } CK_APPENDL_OK(ck); @@ -4670,7 +4670,7 @@ btr_class_init(umem_off_t root_off, struct btr_root *root, unsigned int tree_cla rc = btr_class_feats_init(tree_class, tree_feats, tc); if (rc != DER_SUCCESS) { CK_APPENDFL_ERR(ck, UNSUPPORTED_FEATURES_FMT, *tree_feats, tc->tc_feats); - D_ERROR(UNSUPPORTED_FEATURES_FMT, *tree_feats, tc->tc_feats); + D_ERROR(UNSUPPORTED_FEATURES_FMT "\n", *tree_feats, tc->tc_feats); return rc; } CK_APPENDL_OK(ck); diff --git a/src/include/daos/checker.h b/src/include/daos/checker.h index 87849c54269..ff22fe37693 100644 --- a/src/include/daos/checker.h +++ b/src/include/daos/checker.h @@ -141,6 +141,12 @@ ck_common_printf(struct checker *ck, const char *fmt, ...) ++(ck)->ck_status.errors_num; \ } +#define CK_RC_SET(ck, rc) \ + if (IS_CHECKER(ck)) { \ + if ((ck)->ck_status.rc == DER_SUCCESS) \ + (ck)->ck_status.rc = (rc); \ + } + #define CK_APPENDFL_ERR(ck, fmt, ...) \ do { \ CK_PRINTF_WO_PREFIX(ck, CHECKER_ERROR_INFIX fmt "\n", ##__VA_ARGS__); \ @@ -173,6 +179,12 @@ ck_common_printf(struct checker *ck, const char *fmt, ...) CK_ERR_NUM_INC(ck); \ } while (0) +#define CK_PRINTF_WARN(ck, fmt, ...) \ + do { \ + CK_PRINTF(ck, CHECKER_WARNING_INFIX fmt, ##__VA_ARGS__); \ + CK_WARN_NUM_INC(ck); \ + } while (0) + /** * An assert while run without a checker. A checker message otherwise. * diff --git a/src/utils/dlck/cmds/dlck_cmd_check.c b/src/utils/dlck/cmds/dlck_cmd_check.c index 42373d3e341..61b71797283 100644 --- a/src/utils/dlck/cmds/dlck_cmd_check.c +++ b/src/utils/dlck/cmds/dlck_cmd_check.c @@ -21,7 +21,8 @@ #define REPORT_RESULT(CK, PREFIX_FMT, TGT_ID, UUID, RC, WARN_NUM) \ do { \ if (RC == DER_SUCCESS && WARN_NUM > 0) { \ - CK_PRINTF(CK, PREFIX_FMT CHECKER_OK_INFIX DLCK_WARNINGS_NUM_FMT ".\n", \ + CK_PRINTF(CK, \ + PREFIX_FMT ": " CHECKER_OK_INFIX DLCK_WARNINGS_NUM_FMT ".\n", \ TGT_ID, DP_UUID(UUID), WARN_NUM); \ } else { \ CK_PRINTFL_RC(CK, RC, PREFIX_FMT, TGT_ID, DP_UUID(UUID)); \ diff --git a/src/utils/dlck/tests/fault_injection_dlck.yaml b/src/utils/dlck/tests/fault_injection_dlck.yaml index 0f8bfebf7a0..454902ede02 100644 --- a/src/utils/dlck/tests/fault_injection_dlck.yaml +++ b/src/utils/dlck/tests/fault_injection_dlck.yaml @@ -25,7 +25,7 @@ fault_config: # - id: 131600 # DAOS_FAULT_GC_TREE_FEATURES # - id: 131593 # DAOS_FAULT_POOL_EXT_PADDING # - id: 131594 # DAOS_FAULT_POOL_EXT_RESERVED - # - id: 131344 # DLCK_FAULT_CONT_DOES_NOT_EXIST + # - id: 131346 # DLCK_FAULT_CONT_DOES_NOT_EXIST # - id: 131841 # DAOS_FAULT_CONT_OPEN_UUID # - id: 131842 # DAOS_FAULT_CONT_INV_PAD # - id: 131843 # DAOS_FAULT_CONT_INV_USED diff --git a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_INV_PAD/output.txt b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_INV_PAD/output.txt index dc140ddcb8f..a6940442431 100644 --- a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_INV_PAD/output.txt +++ b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_INV_PAD/output.txt @@ -5,7 +5,7 @@ Create pools directories... ok. Start targets... ok. Wait for targets to stop... [0] pool {{UUID}} check result: ok. -[0] container {{UUID}} check resultok (1 warning(s)). +[0] container {{UUID}} check result: ok (1 warning(s)). Wait for targets to stop: ok. Stop the engine... ok. =============================== diff --git a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_INV_PAD/{{UUID}}_vos-0 b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_INV_PAD/{{UUID}}_vos-0 index 03ab6f861a7..5de0ae61ae1 100644 --- a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_INV_PAD/{{UUID}}_vos-0 +++ b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_INV_PAD/{{UUID}}_vos-0 @@ -2,7 +2,7 @@ VOS file allocation: ok. Check pool: path: {{STORAGE}}/{{UUID}}/vos-0 uuid: {{UUID}} -- NVMe devices (if applicable): ok. +- NVMe devices (if applicable)... ok. - Open the pool: ok. - Magic... ok. - Version... ok. @@ -12,7 +12,8 @@ Check pool: -- Tree features... ok. -- Node (off=0xa7a4c0)... ok. - Containers tree: ok. -- Pool extension (off=0x400550)... ok. +- Pool extension (off=0x400550)... +- Pool extension (off=0x400550): ok. - Garbage collector's tree... -- Tree class... ok. -- Tree features... ok. @@ -23,7 +24,6 @@ Check container: uuid: {{UUID}} - uuid... ok. - Padding (cd_pad)... warning: non-zero (0) -ok. - Padding (cd_used)... ok. - Reserved (cd_reserv_upgrade)... ok. - Object index tree... diff --git a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_INV_RESERV_UPGRADE/output.txt b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_INV_RESERV_UPGRADE/output.txt index dc140ddcb8f..a6940442431 100644 --- a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_INV_RESERV_UPGRADE/output.txt +++ b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_INV_RESERV_UPGRADE/output.txt @@ -5,7 +5,7 @@ Create pools directories... ok. Start targets... ok. Wait for targets to stop... [0] pool {{UUID}} check result: ok. -[0] container {{UUID}} check resultok (1 warning(s)). +[0] container {{UUID}} check result: ok (1 warning(s)). Wait for targets to stop: ok. Stop the engine... ok. =============================== diff --git a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_INV_RESERV_UPGRADE/{{UUID}}_vos-0 b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_INV_RESERV_UPGRADE/{{UUID}}_vos-0 index f7bf5f5abad..76879c0bfcd 100644 --- a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_INV_RESERV_UPGRADE/{{UUID}}_vos-0 +++ b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_INV_RESERV_UPGRADE/{{UUID}}_vos-0 @@ -2,7 +2,7 @@ VOS file allocation: ok. Check pool: path: {{STORAGE}}/{{UUID}}/vos-0 uuid: {{UUID}} -- NVMe devices (if applicable): ok. +- NVMe devices (if applicable)... ok. - Open the pool: ok. - Magic... ok. - Version... ok. @@ -12,7 +12,8 @@ Check pool: -- Tree features... ok. -- Node (off=0xa7a4c0)... ok. - Containers tree: ok. -- Pool extension (off=0x400550)... ok. +- Pool extension (off=0x400550)... +- Pool extension (off=0x400550): ok. - Garbage collector's tree... -- Tree class... ok. -- Tree features... ok. @@ -25,7 +26,6 @@ Check container: - Padding (cd_pad)... ok. - Padding (cd_used)... ok. - Reserved (cd_reserv_upgrade)... warning: non-zero (0) -ok. - Object index tree... -- Tree class... ok. -- Tree features... ok. diff --git a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_INV_USED/output.txt b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_INV_USED/output.txt index dc140ddcb8f..a6940442431 100644 --- a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_INV_USED/output.txt +++ b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_INV_USED/output.txt @@ -5,7 +5,7 @@ Create pools directories... ok. Start targets... ok. Wait for targets to stop... [0] pool {{UUID}} check result: ok. -[0] container {{UUID}} check resultok (1 warning(s)). +[0] container {{UUID}} check result: ok (1 warning(s)). Wait for targets to stop: ok. Stop the engine... ok. =============================== diff --git a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_INV_USED/{{UUID}}_vos-0 b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_INV_USED/{{UUID}}_vos-0 index 68365bcf655..6c7815763f5 100644 --- a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_INV_USED/{{UUID}}_vos-0 +++ b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_INV_USED/{{UUID}}_vos-0 @@ -2,7 +2,7 @@ VOS file allocation: ok. Check pool: path: {{STORAGE}}/{{UUID}}/vos-0 uuid: {{UUID}} -- NVMe devices (if applicable): ok. +- NVMe devices (if applicable)... ok. - Open the pool: ok. - Magic... ok. - Version... ok. @@ -12,7 +12,8 @@ Check pool: -- Tree features... ok. -- Node (off=0xa7a4c0)... ok. - Containers tree: ok. -- Pool extension (off=0x400550)... ok. +- Pool extension (off=0x400550)... +- Pool extension (off=0x400550): ok. - Garbage collector's tree... -- Tree class... ok. -- Tree features... ok. @@ -24,7 +25,6 @@ Check container: - uuid... ok. - Padding (cd_pad)... ok. - Padding (cd_used)... warning: non-zero (0) -ok. - Reserved (cd_reserv_upgrade)... ok. - Object index tree... -- Tree class... ok. diff --git a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_OPEN_UUID/{{UUID}}_vos-0 b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_OPEN_UUID/{{UUID}}_vos-0 index 27efafd7bf8..a3c15a33f58 100644 --- a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_OPEN_UUID/{{UUID}}_vos-0 +++ b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_OPEN_UUID/{{UUID}}_vos-0 @@ -2,7 +2,7 @@ VOS file allocation: ok. Check pool: path: {{STORAGE}}/{{UUID}}/vos-0 uuid: {{UUID}} -- NVMe devices (if applicable): ok. +- NVMe devices (if applicable)... ok. - Open the pool: ok. - Magic... ok. - Version... ok. @@ -12,7 +12,8 @@ Check pool: -- Tree features... ok. -- Node (off=0xa7a4c0)... ok. - Containers tree: ok. -- Pool extension (off=0x400550)... ok. +- Pool extension (off=0x400550)... +- Pool extension (off=0x400550): ok. - Garbage collector's tree... -- Tree class... ok. -- Tree features... ok. @@ -22,5 +23,4 @@ Check pool: ok. Check container: uuid: {{UUID}} - uuid... error: mismatch ({{UUID}} != {{UUID}}) - error: Check container: DER_ID_MISMATCH(-2035): 'ID mismatch' diff --git a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_TREE_FEATURES/{{UUID}}_vos-0 b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_TREE_FEATURES/{{UUID}}_vos-0 index c0ce1f87e14..b883d39511c 100644 --- a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_TREE_FEATURES/{{UUID}}_vos-0 +++ b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_TREE_FEATURES/{{UUID}}_vos-0 @@ -2,7 +2,7 @@ VOS file allocation: ok. Check pool: path: {{STORAGE}}/{{UUID}}/vos-0 uuid: {{UUID}} -- NVMe devices (if applicable): ok. +- NVMe devices (if applicable)... ok. - Open the pool: ok. - Magic... ok. - Version... ok. @@ -10,5 +10,4 @@ Check pool: - Containers tree... -- Tree class... ok. -- Tree features... error: Unsupported features 0/0 - - error: Containers tree: DER_PROTO(-1014): 'Incompatible protocol' diff --git a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_TREE_INV_CLASS/{{UUID}}_vos-0 b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_TREE_INV_CLASS/{{UUID}}_vos-0 index c4ad851a4b9..73dd1c1d40f 100644 --- a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_TREE_INV_CLASS/{{UUID}}_vos-0 +++ b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_TREE_INV_CLASS/{{UUID}}_vos-0 @@ -2,12 +2,11 @@ VOS file allocation: ok. Check pool: path: {{STORAGE}}/{{UUID}}/vos-0 uuid: {{UUID}} -- NVMe devices (if applicable): ok. +- NVMe devices (if applicable)... ok. - Open the pool: ok. - Magic... ok. - Version... ok. - UUID... ok. - Containers tree... -- Tree class... error: Invalid class id: 14 - - error: Containers tree: DER_INVAL(-1003): 'Invalid parameters' diff --git a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_TREE_UNREG_CLASS/{{UUID}}_vos-0 b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_TREE_UNREG_CLASS/{{UUID}}_vos-0 index eb7ca62b479..879a1ff744c 100644 --- a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_TREE_UNREG_CLASS/{{UUID}}_vos-0 +++ b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_TREE_UNREG_CLASS/{{UUID}}_vos-0 @@ -2,12 +2,11 @@ VOS file allocation: ok. Check pool: path: {{STORAGE}}/{{UUID}}/vos-0 uuid: {{UUID}} -- NVMe devices (if applicable): ok. +- NVMe devices (if applicable)... ok. - Open the pool: ok. - Magic... ok. - Version... ok. - UUID... ok. - Containers tree... -- Tree class... error: Unregistered class id 14 - - error: Containers tree: DER_NONEXIST(-1005): 'The specified entity does not exist' diff --git a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_DAE_INV_FLAGS/{{UUID}}_vos-0 b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_DAE_INV_FLAGS/{{UUID}}_vos-0 index 4a67427d3d6..3f98f3bf181 100644 --- a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_DAE_INV_FLAGS/{{UUID}}_vos-0 +++ b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_DAE_INV_FLAGS/{{UUID}}_vos-0 @@ -2,7 +2,7 @@ VOS file allocation: ok. Check pool: path: {{STORAGE}}/{{UUID}}/vos-0 uuid: {{UUID}} -- NVMe devices (if applicable): ok. +- NVMe devices (if applicable)... ok. - Open the pool: ok. - Magic... ok. - Version... ok. @@ -12,7 +12,8 @@ Check pool: -- Tree features... ok. -- Node (off=0xa7a4c0)... ok. - Containers tree: ok. -- Pool extension (off=0x400550)... ok. +- Pool extension (off=0x400550)... +- Pool extension (off=0x400550): ok. - Garbage collector's tree... -- Tree class... ok. -- Tree features... ok. diff --git a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_DBD_COUNT/{{UUID}}_vos-0 b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_DBD_COUNT/{{UUID}}_vos-0 index 185e88945dc..bcd40573216 100644 --- a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_DBD_COUNT/{{UUID}}_vos-0 +++ b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_DBD_COUNT/{{UUID}}_vos-0 @@ -2,7 +2,7 @@ VOS file allocation: ok. Check pool: path: {{STORAGE}}/{{UUID}}/vos-0 uuid: {{UUID}} -- NVMe devices (if applicable): ok. +- NVMe devices (if applicable)... ok. - Open the pool: ok. - Magic... ok. - Version... ok. @@ -12,7 +12,8 @@ Check pool: -- Tree features... ok. -- Node (off=0xa7a4c0)... ok. - Containers tree: ok. -- Pool extension (off=0x400550)... ok. +- Pool extension (off=0x400550)... +- Pool extension (off=0x400550): ok. - Garbage collector's tree... -- Tree class... ok. -- Tree features... ok. diff --git a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_DBD_MAGIC/{{UUID}}_vos-0 b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_DBD_MAGIC/{{UUID}}_vos-0 index 2d0bc7a6147..78188113755 100644 --- a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_DBD_MAGIC/{{UUID}}_vos-0 +++ b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_DBD_MAGIC/{{UUID}}_vos-0 @@ -2,7 +2,7 @@ VOS file allocation: ok. Check pool: path: {{STORAGE}}/{{UUID}}/vos-0 uuid: {{UUID}} -- NVMe devices (if applicable): ok. +- NVMe devices (if applicable)... ok. - Open the pool: ok. - Magic... ok. - Version... ok. @@ -12,7 +12,8 @@ Check pool: -- Tree features... ok. -- Node (off=0xa7a4c0)... ok. - Containers tree: ok. -- Pool extension (off=0x400550)... ok. +- Pool extension (off=0x400550)... +- Pool extension (off=0x400550): ok. - Garbage collector's tree... -- Tree class... ok. -- Tree features... ok. diff --git a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_GC_TREE_FEATURES/{{UUID}}_vos-0 b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_GC_TREE_FEATURES/{{UUID}}_vos-0 index f202c75b872..6ca2e4d8ed0 100644 --- a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_GC_TREE_FEATURES/{{UUID}}_vos-0 +++ b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_GC_TREE_FEATURES/{{UUID}}_vos-0 @@ -2,7 +2,7 @@ VOS file allocation: ok. Check pool: path: {{STORAGE}}/{{UUID}}/vos-0 uuid: {{UUID}} -- NVMe devices (if applicable): ok. +- NVMe devices (if applicable)... ok. - Open the pool: ok. - Magic... ok. - Version... ok. @@ -12,9 +12,9 @@ Check pool: -- Tree features... ok. -- Node (off=0xa7a4c0)... ok. - Containers tree: ok. -- Pool extension (off=0x400550)... ok. +- Pool extension (off=0x400550)... +- Pool extension (off=0x400550): ok. - Garbage collector's tree... -- Tree class... ok. -- Tree features... error: Unsupported features 1/3 - - error: Garbage collector's tree: DER_PROTO(-1014): 'Incompatible protocol' diff --git a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_GC_TREE_INV_CLASS/{{UUID}}_vos-0 b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_GC_TREE_INV_CLASS/{{UUID}}_vos-0 index e4c444e4703..8de4f7b613a 100644 --- a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_GC_TREE_INV_CLASS/{{UUID}}_vos-0 +++ b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_GC_TREE_INV_CLASS/{{UUID}}_vos-0 @@ -2,7 +2,7 @@ VOS file allocation: ok. Check pool: path: {{STORAGE}}/{{UUID}}/vos-0 uuid: {{UUID}} -- NVMe devices (if applicable): ok. +- NVMe devices (if applicable)... ok. - Open the pool: ok. - Magic... ok. - Version... ok. @@ -12,8 +12,8 @@ Check pool: -- Tree features... ok. -- Node (off=0xa7a4c0)... ok. - Containers tree: ok. -- Pool extension (off=0x400550)... ok. +- Pool extension (off=0x400550)... +- Pool extension (off=0x400550): ok. - Garbage collector's tree... -- Tree class... error: Invalid class id: 28 - - error: Garbage collector's tree: DER_INVAL(-1003): 'Invalid parameters' diff --git a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_GC_TREE_UNREG_CLASS/{{UUID}}_vos-0 b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_GC_TREE_UNREG_CLASS/{{UUID}}_vos-0 index a2488fb6747..4693dde0998 100644 --- a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_GC_TREE_UNREG_CLASS/{{UUID}}_vos-0 +++ b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_GC_TREE_UNREG_CLASS/{{UUID}}_vos-0 @@ -2,7 +2,7 @@ VOS file allocation: ok. Check pool: path: {{STORAGE}}/{{UUID}}/vos-0 uuid: {{UUID}} -- NVMe devices (if applicable): ok. +- NVMe devices (if applicable)... ok. - Open the pool: ok. - Magic... ok. - Version... ok. @@ -12,8 +12,8 @@ Check pool: -- Tree features... ok. -- Node (off=0xa7a4c0)... ok. - Containers tree: ok. -- Pool extension (off=0x400550)... ok. +- Pool extension (off=0x400550)... +- Pool extension (off=0x400550): ok. - Garbage collector's tree... -- Tree class... error: Unregistered class id 28 - - error: Garbage collector's tree: DER_NONEXIST(-1005): 'The specified entity does not exist' diff --git a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_OBJ_ILOG_MAGIC/{{UUID}}_vos-0 b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_OBJ_ILOG_MAGIC/{{UUID}}_vos-0 index f53c1130461..64ef5526b62 100644 --- a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_OBJ_ILOG_MAGIC/{{UUID}}_vos-0 +++ b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_OBJ_ILOG_MAGIC/{{UUID}}_vos-0 @@ -2,7 +2,7 @@ VOS file allocation: ok. Check pool: path: {{STORAGE}}/{{UUID}}/vos-0 uuid: {{UUID}} -- NVMe devices (if applicable): ok. +- NVMe devices (if applicable)... ok. - Open the pool: ok. - Magic... ok. - Version... ok. @@ -12,7 +12,8 @@ Check pool: -- Tree features... ok. -- Node (off=0xa7a4c0)... ok. - Containers tree: ok. -- Pool extension (off=0x400550)... ok. +- Pool extension (off=0x400550)... +- Pool extension (off=0x400550): ok. - Garbage collector's tree... -- Tree class... ok. -- Tree features... ok. diff --git a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_POOL_EXT_PADDING/{{UUID}}_vos-0 b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_POOL_EXT_PADDING/{{UUID}}_vos-0 index 5d55be4366c..7397edee1d4 100644 --- a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_POOL_EXT_PADDING/{{UUID}}_vos-0 +++ b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_POOL_EXT_PADDING/{{UUID}}_vos-0 @@ -2,7 +2,7 @@ VOS file allocation: ok. Check pool: path: {{STORAGE}}/{{UUID}}/vos-0 uuid: {{UUID}} -- NVMe devices (if applicable): ok. +- NVMe devices (if applicable)... ok. - Open the pool: ok. - Magic... ok. - Version... ok. @@ -12,59 +12,60 @@ Check pool: -- Tree features... ok. -- Node (off=0xa7a4c0)... ok. - Containers tree: ok. -- Pool extension (off=0x400550)... warning: non-zero padding[0] (0) -warning: non-zero padding[1] (0) -warning: non-zero padding[2] (0) -warning: non-zero padding[3] (0) -warning: non-zero padding[4] (0) -warning: non-zero padding[5] (0) -warning: non-zero padding[6] (0) -warning: non-zero padding[7] (0) -warning: non-zero padding[8] (0) -warning: non-zero padding[9] (0) -warning: non-zero padding[10] (0) -warning: non-zero padding[11] (0) -warning: non-zero padding[12] (0) -warning: non-zero padding[13] (0) -warning: non-zero padding[14] (0) -warning: non-zero padding[15] (0) -warning: non-zero padding[16] (0) -warning: non-zero padding[17] (0) -warning: non-zero padding[18] (0) -warning: non-zero padding[19] (0) -warning: non-zero padding[20] (0) -warning: non-zero padding[21] (0) -warning: non-zero padding[22] (0) -warning: non-zero padding[23] (0) -warning: non-zero padding[24] (0) -warning: non-zero padding[25] (0) -warning: non-zero padding[26] (0) -warning: non-zero padding[27] (0) -warning: non-zero padding[28] (0) -warning: non-zero padding[29] (0) -warning: non-zero padding[30] (0) -warning: non-zero padding[31] (0) -warning: non-zero padding[32] (0) -warning: non-zero padding[33] (0) -warning: non-zero padding[34] (0) -warning: non-zero padding[35] (0) -warning: non-zero padding[36] (0) -warning: non-zero padding[37] (0) -warning: non-zero padding[38] (0) -warning: non-zero padding[39] (0) -warning: non-zero padding[40] (0) -warning: non-zero padding[41] (0) -warning: non-zero padding[42] (0) -warning: non-zero padding[43] (0) -warning: non-zero padding[44] (0) -warning: non-zero padding[45] (0) -warning: non-zero padding[46] (0) -warning: non-zero padding[47] (0) -warning: non-zero padding[48] (0) -warning: non-zero padding[49] (0) -warning: non-zero padding[50] (0) -warning: non-zero padding[51] (0) -ok. +- Pool extension (off=0x400550)... +-- warning: non-zero padding[0] (0) +-- warning: non-zero padding[1] (0) +-- warning: non-zero padding[2] (0) +-- warning: non-zero padding[3] (0) +-- warning: non-zero padding[4] (0) +-- warning: non-zero padding[5] (0) +-- warning: non-zero padding[6] (0) +-- warning: non-zero padding[7] (0) +-- warning: non-zero padding[8] (0) +-- warning: non-zero padding[9] (0) +-- warning: non-zero padding[10] (0) +-- warning: non-zero padding[11] (0) +-- warning: non-zero padding[12] (0) +-- warning: non-zero padding[13] (0) +-- warning: non-zero padding[14] (0) +-- warning: non-zero padding[15] (0) +-- warning: non-zero padding[16] (0) +-- warning: non-zero padding[17] (0) +-- warning: non-zero padding[18] (0) +-- warning: non-zero padding[19] (0) +-- warning: non-zero padding[20] (0) +-- warning: non-zero padding[21] (0) +-- warning: non-zero padding[22] (0) +-- warning: non-zero padding[23] (0) +-- warning: non-zero padding[24] (0) +-- warning: non-zero padding[25] (0) +-- warning: non-zero padding[26] (0) +-- warning: non-zero padding[27] (0) +-- warning: non-zero padding[28] (0) +-- warning: non-zero padding[29] (0) +-- warning: non-zero padding[30] (0) +-- warning: non-zero padding[31] (0) +-- warning: non-zero padding[32] (0) +-- warning: non-zero padding[33] (0) +-- warning: non-zero padding[34] (0) +-- warning: non-zero padding[35] (0) +-- warning: non-zero padding[36] (0) +-- warning: non-zero padding[37] (0) +-- warning: non-zero padding[38] (0) +-- warning: non-zero padding[39] (0) +-- warning: non-zero padding[40] (0) +-- warning: non-zero padding[41] (0) +-- warning: non-zero padding[42] (0) +-- warning: non-zero padding[43] (0) +-- warning: non-zero padding[44] (0) +-- warning: non-zero padding[45] (0) +-- warning: non-zero padding[46] (0) +-- warning: non-zero padding[47] (0) +-- warning: non-zero padding[48] (0) +-- warning: non-zero padding[49] (0) +-- warning: non-zero padding[50] (0) +-- warning: non-zero padding[51] (0) +- Pool extension (off=0x400550): ok. - Garbage collector's tree... -- Tree class... ok. -- Tree features... ok. diff --git a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_POOL_EXT_RESERVED/{{UUID}}_vos-0 b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_POOL_EXT_RESERVED/{{UUID}}_vos-0 index 0ee4a5bda25..827d42c7488 100644 --- a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_POOL_EXT_RESERVED/{{UUID}}_vos-0 +++ b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_POOL_EXT_RESERVED/{{UUID}}_vos-0 @@ -2,7 +2,7 @@ VOS file allocation: ok. Check pool: path: {{STORAGE}}/{{UUID}}/vos-0 uuid: {{UUID}} -- NVMe devices (if applicable): ok. +- NVMe devices (if applicable)... ok. - Open the pool: ok. - Magic... ok. - Version... ok. @@ -12,8 +12,9 @@ Check pool: -- Tree features... ok. -- Node (off=0xa7a4c0)... ok. - Containers tree: ok. -- Pool extension (off=0x400550)... warning: non-zero reserved space (0) -ok. +- Pool extension (off=0x400550)... +-- warning: non-zero reserved space (0) +- Pool extension (off=0x400550): ok. - Garbage collector's tree... -- Tree class... ok. -- Tree features... ok. diff --git a/src/utils/dlck/tests/fault_templates/DLCK_FAULT_CONT_DOES_NOT_EXIST/output.txt b/src/utils/dlck/tests/fault_templates/DLCK_FAULT_CONT_DOES_NOT_EXIST/output.txt index c0e41fbe345..4f519c21173 100644 --- a/src/utils/dlck/tests/fault_templates/DLCK_FAULT_CONT_DOES_NOT_EXIST/output.txt +++ b/src/utils/dlck/tests/fault_templates/DLCK_FAULT_CONT_DOES_NOT_EXIST/output.txt @@ -4,7 +4,8 @@ Start the engine... ok. Create pools directories... ok. Start targets... ok. Wait for targets to stop... -error: [0] pool {{UUID}} check result: DER_DF_INCOMPT(-2023): 'Incompatible durable format version' +[0] pool {{UUID}} check result: ok. +error: [0] container {{UUID}} check result: DER_INVAL(-1003): 'Invalid parameters' Wait for targets to stop: ok. Stop the engine... ok. =============================== diff --git a/src/utils/dlck/tests/fault_templates/DLCK_FAULT_CONT_DOES_NOT_EXIST/{{UUID}}_vos-0 b/src/utils/dlck/tests/fault_templates/DLCK_FAULT_CONT_DOES_NOT_EXIST/{{UUID}}_vos-0 index 92a81d8b9e6..f89ed48a2f0 100644 --- a/src/utils/dlck/tests/fault_templates/DLCK_FAULT_CONT_DOES_NOT_EXIST/{{UUID}}_vos-0 +++ b/src/utils/dlck/tests/fault_templates/DLCK_FAULT_CONT_DOES_NOT_EXIST/{{UUID}}_vos-0 @@ -2,7 +2,25 @@ VOS file allocation: ok. Check pool: path: {{STORAGE}}/{{UUID}}/vos-0 uuid: {{UUID}} -- NVMe devices (if applicable): ok. +- NVMe devices (if applicable)... ok. - Open the pool: ok. - Magic... ok. -- Version... error: unsupported (0x1c) +- Version... ok. +- UUID... ok. +- Containers tree... +-- Tree class... ok. +-- Tree features... ok. +-- Node (off=0xa7a4c0)... ok. +- Containers tree: ok. +- Pool extension (off=0x400550)... +- Pool extension (off=0x400550): ok. +- Garbage collector's tree... +-- Tree class... ok. +-- Tree features... ok. +-- Empty tree +- Garbage collector's tree: ok. +Check pool: ok. +Check container: + uuid: {{UUID}} +- Container does not exist. +error: Check container: DER_INVAL(-1003): 'Invalid parameters' diff --git a/src/utils/dlck/tests/fault_templates/DLCK_FAULT_ENGINE_JOIN/{{UUID}}_vos-0 b/src/utils/dlck/tests/fault_templates/DLCK_FAULT_ENGINE_JOIN/{{UUID}}_vos-0 index 1a64a064296..118e9ed1fd0 100644 --- a/src/utils/dlck/tests/fault_templates/DLCK_FAULT_ENGINE_JOIN/{{UUID}}_vos-0 +++ b/src/utils/dlck/tests/fault_templates/DLCK_FAULT_ENGINE_JOIN/{{UUID}}_vos-0 @@ -2,7 +2,7 @@ VOS file allocation: ok. Check pool: path: {{STORAGE}}/{{UUID}}/vos-0 uuid: {{UUID}} -- NVMe devices (if applicable): ok. +- NVMe devices (if applicable)... ok. - Open the pool: ok. - Magic... ok. - Version... ok. @@ -12,7 +12,8 @@ Check pool: -- Tree features... ok. -- Node (off=0xa7a4c0)... ok. - Containers tree: ok. -- Pool extension (off=0x400550)... ok. +- Pool extension (off=0x400550)... +- Pool extension (off=0x400550): ok. - Garbage collector's tree... -- Tree class... ok. -- Tree features... ok. diff --git a/src/utils/dlck/tests/fault_templates/DLCK_FAULT_POOL_NVME_HEALTH/output.txt b/src/utils/dlck/tests/fault_templates/DLCK_FAULT_POOL_NVME_HEALTH/output.txt index de0fde75e19..0942146d674 100644 --- a/src/utils/dlck/tests/fault_templates/DLCK_FAULT_POOL_NVME_HEALTH/output.txt +++ b/src/utils/dlck/tests/fault_templates/DLCK_FAULT_POOL_NVME_HEALTH/output.txt @@ -4,4 +4,13 @@ Start the engine... ok. Create pools directories... ok. Start targets... ok. Wait for targets to stop... -error: Wait for targets to stop: DER_INVAL(-1003): 'Invalid parameters' +error: [0] pool {{UUID}} check result: DER_INVAL(-1003): 'Invalid parameters' +Wait for targets to stop: ok. +Stop the engine... ok. +=============================== +Targets: +=============================== +[0] result: error: DER_INVAL(-1003): 'Invalid parameters' +=============================== +Total: error: DER_INVAL(-1003): 'Invalid parameters' +=============================== diff --git a/src/utils/dlck/tests/fault_templates/DLCK_FAULT_POOL_NVME_HEALTH/{{UUID}}_vos-0 b/src/utils/dlck/tests/fault_templates/DLCK_FAULT_POOL_NVME_HEALTH/{{UUID}}_vos-0 index d0b937b265a..f0e665def0c 100644 --- a/src/utils/dlck/tests/fault_templates/DLCK_FAULT_POOL_NVME_HEALTH/{{UUID}}_vos-0 +++ b/src/utils/dlck/tests/fault_templates/DLCK_FAULT_POOL_NVME_HEALTH/{{UUID}}_vos-0 @@ -2,4 +2,4 @@ VOS file allocation: ok. Check pool: path: {{STORAGE}}/{{UUID}}/vos-0 uuid: {{UUID}} -- error: NVMe devices (if applicable): DER_INVAL(-1003): 'Invalid parameters' +- NVMe devices (if applicable)... error: DER_INVAL(-1003): 'Invalid parameters' diff --git a/src/utils/dlck/tests/fault_templates/DLCK_FAULT_POOL_OPEN_BIO/output.txt b/src/utils/dlck/tests/fault_templates/DLCK_FAULT_POOL_OPEN_BIO/output.txt index cd54825e420..0942146d674 100644 --- a/src/utils/dlck/tests/fault_templates/DLCK_FAULT_POOL_OPEN_BIO/output.txt +++ b/src/utils/dlck/tests/fault_templates/DLCK_FAULT_POOL_OPEN_BIO/output.txt @@ -4,5 +4,13 @@ Start the engine... ok. Create pools directories... ok. Start targets... ok. Wait for targets to stop... -[0] pool {{UUID}} check result: ok. -error: Wait for targets to stop: DER_INVAL(-1003): 'Invalid parameters' +error: [0] pool {{UUID}} check result: DER_INVAL(-1003): 'Invalid parameters' +Wait for targets to stop: ok. +Stop the engine... ok. +=============================== +Targets: +=============================== +[0] result: error: DER_INVAL(-1003): 'Invalid parameters' +=============================== +Total: error: DER_INVAL(-1003): 'Invalid parameters' +=============================== diff --git a/src/utils/dlck/tests/fault_templates/DLCK_FAULT_POOL_OPEN_BIO/{{UUID}}_vos-0 b/src/utils/dlck/tests/fault_templates/DLCK_FAULT_POOL_OPEN_BIO/{{UUID}}_vos-0 index be76486dc7b..b6f88c3619f 100644 --- a/src/utils/dlck/tests/fault_templates/DLCK_FAULT_POOL_OPEN_BIO/{{UUID}}_vos-0 +++ b/src/utils/dlck/tests/fault_templates/DLCK_FAULT_POOL_OPEN_BIO/{{UUID}}_vos-0 @@ -1,21 +1,6 @@ VOS file allocation: ok. Check pool: - path: /dev/shm/daos/{{UUID}}/vos-0 + path: {{STORAGE}}/{{UUID}}/vos-0 uuid: {{UUID}} -- NVMe devices (if applicable): ok. -- Open the pool: ok. -- Magic... ok. -- Version... ok. -- UUID... ok. -- Containers tree... --- Tree class... ok. --- Tree features... ok. --- Node (off=0xa7a4c0)... ok. -- Containers tree: ok. -- Pool extension (off=0x400550)... ok. -- Garbage collector's tree... --- Tree class... ok. --- Tree features... ok. --- Empty tree -- Garbage collector's tree: ok. -Check pool: ok. +- NVMe devices (if applicable)... ok. +- Open BIO meta context... error: DER_INVAL(-1003): 'Invalid parameters' diff --git a/src/utils/dlck/tests/fault_templates/DLCK_FAULT_POOL_OPEN_MAGIC/{{UUID}}_vos-0 b/src/utils/dlck/tests/fault_templates/DLCK_FAULT_POOL_OPEN_MAGIC/{{UUID}}_vos-0 index 170d72a8176..2cff4faff41 100644 --- a/src/utils/dlck/tests/fault_templates/DLCK_FAULT_POOL_OPEN_MAGIC/{{UUID}}_vos-0 +++ b/src/utils/dlck/tests/fault_templates/DLCK_FAULT_POOL_OPEN_MAGIC/{{UUID}}_vos-0 @@ -2,6 +2,6 @@ VOS file allocation: ok. Check pool: path: {{STORAGE}}/{{UUID}}/vos-0 uuid: {{UUID}} -- NVMe devices (if applicable): ok. +- NVMe devices (if applicable)... ok. - Open the pool: ok. - Magic... error: invalid (0x5ca1ab1e) diff --git a/src/utils/dlck/tests/fault_templates/DLCK_FAULT_POOL_OPEN_UMEM/{{UUID}}_vos-0 b/src/utils/dlck/tests/fault_templates/DLCK_FAULT_POOL_OPEN_UMEM/{{UUID}}_vos-0 index 4301951525d..24f22d9889d 100644 --- a/src/utils/dlck/tests/fault_templates/DLCK_FAULT_POOL_OPEN_UMEM/{{UUID}}_vos-0 +++ b/src/utils/dlck/tests/fault_templates/DLCK_FAULT_POOL_OPEN_UMEM/{{UUID}}_vos-0 @@ -2,5 +2,5 @@ VOS file allocation: ok. Check pool: path: {{STORAGE}}/{{UUID}}/vos-0 uuid: {{UUID}} -- NVMe devices (if applicable): ok. +- NVMe devices (if applicable)... ok. - error: Open the pool: DER_INVAL(-1003): 'Invalid parameters' diff --git a/src/utils/dlck/tests/fault_templates/DLCK_FAULT_POOL_OPEN_UUID/{{UUID}}_vos-0 b/src/utils/dlck/tests/fault_templates/DLCK_FAULT_POOL_OPEN_UUID/{{UUID}}_vos-0 index afb04852b9e..5ce03eb6744 100644 --- a/src/utils/dlck/tests/fault_templates/DLCK_FAULT_POOL_OPEN_UUID/{{UUID}}_vos-0 +++ b/src/utils/dlck/tests/fault_templates/DLCK_FAULT_POOL_OPEN_UUID/{{UUID}}_vos-0 @@ -2,7 +2,7 @@ VOS file allocation: ok. Check pool: path: {{STORAGE}}/{{UUID}}/vos-0 uuid: {{UUID}} -- NVMe devices (if applicable): ok. +- NVMe devices (if applicable)... ok. - Open the pool: ok. - Magic... ok. - Version... ok. diff --git a/src/utils/dlck/tests/fault_templates/DLCK_FAULT_POOL_OPEN_VERSION/{{UUID}}_vos-0 b/src/utils/dlck/tests/fault_templates/DLCK_FAULT_POOL_OPEN_VERSION/{{UUID}}_vos-0 index 92a81d8b9e6..762815f9bf6 100644 --- a/src/utils/dlck/tests/fault_templates/DLCK_FAULT_POOL_OPEN_VERSION/{{UUID}}_vos-0 +++ b/src/utils/dlck/tests/fault_templates/DLCK_FAULT_POOL_OPEN_VERSION/{{UUID}}_vos-0 @@ -2,7 +2,7 @@ VOS file allocation: ok. Check pool: path: {{STORAGE}}/{{UUID}}/vos-0 uuid: {{UUID}} -- NVMe devices (if applicable): ok. +- NVMe devices (if applicable)... ok. - Open the pool: ok. - Magic... ok. - Version... error: unsupported (0x1c) diff --git a/src/vos/vos_container.c b/src/vos/vos_container.c index e29599323b0..5898407159f 100644 --- a/src/vos/vos_container.c +++ b/src/vos/vos_container.c @@ -411,11 +411,12 @@ vos_cont_open_ex(daos_handle_t poh, uuid_t co_uuid, struct checker *ck, daos_han CK_PRINTF(ck, "uuid... "); if (uuid_compare(args.ca_cont_df->cd_id, co_uuid) != 0 || DAOS_FAIL_CHECK(DAOS_FAULT_CONT_OPEN_UUID)) { - CK_APPENDFL_ERR(ck, "mismatch (" DF_UUIDF " != " DF_UUIDF ")\n", + CK_APPENDFL_ERR(ck, "mismatch (" DF_UUIDF " != " DF_UUIDF ")", DP_UUID(args.ca_cont_df->cd_id), DP_UUID(co_uuid)); D_GOTO(exit, rc = -DER_ID_MISMATCH); + } else { + CK_APPENDL_OK(ck); } - CK_APPENDL_OK(ck); const bool error_on_non_zero_padding = (ck->ck_options.cko_non_zero_padding == CHECKER_EVENT_ERROR); @@ -430,8 +431,9 @@ vos_cont_open_ex(daos_handle_t poh, uuid_t co_uuid, struct checker *ck, daos_han CK_APPENDFL_WARN(ck, CK_NON_ZERO_FMT(PRIx32), args.ca_cont_df->cd_pad); } + } else { + CK_APPENDL_OK(ck); } - CK_APPENDL_OK(ck); CK_PRINTF(ck, "Padding (cd_used)... "); if (args.ca_cont_df->cd_used != 0 || DAOS_FAIL_CHECK(DAOS_FAULT_CONT_INV_USED)) { @@ -443,8 +445,9 @@ vos_cont_open_ex(daos_handle_t poh, uuid_t co_uuid, struct checker *ck, daos_han CK_APPENDFL_WARN(ck, CK_NON_ZERO_FMT(PRIx64), args.ca_cont_df->cd_used); } + } else { + CK_APPENDL_OK(ck); } - CK_APPENDL_OK(ck); CK_PRINTF(ck, "Reserved (cd_reserv_upgrade)... "); if (args.ca_cont_df->cd_reserv_upgrade != 0 || @@ -457,8 +460,9 @@ vos_cont_open_ex(daos_handle_t poh, uuid_t co_uuid, struct checker *ck, daos_han CK_APPENDFL_WARN(ck, CK_NON_ZERO_FMT(PRIx64), args.ca_cont_df->cd_reserv_upgrade); } + } else { + CK_APPENDL_OK(ck); } - CK_APPENDL_OK(ck); CK_PRINTF(ck, CK_OBJ_TREE_STR "...\n"); CK_INDENT(ck, rc = dbtree_check_inplace(&args.ca_cont_df->cd_obj_root, diff --git a/src/vos/vos_gc.c b/src/vos/vos_gc.c index 476fe9f448f..b5210f7ed39 100644 --- a/src/vos/vos_gc.c +++ b/src/vos/vos_gc.c @@ -1541,43 +1541,39 @@ gc_close_pool(struct vos_pool *pool) return gc_close_bkt(&pool->vp_gc_info); } -#define CK_NON_ZERO_PADDING_FMT "non-zero padding[%d] (%#" PRIx64 ")" -#define CK_NON_ZERO_RESERVED_FMT "non-zero reserved space (%#" PRIx64 ")" +#define CK_POOL_EXT_FMT "Pool extension (off=%#lx)" +#define CK_NON_ZERO_PADDING_FMT "non-zero padding[%d] (%#" PRIx64 ")\n" +#define CK_NON_ZERO_RESERVED_FMT "non-zero reserved space (%#" PRIx64 ")\n" static int dlck_pd_ext_check(struct vos_pool_ext_df *pd_ext, umem_off_t off, struct checker *ck) { - CK_PRINTF(ck, "Pool extension (off=%#lx)... ", off); - if (pd_ext == NULL) { - CK_APPENDL_OK(ck); return DER_SUCCESS; } for (int i = 0; i < VOS_POOL_EXT_DF_PADDING_SIZE; ++i) { if (pd_ext->ped_paddings[i] != 0 || DAOS_FAIL_CHECK(DAOS_FAULT_POOL_EXT_PADDING)) { if (ck->ck_options.cko_non_zero_padding == CHECKER_EVENT_ERROR) { - CK_APPENDFL_ERR(ck, CK_NON_ZERO_PADDING_FMT, i, - pd_ext->ped_paddings[i]); + CK_PRINTF_ERR(ck, CK_NON_ZERO_PADDING_FMT, i, + pd_ext->ped_paddings[i]); return -DER_NOTYPE; } else { - CK_APPENDFL_WARN(ck, CK_NON_ZERO_PADDING_FMT, i, - pd_ext->ped_paddings[i]); + CK_PRINTF_WARN(ck, CK_NON_ZERO_PADDING_FMT, i, + pd_ext->ped_paddings[i]); } } } if (pd_ext->ped_reserve != 0 || DAOS_FAIL_CHECK(DAOS_FAULT_POOL_EXT_RESERVED)) { if (ck->ck_options.cko_non_zero_padding == CHECKER_EVENT_ERROR) { - CK_APPENDFL_ERR(ck, CK_NON_ZERO_RESERVED_FMT, pd_ext->ped_reserve); + CK_PRINTF_ERR(ck, CK_NON_ZERO_RESERVED_FMT, pd_ext->ped_reserve); return -DER_NOTYPE; } else { - CK_APPENDFL_WARN(ck, CK_NON_ZERO_RESERVED_FMT, pd_ext->ped_reserve); + CK_PRINTF_WARN(ck, CK_NON_ZERO_RESERVED_FMT, pd_ext->ped_reserve); } } - CK_APPENDL_OK(ck); - return DER_SUCCESS; } @@ -1588,7 +1584,9 @@ gc_open_pool(struct vos_pool *pool, struct checker *ck) int rc; if (IS_CHECKER(ck)) { - rc = dlck_pd_ext_check(pd_ext, pool->vp_pool_df->pd_ext, ck); + CK_PRINTF(ck, CK_POOL_EXT_FMT "...\n", pool->vp_pool_df->pd_ext); + CK_INDENT(ck, rc = dlck_pd_ext_check(pd_ext, pool->vp_pool_df->pd_ext, ck)); + CK_PRINTFL_RC(ck, rc, CK_POOL_EXT_FMT, pool->vp_pool_df->pd_ext); if (rc != DER_SUCCESS) { return rc; } diff --git a/src/vos/vos_pool.c b/src/vos/vos_pool.c index 514fa59afc2..a44037d65b7 100644 --- a/src/vos/vos_pool.c +++ b/src/vos/vos_pool.c @@ -1049,13 +1049,16 @@ vos_pmemobj_open(const char *path, uuid_t pool_id, const char *layout, unsigned D_DEBUG(DB_MGMT, "Open BIO meta context for xs:%p pool:"DF_UUID"\n", xs_ctxt, DP_UUID(pool_id)); + CK_PRINTF(ck, "Open BIO meta context... "); rc = bio_mc_open(xs_ctxt, pool_id, mc_flags, &mc); - CK_PRINTFL_RC(ck, rc, "Open BIO meta context"); if (rc) { + CK_APPENDL_RC(ck, rc); + CK_RC_SET(ck, rc); D_ERROR("Failed to open BIO meta context for xs:%p pool:"DF_UUID", "DF_RC"\n", xs_ctxt, DP_UUID(pool_id), DP_RC(rc)); return rc; } + CK_APPENDL_OK(ck); init_umem_store(&store, mc); store.stor_stats = metrics; @@ -1844,12 +1847,15 @@ vos_pool_open_metrics(const char *path, uuid_t uuid, unsigned int flags, void *m if (rc != 0) return rc; + CK_PRINTF(ck, "NVMe devices (if applicable)... "); rc = bio_xsctxt_health_check(vos_xsctxt_get(), false, false); - CK_PRINTFL_RC(ck, rc, "NVMe devices (if applicable)"); if (rc) { + CK_APPENDL_RC(ck, rc); + CK_RC_SET(ck, rc); DL_WARN(rc, DF_UUID": Skip pool open due to faulty NVMe.", DP_UUID(uuid)); goto out; } + CK_APPENDL_OK(ck); rc = vos_pmemobj_open(path, uuid, VOS_POOL_LAYOUT, flags, metrics, ck, &ph); if (rc) { From 78cc62f03b55d394aceae65d942e22112c0f9f74 Mon Sep 17 00:00:00 2001 From: Jan Michalski Date: Wed, 18 Nov 2026 00:27:36 +0000 Subject: [PATCH 2/7] DAOS-19846 dlck: add missing infix in CK_PRINTF_ERR + ... ... revert a change made in vos_container.c by mistake. Signed-off-by: Jan Michalski --- src/include/daos/checker.h | 2 +- .../fault_templates/DAOS_FAULT_DAE_INV_FLAGS/{{UUID}}_vos-0 | 2 +- .../tests/fault_templates/DAOS_FAULT_DBD_COUNT/{{UUID}}_vos-0 | 2 +- .../DLCK_FAULT_CONT_DOES_NOT_EXIST/{{UUID}}_vos-0 | 2 +- src/vos/vos_container.c | 3 +-- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/include/daos/checker.h b/src/include/daos/checker.h index ff22fe37693..e7d33777e2f 100644 --- a/src/include/daos/checker.h +++ b/src/include/daos/checker.h @@ -175,7 +175,7 @@ ck_common_printf(struct checker *ck, const char *fmt, ...) #define CK_PRINTF_ERR(ck, fmt, ...) \ do { \ - CK_PRINTF(ck, fmt, ##__VA_ARGS__); \ + CK_PRINTF(ck, CHECKER_ERROR_INFIX fmt, ##__VA_ARGS__); \ CK_ERR_NUM_INC(ck); \ } while (0) diff --git a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_DAE_INV_FLAGS/{{UUID}}_vos-0 b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_DAE_INV_FLAGS/{{UUID}}_vos-0 index 3f98f3bf181..b0b92759147 100644 --- a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_DAE_INV_FLAGS/{{UUID}}_vos-0 +++ b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_DAE_INV_FLAGS/{{UUID}}_vos-0 @@ -43,6 +43,6 @@ Check container: -- DTX blob (off=0x514650)... --- Magic... ok. --- 7 active entries: ----- [0] invalid flags (0x20) +---- error: [0] invalid flags (0x20) - error: Active DTX blob list: DER_IO(-2001): 'I / O error' error: Check container: DER_IO(-2001): 'I / O error' diff --git a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_DBD_COUNT/{{UUID}}_vos-0 b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_DBD_COUNT/{{UUID}}_vos-0 index bcd40573216..f3b2b4563f5 100644 --- a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_DBD_COUNT/{{UUID}}_vos-0 +++ b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_DBD_COUNT/{{UUID}}_vos-0 @@ -60,6 +60,6 @@ Check container: ---- [6] ID (dae_xid)... ok. ---- [6] LID (dae_lid)... ok. ---- [6] Append to active DTX tree... ok. ---- DTX blob (off=0x514650)... expected 5 active entries, but found 5. +--- error: DTX blob (off=0x514650)... expected 5 active entries, but found 5. - error: Active DTX blob list: DER_IO(-2001): 'I / O error' error: Check container: DER_IO(-2001): 'I / O error' diff --git a/src/utils/dlck/tests/fault_templates/DLCK_FAULT_CONT_DOES_NOT_EXIST/{{UUID}}_vos-0 b/src/utils/dlck/tests/fault_templates/DLCK_FAULT_CONT_DOES_NOT_EXIST/{{UUID}}_vos-0 index f89ed48a2f0..79518f65b39 100644 --- a/src/utils/dlck/tests/fault_templates/DLCK_FAULT_CONT_DOES_NOT_EXIST/{{UUID}}_vos-0 +++ b/src/utils/dlck/tests/fault_templates/DLCK_FAULT_CONT_DOES_NOT_EXIST/{{UUID}}_vos-0 @@ -22,5 +22,5 @@ Check pool: Check pool: ok. Check container: uuid: {{UUID}} -- Container does not exist. +- error: Container does not exist. error: Check container: DER_INVAL(-1003): 'Invalid parameters' diff --git a/src/vos/vos_container.c b/src/vos/vos_container.c index 5898407159f..564984784a3 100644 --- a/src/vos/vos_container.c +++ b/src/vos/vos_container.c @@ -414,9 +414,8 @@ vos_cont_open_ex(daos_handle_t poh, uuid_t co_uuid, struct checker *ck, daos_han CK_APPENDFL_ERR(ck, "mismatch (" DF_UUIDF " != " DF_UUIDF ")", DP_UUID(args.ca_cont_df->cd_id), DP_UUID(co_uuid)); D_GOTO(exit, rc = -DER_ID_MISMATCH); - } else { - CK_APPENDL_OK(ck); } + CK_APPENDL_OK(ck); const bool error_on_non_zero_padding = (ck->ck_options.cko_non_zero_padding == CHECKER_EVENT_ERROR); From 068d629adbd772cae6d7865dce031fb7e11c5e39 Mon Sep 17 00:00:00 2001 From: Jan Michalski Date: Fri, 27 Nov 2026 15:24:24 +0000 Subject: [PATCH 3/7] DAOS-19846 dlck: more formatting fixed Signed-off-by: Jan Michalski --- src/utils/dlck/cmds/dlck_cmd_check.c | 8 +++++--- src/utils/dlck/dlck_pool.c | 3 +-- .../DAOS_FAULT_CONT_TREE_FEATURES/{{UUID}}_vos-0 | 1 + .../DAOS_FAULT_CONT_TREE_INV_CLASS/{{UUID}}_vos-0 | 1 + .../DAOS_FAULT_CONT_TREE_UNREG_CLASS/{{UUID}}_vos-0 | 1 + .../DAOS_FAULT_GC_TREE_FEATURES/{{UUID}}_vos-0 | 1 + .../DAOS_FAULT_GC_TREE_INV_CLASS/{{UUID}}_vos-0 | 1 + .../DAOS_FAULT_GC_TREE_UNREG_CLASS/{{UUID}}_vos-0 | 1 + .../DAOS_FAULT_POOL_EXT_PADDING/output.txt | 2 +- .../DAOS_FAULT_POOL_EXT_RESERVED/output.txt | 2 +- .../fault_templates/DLCK_FAULT_CREATE_POOL_DIR/output.txt | 3 +-- .../DLCK_FAULT_POOL_OPEN_MAGIC/{{UUID}}_vos-0 | 1 + .../DLCK_FAULT_POOL_OPEN_UMEM/{{UUID}}_vos-0 | 1 + .../DLCK_FAULT_POOL_OPEN_UUID/{{UUID}}_vos-0 | 1 + .../DLCK_FAULT_POOL_OPEN_VERSION/{{UUID}}_vos-0 | 1 + src/vos/vos_pool.c | 5 ++--- 16 files changed, 21 insertions(+), 12 deletions(-) diff --git a/src/utils/dlck/cmds/dlck_cmd_check.c b/src/utils/dlck/cmds/dlck_cmd_check.c index 61b71797283..75bc1028fa1 100644 --- a/src/utils/dlck/cmds/dlck_cmd_check.c +++ b/src/utils/dlck/cmds/dlck_cmd_check.c @@ -216,12 +216,10 @@ pool_process(struct xstream_arg *xa, struct dlck_file *file, struct checker *ck) checker_fi_entry(exp_fail_locs, &fi_reenable); rc = vos_pool_open_metrics(path, file->po_uuid, DLCK_POOL_OPEN_FLAGS, NULL, ck, &poh); checker_fi_exit(fi_reenable); + POOL_REPORT_RESULT(main_ck, xa->xs->tgt_id, file->po_uuid, rc, ck->ck_status.warnings_num); /** vos_pool_open_metrics() is fully instrumented, so rc is already accounted for in the * checker's status. */ dlck_status_set(&xa->status, &ck->ck_status); - -report: - POOL_REPORT_RESULT(main_ck, xa->xs->tgt_id, file->po_uuid, rc, ck->ck_status.warnings_num); if (rc == DER_SUCCESS) { conts_process(xa, poh, ck); (void)vos_pool_close(poh); @@ -229,6 +227,10 @@ pool_process(struct xstream_arg *xa, struct dlck_file *file, struct checker *ck) if (path != NULL) { D_FREE(path); } + return; + +report: + POOL_REPORT_RESULT(main_ck, xa->xs->tgt_id, file->po_uuid, rc, ck->ck_status.warnings_num); } /** diff --git a/src/utils/dlck/dlck_pool.c b/src/utils/dlck/dlck_pool.c index f62cc5a7cbc..f575ed08b36 100644 --- a/src/utils/dlck/dlck_pool.c +++ b/src/utils/dlck/dlck_pool.c @@ -1,5 +1,5 @@ /** - * (C) Copyright 2025 Hewlett Packard Enterprise Development LP + * (C) Copyright 2025-2026 Hewlett Packard Enterprise Development LP * * SPDX-License-Identifier: BSD-2-Clause-Patent */ @@ -36,7 +36,6 @@ dlck_pool_mkdir(const char *storage_path, uuid_t po_uuid, struct checker *ck) } if (rc != 0 && errno != EEXIST) { rc = daos_errno2der(errno); - CK_PRINTFL_RC(ck, rc, "Cannot create a pool directory: %s", path); } else { rc = DER_SUCCESS; } diff --git a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_TREE_FEATURES/{{UUID}}_vos-0 b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_TREE_FEATURES/{{UUID}}_vos-0 index b883d39511c..e612876ee59 100644 --- a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_TREE_FEATURES/{{UUID}}_vos-0 +++ b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_TREE_FEATURES/{{UUID}}_vos-0 @@ -11,3 +11,4 @@ Check pool: -- Tree class... ok. -- Tree features... error: Unsupported features 0/0 - error: Containers tree: DER_PROTO(-1014): 'Incompatible protocol' +error: Check pool: DER_PROTO(-1014): 'Incompatible protocol' diff --git a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_TREE_INV_CLASS/{{UUID}}_vos-0 b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_TREE_INV_CLASS/{{UUID}}_vos-0 index 73dd1c1d40f..3ca1e75085f 100644 --- a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_TREE_INV_CLASS/{{UUID}}_vos-0 +++ b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_TREE_INV_CLASS/{{UUID}}_vos-0 @@ -10,3 +10,4 @@ Check pool: - Containers tree... -- Tree class... error: Invalid class id: 14 - error: Containers tree: DER_INVAL(-1003): 'Invalid parameters' +error: Check pool: DER_INVAL(-1003): 'Invalid parameters' diff --git a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_TREE_UNREG_CLASS/{{UUID}}_vos-0 b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_TREE_UNREG_CLASS/{{UUID}}_vos-0 index 879a1ff744c..d72b07a7239 100644 --- a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_TREE_UNREG_CLASS/{{UUID}}_vos-0 +++ b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_TREE_UNREG_CLASS/{{UUID}}_vos-0 @@ -10,3 +10,4 @@ Check pool: - Containers tree... -- Tree class... error: Unregistered class id 14 - error: Containers tree: DER_NONEXIST(-1005): 'The specified entity does not exist' +error: Check pool: DER_NONEXIST(-1005): 'The specified entity does not exist' diff --git a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_GC_TREE_FEATURES/{{UUID}}_vos-0 b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_GC_TREE_FEATURES/{{UUID}}_vos-0 index 6ca2e4d8ed0..0ff8c908b46 100644 --- a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_GC_TREE_FEATURES/{{UUID}}_vos-0 +++ b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_GC_TREE_FEATURES/{{UUID}}_vos-0 @@ -18,3 +18,4 @@ Check pool: -- Tree class... ok. -- Tree features... error: Unsupported features 1/3 - error: Garbage collector's tree: DER_PROTO(-1014): 'Incompatible protocol' +error: Check pool: DER_PROTO(-1014): 'Incompatible protocol' diff --git a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_GC_TREE_INV_CLASS/{{UUID}}_vos-0 b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_GC_TREE_INV_CLASS/{{UUID}}_vos-0 index 8de4f7b613a..08fc3039f2f 100644 --- a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_GC_TREE_INV_CLASS/{{UUID}}_vos-0 +++ b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_GC_TREE_INV_CLASS/{{UUID}}_vos-0 @@ -17,3 +17,4 @@ Check pool: - Garbage collector's tree... -- Tree class... error: Invalid class id: 28 - error: Garbage collector's tree: DER_INVAL(-1003): 'Invalid parameters' +error: Check pool: DER_INVAL(-1003): 'Invalid parameters' diff --git a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_GC_TREE_UNREG_CLASS/{{UUID}}_vos-0 b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_GC_TREE_UNREG_CLASS/{{UUID}}_vos-0 index 4693dde0998..3c37a57219a 100644 --- a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_GC_TREE_UNREG_CLASS/{{UUID}}_vos-0 +++ b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_GC_TREE_UNREG_CLASS/{{UUID}}_vos-0 @@ -17,3 +17,4 @@ Check pool: - Garbage collector's tree... -- Tree class... error: Unregistered class id 28 - error: Garbage collector's tree: DER_NONEXIST(-1005): 'The specified entity does not exist' +error: Check pool: DER_NONEXIST(-1005): 'The specified entity does not exist' diff --git a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_POOL_EXT_PADDING/output.txt b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_POOL_EXT_PADDING/output.txt index b693212d852..4bdc991999f 100644 --- a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_POOL_EXT_PADDING/output.txt +++ b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_POOL_EXT_PADDING/output.txt @@ -4,7 +4,7 @@ Start the engine... ok. Create pools directories... ok. Start targets... ok. Wait for targets to stop... -[0] pool {{UUID}} check result: ok. +[0] pool {{UUID}} check result: ok (52 warning(s)). [0] container {{UUID}} check result: ok. Wait for targets to stop: ok. Stop the engine... ok. diff --git a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_POOL_EXT_RESERVED/output.txt b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_POOL_EXT_RESERVED/output.txt index 3fd17b8ca6a..75051975274 100644 --- a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_POOL_EXT_RESERVED/output.txt +++ b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_POOL_EXT_RESERVED/output.txt @@ -4,7 +4,7 @@ Start the engine... ok. Create pools directories... ok. Start targets... ok. Wait for targets to stop... -[0] pool {{UUID}} check result: ok. +[0] pool {{UUID}} check result: ok (1 warning(s)). [0] container {{UUID}} check result: ok. Wait for targets to stop: ok. Stop the engine... ok. diff --git a/src/utils/dlck/tests/fault_templates/DLCK_FAULT_CREATE_POOL_DIR/output.txt b/src/utils/dlck/tests/fault_templates/DLCK_FAULT_CREATE_POOL_DIR/output.txt index 35658cc01ef..f5b1f5b638d 100644 --- a/src/utils/dlck/tests/fault_templates/DLCK_FAULT_CREATE_POOL_DIR/output.txt +++ b/src/utils/dlck/tests/fault_templates/DLCK_FAULT_CREATE_POOL_DIR/output.txt @@ -1,5 +1,4 @@ Effective user: root Log directory: {{LOG_DIR}} Start the engine... ok. -Create pools directories... error: Cannot create a pool directory: {{STORAGE}}/{{UUID}}/: DER_INVAL(-1003): 'Invalid parameters' -error: DER_INVAL(-1003): 'Invalid parameters' +Create pools directories... error: DER_INVAL(-1003): 'Invalid parameters' diff --git a/src/utils/dlck/tests/fault_templates/DLCK_FAULT_POOL_OPEN_MAGIC/{{UUID}}_vos-0 b/src/utils/dlck/tests/fault_templates/DLCK_FAULT_POOL_OPEN_MAGIC/{{UUID}}_vos-0 index 2cff4faff41..0b0876a8fc0 100644 --- a/src/utils/dlck/tests/fault_templates/DLCK_FAULT_POOL_OPEN_MAGIC/{{UUID}}_vos-0 +++ b/src/utils/dlck/tests/fault_templates/DLCK_FAULT_POOL_OPEN_MAGIC/{{UUID}}_vos-0 @@ -5,3 +5,4 @@ Check pool: - NVMe devices (if applicable)... ok. - Open the pool: ok. - Magic... error: invalid (0x5ca1ab1e) +error: Check pool: DER_DF_INVAL(-2022): 'Unsupported durable format' diff --git a/src/utils/dlck/tests/fault_templates/DLCK_FAULT_POOL_OPEN_UMEM/{{UUID}}_vos-0 b/src/utils/dlck/tests/fault_templates/DLCK_FAULT_POOL_OPEN_UMEM/{{UUID}}_vos-0 index 24f22d9889d..474cb0bc4ba 100644 --- a/src/utils/dlck/tests/fault_templates/DLCK_FAULT_POOL_OPEN_UMEM/{{UUID}}_vos-0 +++ b/src/utils/dlck/tests/fault_templates/DLCK_FAULT_POOL_OPEN_UMEM/{{UUID}}_vos-0 @@ -4,3 +4,4 @@ Check pool: uuid: {{UUID}} - NVMe devices (if applicable)... ok. - error: Open the pool: DER_INVAL(-1003): 'Invalid parameters' +error: Check pool: DER_INVAL(-1003): 'Invalid parameters' diff --git a/src/utils/dlck/tests/fault_templates/DLCK_FAULT_POOL_OPEN_UUID/{{UUID}}_vos-0 b/src/utils/dlck/tests/fault_templates/DLCK_FAULT_POOL_OPEN_UUID/{{UUID}}_vos-0 index 5ce03eb6744..e80529ed134 100644 --- a/src/utils/dlck/tests/fault_templates/DLCK_FAULT_POOL_OPEN_UUID/{{UUID}}_vos-0 +++ b/src/utils/dlck/tests/fault_templates/DLCK_FAULT_POOL_OPEN_UUID/{{UUID}}_vos-0 @@ -7,3 +7,4 @@ Check pool: - Magic... ok. - Version... ok. - UUID... error: mismatch (requested={{UUID}}, received={{UUID}}) +error: Check pool: DER_ID_MISMATCH(-2035): 'ID mismatch' diff --git a/src/utils/dlck/tests/fault_templates/DLCK_FAULT_POOL_OPEN_VERSION/{{UUID}}_vos-0 b/src/utils/dlck/tests/fault_templates/DLCK_FAULT_POOL_OPEN_VERSION/{{UUID}}_vos-0 index 762815f9bf6..ff947730306 100644 --- a/src/utils/dlck/tests/fault_templates/DLCK_FAULT_POOL_OPEN_VERSION/{{UUID}}_vos-0 +++ b/src/utils/dlck/tests/fault_templates/DLCK_FAULT_POOL_OPEN_VERSION/{{UUID}}_vos-0 @@ -6,3 +6,4 @@ Check pool: - Open the pool: ok. - Magic... ok. - Version... error: unsupported (0x1c) +error: Check pool: DER_DF_INCOMPT(-2023): 'Incompatible durable format version' diff --git a/src/vos/vos_pool.c b/src/vos/vos_pool.c index a44037d65b7..3db0d06129f 100644 --- a/src/vos/vos_pool.c +++ b/src/vos/vos_pool.c @@ -1901,11 +1901,10 @@ vos_pool_open_metrics(const char *path, uuid_t uuid, unsigned int flags, void *m out: rc = pool_open_post(&ph, pool_df, flags, metrics, pool, ck, rc); + checker_print_indent_dec(ck); + CK_PRINTFL_RC(ck, rc, "Check pool"); if (rc == 0) { *poh = vos_pool2hdl(pool); - - checker_print_indent_dec(ck); - CK_PRINTFL_RC(ck, rc, "Check pool"); } /* Close this local handle, if it hasn't been consumed nor already From 7c49e95c3929c766622b481d4272e1bcf62496eb Mon Sep 17 00:00:00 2001 From: Jan Michalski Date: Tue, 1 Dec 2026 19:14:05 +0000 Subject: [PATCH 4/7] DAOS-19846 dlck: fix unit test cleanup - fix sys_db path and - removed directories after the test. Signed-off-by: Jan Michalski --- src/utils/dlck/tests/run_fault_injection.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/utils/dlck/tests/run_fault_injection.py b/src/utils/dlck/tests/run_fault_injection.py index 0c8eb9df262..0b24c97bd8c 100755 --- a/src/utils/dlck/tests/run_fault_injection.py +++ b/src/utils/dlck/tests/run_fault_injection.py @@ -123,7 +123,9 @@ def __init__(self, storage, pool_uuid): def _cleanup_paths(self): """Return the VOS file and system database paths under the storage path.""" - return [Path(self._storage) / self._pool_uuid / "vos-0", Path(self._storage) / "sys_db"] + pool_dir = Path(self._storage) / self._pool_uuid + sys_dir = Path(self._storage) / "daos_sys/" + return [pool_dir / "vos-0", sys_dir / "sys_db", pool_dir, sys_dir] def init(self): """Run dlck_test_helper""" @@ -149,7 +151,7 @@ def fini(self): """Remove created VOS file and system database.""" if not self._files_created: return - subprocess.run(["sudo", "rm", "-f", "--", *map(str, self._cleanup_paths())], check=True) + subprocess.run(["sudo", "rm", "-fd", "--", *map(str, self._cleanup_paths())], check=True) self._files_created = False From d9fc1efbcfcdd82a79380468a66c1d4fa28c1924 Mon Sep 17 00:00:00 2001 From: Jan Michalski Date: Wed, 2 Dec 2026 11:58:48 +0000 Subject: [PATCH 5/7] DAOS-19846 dlck: fix unit test Signed-off-by: Jan Michalski --- src/utils/dlck/tests/dlck_checker_macros_ut.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/dlck/tests/dlck_checker_macros_ut.c b/src/utils/dlck/tests/dlck_checker_macros_ut.c index b7813a140a6..25d4bbfa36b 100644 --- a/src/utils/dlck/tests/dlck_checker_macros_ut.c +++ b/src/utils/dlck/tests/dlck_checker_macros_ut.c @@ -271,11 +271,11 @@ test_CK_PRINTF_ERR(void **state) { struct checker *ck = *state; - EXPECT_CHECKER_VFPRINTF("%sworker %d: %s\n", "-> worker 42: failed\n"); + EXPECT_CHECKER_VFPRINTF("%serror: worker %d: %s\n", "-> error: worker 42: failed\n"); CK_PRINTF_ERR(ck, "worker %d: %s\n", 42, "failed"); assert_int_equal(ck->ck_status.errors_num, INITIAL_ERRORS + 1); - EXPECT_CHECKER_VFPRINTF("%sworker %d: %s\n", "-> worker 43: corrupted\n"); + EXPECT_CHECKER_VFPRINTF("%serror: worker %d: %s\n", "-> error: worker 43: corrupted\n"); CK_PRINTF_ERR(ck, "worker %d: %s\n", 43, "corrupted"); assert_int_equal(ck->ck_status.errors_num, INITIAL_ERRORS + 2); From c6181dba26a26c8dd9617d7869c67f267deab13a Mon Sep 17 00:00:00 2001 From: Jan Michalski Date: Fri, 27 Nov 2026 15:57:53 +0000 Subject: [PATCH 6/7] DAOS-20082 dlck: reduce templates fluff Introduce environment variables to control the scope of the DLCK check. Use these variables to reduce the length of test logs. Significantly reduce the amount of fluff in the fault-injection test templates. Bonus: Print the diff if a discrepancy is find. skip-unit-test-with-memcheck: true skip-test-rpms: true Skip-func-vm: true Skip-fault-injection-test: true Skip-test-el-9.6-rpms: true Skip-test-leap-15-rpms: true Skip-func-hw-test: true Skip-NLT: true Skip-func-test-el9: true Signed-off-by: Jan Michalski --- src/utils/dlck/cmds/dlck_cmd_check.c | 16 ++++-- src/utils/dlck/dlck_args.c | 21 ++++++- src/utils/dlck/dlck_args.h | 7 +++ .../DAOS_FAULT_CONT_INV_PAD/{{UUID}}_vos-0 | 35 ------------ .../{{UUID}}_vos-0 | 35 ------------ .../DAOS_FAULT_CONT_INV_USED/{{UUID}}_vos-0 | 35 ------------ .../DAOS_FAULT_CONT_OPEN_UUID/{{UUID}}_vos-0 | 21 ------- .../DAOS_FAULT_DAE_INV_FLAGS/{{UUID}}_vos-0 | 21 ------- .../DAOS_FAULT_DBD_COUNT/{{UUID}}_vos-0 | 21 ------- .../DAOS_FAULT_DBD_MAGIC/{{UUID}}_vos-0 | 21 ------- .../DAOS_FAULT_OBJ_ILOG_MAGIC/{{UUID}}_vos-0 | 21 ------- .../{{UUID}}_vos-0 | 57 ------------------- .../{{UUID}}_vos-0 | 57 ------------------- .../{{UUID}}_vos-0 | 21 ------- .../DLCK_FAULT_ENGINE_JOIN/{{UUID}}_vos-0 | 57 ------------------- src/utils/dlck/tests/run_fault_injection.py | 51 +++++++++-------- 16 files changed, 64 insertions(+), 433 deletions(-) diff --git a/src/utils/dlck/cmds/dlck_cmd_check.c b/src/utils/dlck/cmds/dlck_cmd_check.c index 75bc1028fa1..3c49f4ea0ec 100644 --- a/src/utils/dlck/cmds/dlck_cmd_check.c +++ b/src/utils/dlck/cmds/dlck_cmd_check.c @@ -63,10 +63,12 @@ obj_process(daos_handle_t ih, vos_iter_entry_t *entry, vos_iter_type_t type, struct checker *ck = bndl->ck; int rc; - CK_PRINTF(ck, CK_OID_FMT "...\n", DP_UOID(entry->ie_oid)); - CK_INDENT(ck, rc = vos_iter_check(ih, ck)); - CK_PRINTFL_RC(ck, rc, CK_OID_FMT, DP_UOID(entry->ie_oid)); - dlck_status_set(&bndl->xa->status, &ck->ck_status); + if (bndl->xa->ctrl->scope.objects) { + CK_PRINTF(ck, CK_OID_FMT "...\n", DP_UOID(entry->ie_oid)); + CK_INDENT(ck, rc = vos_iter_check(ih, ck)); + CK_PRINTFL_RC(ck, rc, CK_OID_FMT, DP_UOID(entry->ie_oid)); + dlck_status_set(&bndl->xa->status, &ck->ck_status); + } /** continue checking other objects even if this one failed */ return 0; @@ -117,13 +119,14 @@ cont_process(daos_handle_t ih, vos_iter_entry_t *entry, vos_iter_type_t type, struct xstream_arg *xa = bndl->xa; struct checker *main_ck = &xa->ctrl->checker; struct checker *ck = bndl->ck; + struct checker *eff_ck = xa->ctrl->scope.containers ? ck : NULL; bool fi_reenable; const uint64_t exp_fail_locs[] = {DLCK_FAULT_CONT_DOES_NOT_EXIST, 0}; daos_handle_t coh; int rc; checker_fi_entry(exp_fail_locs, &fi_reenable); - rc = vos_cont_open_ex(param->ip_hdl, entry->ie_couuid, ck, &coh); + rc = vos_cont_open_ex(param->ip_hdl, entry->ie_couuid, eff_ck, &coh); CONT_REPORT_RESULT(main_ck, xa->xs->tgt_id, entry->ie_couuid, rc, ck->ck_status.warnings_num); checker_fi_exit(fi_reenable); @@ -176,6 +179,7 @@ static void pool_process(struct xstream_arg *xa, struct dlck_file *file, struct checker *ck) { struct checker *main_ck = &xa->ctrl->checker; + struct checker *eff_ck = xa->ctrl->scope.pools ? ck : NULL; char *path = NULL; bool fi_reenable; const uint64_t exp_fail_locs[] = {DLCK_FAULT_POOL_NVME_HEALTH, @@ -214,7 +218,7 @@ pool_process(struct xstream_arg *xa, struct dlck_file *file, struct checker *ck) } checker_fi_entry(exp_fail_locs, &fi_reenable); - rc = vos_pool_open_metrics(path, file->po_uuid, DLCK_POOL_OPEN_FLAGS, NULL, ck, &poh); + rc = vos_pool_open_metrics(path, file->po_uuid, DLCK_POOL_OPEN_FLAGS, NULL, eff_ck, &poh); checker_fi_exit(fi_reenable); POOL_REPORT_RESULT(main_ck, xa->xs->tgt_id, file->po_uuid, rc, ck->ck_status.warnings_num); /** vos_pool_open_metrics() is fully instrumented, so rc is already accounted for in the diff --git a/src/utils/dlck/dlck_args.c b/src/utils/dlck/dlck_args.c index 34e24104424..41938aff3a3 100644 --- a/src/utils/dlck/dlck_args.c +++ b/src/utils/dlck/dlck_args.c @@ -1,5 +1,5 @@ /** - * (C) Copyright 2025 Hewlett Packard Enterprise Development LP + * (C) Copyright 2025-2026 Hewlett Packard Enterprise Development LP * * SPDX-License-Identifier: BSD-2-Clause-Patent */ @@ -60,11 +60,28 @@ parser(int key, char *arg, struct argp_state *state) static struct argp argp = {empty_options, parser, NULL /** usage */, doc, children}; +void +dlck_env(struct dlck_control *ctrl) +{ + char *env; + + /** + * Provide an environment variable to disable checking of specific scopes. + * When no environment variable is set, the corresponding scope will be checked. + */ + ctrl->scope.pools = d_agetenv_str(&env, "DLCK_CHECK_NO_POOLS") != DER_SUCCESS; + ctrl->scope.containers = d_agetenv_str(&env, "DLCK_CHECK_NO_CONTAINERS") != DER_SUCCESS; + ctrl->scope.objects = d_agetenv_str(&env, "DLCK_CHECK_NO_OBJECTS") != DER_SUCCESS; +} + void dlck_args_parse(int argc, char *argv[], struct dlck_control *ctrl) { - error_t ret = argp_parse(&argp, argc, argv, ARGP_IN_ORDER, 0, ctrl); + error_t ret; + + dlck_env(ctrl); + ret = argp_parse(&argp, argc, argv, ARGP_IN_ORDER, 0, ctrl); if (ret != 0) { D_ERROR("Parsing arguments failed: %d", ret); exit(ret); diff --git a/src/utils/dlck/dlck_args.h b/src/utils/dlck/dlck_args.h index 0e3417fe215..40b0630f44d 100644 --- a/src/utils/dlck/dlck_args.h +++ b/src/utils/dlck/dlck_args.h @@ -105,6 +105,12 @@ dlck_args_files_num(struct dlck_args_files *files) return num; } +struct dlck_check_scope { + bool pools; + bool containers; + bool objects; +}; + /** * @struct dlck_control * @@ -114,6 +120,7 @@ struct dlck_control { /** in */ struct dlck_args_common common; struct dlck_args_files files; + struct dlck_check_scope scope; struct dlck_args_engine engine; /** checker */ struct checker checker; diff --git a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_INV_PAD/{{UUID}}_vos-0 b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_INV_PAD/{{UUID}}_vos-0 index 5de0ae61ae1..67503e51835 100644 --- a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_INV_PAD/{{UUID}}_vos-0 +++ b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_INV_PAD/{{UUID}}_vos-0 @@ -1,25 +1,4 @@ VOS file allocation: ok. -Check pool: - path: {{STORAGE}}/{{UUID}}/vos-0 - uuid: {{UUID}} -- NVMe devices (if applicable)... ok. -- Open the pool: ok. -- Magic... ok. -- Version... ok. -- UUID... ok. -- Containers tree... --- Tree class... ok. --- Tree features... ok. --- Node (off=0xa7a4c0)... ok. -- Containers tree: ok. -- Pool extension (off=0x400550)... -- Pool extension (off=0x400550): ok. -- Garbage collector's tree... --- Tree class... ok. --- Tree features... ok. --- Empty tree -- Garbage collector's tree: ok. -Check pool: ok. Check container: uuid: {{UUID}} - uuid... ok. @@ -63,17 +42,3 @@ Check container: -- DTX blob (off=0x514650)... ok. - Active DTX blob list: ok. Check container: ok. -Check oid: 1185667690.2136093645.0.0... -- Dkey tree... --- Tree class... ok. --- Tree features... ok. --- Node (off=0xb01880)... ok. -- Dkey tree: ok. -Check oid: 1185667690.2136093645.0.0: ok. -Check oid: 471378945.1581695481.0.0... -- Dkey tree... --- Tree class... ok. --- Tree features... ok. --- Node (off=0xb016a0)... ok. -- Dkey tree: ok. -Check oid: 471378945.1581695481.0.0: ok. diff --git a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_INV_RESERV_UPGRADE/{{UUID}}_vos-0 b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_INV_RESERV_UPGRADE/{{UUID}}_vos-0 index 76879c0bfcd..0bec56f350a 100644 --- a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_INV_RESERV_UPGRADE/{{UUID}}_vos-0 +++ b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_INV_RESERV_UPGRADE/{{UUID}}_vos-0 @@ -1,25 +1,4 @@ VOS file allocation: ok. -Check pool: - path: {{STORAGE}}/{{UUID}}/vos-0 - uuid: {{UUID}} -- NVMe devices (if applicable)... ok. -- Open the pool: ok. -- Magic... ok. -- Version... ok. -- UUID... ok. -- Containers tree... --- Tree class... ok. --- Tree features... ok. --- Node (off=0xa7a4c0)... ok. -- Containers tree: ok. -- Pool extension (off=0x400550)... -- Pool extension (off=0x400550): ok. -- Garbage collector's tree... --- Tree class... ok. --- Tree features... ok. --- Empty tree -- Garbage collector's tree: ok. -Check pool: ok. Check container: uuid: {{UUID}} - uuid... ok. @@ -63,17 +42,3 @@ Check container: -- DTX blob (off=0x514650)... ok. - Active DTX blob list: ok. Check container: ok. -Check oid: 1185667690.2136093645.0.0... -- Dkey tree... --- Tree class... ok. --- Tree features... ok. --- Node (off=0xb01880)... ok. -- Dkey tree: ok. -Check oid: 1185667690.2136093645.0.0: ok. -Check oid: 471378945.1581695481.0.0... -- Dkey tree... --- Tree class... ok. --- Tree features... ok. --- Node (off=0xb016a0)... ok. -- Dkey tree: ok. -Check oid: 471378945.1581695481.0.0: ok. diff --git a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_INV_USED/{{UUID}}_vos-0 b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_INV_USED/{{UUID}}_vos-0 index 6c7815763f5..53f5df2c805 100644 --- a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_INV_USED/{{UUID}}_vos-0 +++ b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_INV_USED/{{UUID}}_vos-0 @@ -1,25 +1,4 @@ VOS file allocation: ok. -Check pool: - path: {{STORAGE}}/{{UUID}}/vos-0 - uuid: {{UUID}} -- NVMe devices (if applicable)... ok. -- Open the pool: ok. -- Magic... ok. -- Version... ok. -- UUID... ok. -- Containers tree... --- Tree class... ok. --- Tree features... ok. --- Node (off=0xa7a4c0)... ok. -- Containers tree: ok. -- Pool extension (off=0x400550)... -- Pool extension (off=0x400550): ok. -- Garbage collector's tree... --- Tree class... ok. --- Tree features... ok. --- Empty tree -- Garbage collector's tree: ok. -Check pool: ok. Check container: uuid: {{UUID}} - uuid... ok. @@ -63,17 +42,3 @@ Check container: -- DTX blob (off=0x514650)... ok. - Active DTX blob list: ok. Check container: ok. -Check oid: 1185667690.2136093645.0.0... -- Dkey tree... --- Tree class... ok. --- Tree features... ok. --- Node (off=0xb01880)... ok. -- Dkey tree: ok. -Check oid: 1185667690.2136093645.0.0: ok. -Check oid: 471378945.1581695481.0.0... -- Dkey tree... --- Tree class... ok. --- Tree features... ok. --- Node (off=0xb016a0)... ok. -- Dkey tree: ok. -Check oid: 471378945.1581695481.0.0: ok. diff --git a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_OPEN_UUID/{{UUID}}_vos-0 b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_OPEN_UUID/{{UUID}}_vos-0 index a3c15a33f58..117a9f6a913 100644 --- a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_OPEN_UUID/{{UUID}}_vos-0 +++ b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_CONT_OPEN_UUID/{{UUID}}_vos-0 @@ -1,25 +1,4 @@ VOS file allocation: ok. -Check pool: - path: {{STORAGE}}/{{UUID}}/vos-0 - uuid: {{UUID}} -- NVMe devices (if applicable)... ok. -- Open the pool: ok. -- Magic... ok. -- Version... ok. -- UUID... ok. -- Containers tree... --- Tree class... ok. --- Tree features... ok. --- Node (off=0xa7a4c0)... ok. -- Containers tree: ok. -- Pool extension (off=0x400550)... -- Pool extension (off=0x400550): ok. -- Garbage collector's tree... --- Tree class... ok. --- Tree features... ok. --- Empty tree -- Garbage collector's tree: ok. -Check pool: ok. Check container: uuid: {{UUID}} - uuid... error: mismatch ({{UUID}} != {{UUID}}) diff --git a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_DAE_INV_FLAGS/{{UUID}}_vos-0 b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_DAE_INV_FLAGS/{{UUID}}_vos-0 index b0b92759147..8ad77b81169 100644 --- a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_DAE_INV_FLAGS/{{UUID}}_vos-0 +++ b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_DAE_INV_FLAGS/{{UUID}}_vos-0 @@ -1,25 +1,4 @@ VOS file allocation: ok. -Check pool: - path: {{STORAGE}}/{{UUID}}/vos-0 - uuid: {{UUID}} -- NVMe devices (if applicable)... ok. -- Open the pool: ok. -- Magic... ok. -- Version... ok. -- UUID... ok. -- Containers tree... --- Tree class... ok. --- Tree features... ok. --- Node (off=0xa7a4c0)... ok. -- Containers tree: ok. -- Pool extension (off=0x400550)... -- Pool extension (off=0x400550): ok. -- Garbage collector's tree... --- Tree class... ok. --- Tree features... ok. --- Empty tree -- Garbage collector's tree: ok. -Check pool: ok. Check container: uuid: {{UUID}} - uuid... ok. diff --git a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_DBD_COUNT/{{UUID}}_vos-0 b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_DBD_COUNT/{{UUID}}_vos-0 index f3b2b4563f5..32ce619a991 100644 --- a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_DBD_COUNT/{{UUID}}_vos-0 +++ b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_DBD_COUNT/{{UUID}}_vos-0 @@ -1,25 +1,4 @@ VOS file allocation: ok. -Check pool: - path: {{STORAGE}}/{{UUID}}/vos-0 - uuid: {{UUID}} -- NVMe devices (if applicable)... ok. -- Open the pool: ok. -- Magic... ok. -- Version... ok. -- UUID... ok. -- Containers tree... --- Tree class... ok. --- Tree features... ok. --- Node (off=0xa7a4c0)... ok. -- Containers tree: ok. -- Pool extension (off=0x400550)... -- Pool extension (off=0x400550): ok. -- Garbage collector's tree... --- Tree class... ok. --- Tree features... ok. --- Empty tree -- Garbage collector's tree: ok. -Check pool: ok. Check container: uuid: {{UUID}} - uuid... ok. diff --git a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_DBD_MAGIC/{{UUID}}_vos-0 b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_DBD_MAGIC/{{UUID}}_vos-0 index 78188113755..1e4ff517489 100644 --- a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_DBD_MAGIC/{{UUID}}_vos-0 +++ b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_DBD_MAGIC/{{UUID}}_vos-0 @@ -1,25 +1,4 @@ VOS file allocation: ok. -Check pool: - path: {{STORAGE}}/{{UUID}}/vos-0 - uuid: {{UUID}} -- NVMe devices (if applicable)... ok. -- Open the pool: ok. -- Magic... ok. -- Version... ok. -- UUID... ok. -- Containers tree... --- Tree class... ok. --- Tree features... ok. --- Node (off=0xa7a4c0)... ok. -- Containers tree: ok. -- Pool extension (off=0x400550)... -- Pool extension (off=0x400550): ok. -- Garbage collector's tree... --- Tree class... ok. --- Tree features... ok. --- Empty tree -- Garbage collector's tree: ok. -Check pool: ok. Check container: uuid: {{UUID}} - uuid... ok. diff --git a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_OBJ_ILOG_MAGIC/{{UUID}}_vos-0 b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_OBJ_ILOG_MAGIC/{{UUID}}_vos-0 index 64ef5526b62..2850316dc3f 100644 --- a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_OBJ_ILOG_MAGIC/{{UUID}}_vos-0 +++ b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_OBJ_ILOG_MAGIC/{{UUID}}_vos-0 @@ -1,25 +1,4 @@ VOS file allocation: ok. -Check pool: - path: {{STORAGE}}/{{UUID}}/vos-0 - uuid: {{UUID}} -- NVMe devices (if applicable)... ok. -- Open the pool: ok. -- Magic... ok. -- Version... ok. -- UUID... ok. -- Containers tree... --- Tree class... ok. --- Tree features... ok. --- Node (off=0xa7a4c0)... ok. -- Containers tree: ok. -- Pool extension (off=0x400550)... -- Pool extension (off=0x400550): ok. -- Garbage collector's tree... --- Tree class... ok. --- Tree features... ok. --- Empty tree -- Garbage collector's tree: ok. -Check pool: ok. Check container: uuid: {{UUID}} - uuid... ok. diff --git a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_POOL_EXT_PADDING/{{UUID}}_vos-0 b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_POOL_EXT_PADDING/{{UUID}}_vos-0 index 7397edee1d4..95e7abb0853 100644 --- a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_POOL_EXT_PADDING/{{UUID}}_vos-0 +++ b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_POOL_EXT_PADDING/{{UUID}}_vos-0 @@ -72,60 +72,3 @@ Check pool: -- Empty tree - Garbage collector's tree: ok. Check pool: ok. -Check container: - uuid: {{UUID}} -- uuid... ok. -- Padding (cd_pad)... ok. -- Padding (cd_used)... ok. -- Reserved (cd_reserv_upgrade)... ok. -- Object index tree... --- Tree class... ok. --- Tree features... ok. --- Node (off=0xa7a6c0)... ok. ---- Record fetch (off=0xac05c0)... ok. ----- Object (oid=1185667690.2136093645.0.0)... ------ ILOG... ok. ----- Object (oid=1185667690.2136093645.0.0)... ok. ---- Record fetch (off=0xac0540)... ok. ----- Object (oid=471378945.1581695481.0.0)... ------ ILOG... ok. ----- Object (oid=471378945.1581695481.0.0)... ok. -- Object index tree: ok. -- Active DTX blob list... --- DTX blob (off=0x514650)... ---- Magic... ok. ---- 7 active entries: ----- [0] ID (dae_xid)... ok. ----- [0] LID (dae_lid)... ok. ----- [0] Append to active DTX tree... ok. ----- [1] ID (dae_xid)... ok. ----- [1] LID (dae_lid)... ok. ----- [1] Append to active DTX tree... ok. ----- [2] flagged invalid. ----- [3] ID (dae_xid)... ok. ----- [3] LID (dae_lid)... ok. ----- [3] Append to active DTX tree... ok. ----- [4] flagged invalid. ----- [5] ID (dae_xid)... ok. ----- [5] LID (dae_lid)... ok. ----- [5] Append to active DTX tree... ok. ----- [6] ID (dae_xid)... ok. ----- [6] LID (dae_lid)... ok. ----- [6] Append to active DTX tree... ok. --- DTX blob (off=0x514650)... ok. -- Active DTX blob list: ok. -Check container: ok. -Check oid: 1185667690.2136093645.0.0... -- Dkey tree... --- Tree class... ok. --- Tree features... ok. --- Node (off=0xb01880)... ok. -- Dkey tree: ok. -Check oid: 1185667690.2136093645.0.0: ok. -Check oid: 471378945.1581695481.0.0... -- Dkey tree... --- Tree class... ok. --- Tree features... ok. --- Node (off=0xb016a0)... ok. -- Dkey tree: ok. -Check oid: 471378945.1581695481.0.0: ok. diff --git a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_POOL_EXT_RESERVED/{{UUID}}_vos-0 b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_POOL_EXT_RESERVED/{{UUID}}_vos-0 index 827d42c7488..a3d0a737d3a 100644 --- a/src/utils/dlck/tests/fault_templates/DAOS_FAULT_POOL_EXT_RESERVED/{{UUID}}_vos-0 +++ b/src/utils/dlck/tests/fault_templates/DAOS_FAULT_POOL_EXT_RESERVED/{{UUID}}_vos-0 @@ -21,60 +21,3 @@ Check pool: -- Empty tree - Garbage collector's tree: ok. Check pool: ok. -Check container: - uuid: {{UUID}} -- uuid... ok. -- Padding (cd_pad)... ok. -- Padding (cd_used)... ok. -- Reserved (cd_reserv_upgrade)... ok. -- Object index tree... --- Tree class... ok. --- Tree features... ok. --- Node (off=0xa7a6c0)... ok. ---- Record fetch (off=0xac05c0)... ok. ----- Object (oid=1185667690.2136093645.0.0)... ------ ILOG... ok. ----- Object (oid=1185667690.2136093645.0.0)... ok. ---- Record fetch (off=0xac0540)... ok. ----- Object (oid=471378945.1581695481.0.0)... ------ ILOG... ok. ----- Object (oid=471378945.1581695481.0.0)... ok. -- Object index tree: ok. -- Active DTX blob list... --- DTX blob (off=0x514650)... ---- Magic... ok. ---- 7 active entries: ----- [0] ID (dae_xid)... ok. ----- [0] LID (dae_lid)... ok. ----- [0] Append to active DTX tree... ok. ----- [1] ID (dae_xid)... ok. ----- [1] LID (dae_lid)... ok. ----- [1] Append to active DTX tree... ok. ----- [2] flagged invalid. ----- [3] ID (dae_xid)... ok. ----- [3] LID (dae_lid)... ok. ----- [3] Append to active DTX tree... ok. ----- [4] flagged invalid. ----- [5] ID (dae_xid)... ok. ----- [5] LID (dae_lid)... ok. ----- [5] Append to active DTX tree... ok. ----- [6] ID (dae_xid)... ok. ----- [6] LID (dae_lid)... ok. ----- [6] Append to active DTX tree... ok. --- DTX blob (off=0x514650)... ok. -- Active DTX blob list: ok. -Check container: ok. -Check oid: 1185667690.2136093645.0.0... -- Dkey tree... --- Tree class... ok. --- Tree features... ok. --- Node (off=0xb01880)... ok. -- Dkey tree: ok. -Check oid: 1185667690.2136093645.0.0: ok. -Check oid: 471378945.1581695481.0.0... -- Dkey tree... --- Tree class... ok. --- Tree features... ok. --- Node (off=0xb016a0)... ok. -- Dkey tree: ok. -Check oid: 471378945.1581695481.0.0: ok. diff --git a/src/utils/dlck/tests/fault_templates/DLCK_FAULT_CONT_DOES_NOT_EXIST/{{UUID}}_vos-0 b/src/utils/dlck/tests/fault_templates/DLCK_FAULT_CONT_DOES_NOT_EXIST/{{UUID}}_vos-0 index 79518f65b39..32522fcd4dd 100644 --- a/src/utils/dlck/tests/fault_templates/DLCK_FAULT_CONT_DOES_NOT_EXIST/{{UUID}}_vos-0 +++ b/src/utils/dlck/tests/fault_templates/DLCK_FAULT_CONT_DOES_NOT_EXIST/{{UUID}}_vos-0 @@ -1,25 +1,4 @@ VOS file allocation: ok. -Check pool: - path: {{STORAGE}}/{{UUID}}/vos-0 - uuid: {{UUID}} -- NVMe devices (if applicable)... ok. -- Open the pool: ok. -- Magic... ok. -- Version... ok. -- UUID... ok. -- Containers tree... --- Tree class... ok. --- Tree features... ok. --- Node (off=0xa7a4c0)... ok. -- Containers tree: ok. -- Pool extension (off=0x400550)... -- Pool extension (off=0x400550): ok. -- Garbage collector's tree... --- Tree class... ok. --- Tree features... ok. --- Empty tree -- Garbage collector's tree: ok. -Check pool: ok. Check container: uuid: {{UUID}} - error: Container does not exist. diff --git a/src/utils/dlck/tests/fault_templates/DLCK_FAULT_ENGINE_JOIN/{{UUID}}_vos-0 b/src/utils/dlck/tests/fault_templates/DLCK_FAULT_ENGINE_JOIN/{{UUID}}_vos-0 index 118e9ed1fd0..c6464ab3535 100644 --- a/src/utils/dlck/tests/fault_templates/DLCK_FAULT_ENGINE_JOIN/{{UUID}}_vos-0 +++ b/src/utils/dlck/tests/fault_templates/DLCK_FAULT_ENGINE_JOIN/{{UUID}}_vos-0 @@ -20,60 +20,3 @@ Check pool: -- Empty tree - Garbage collector's tree: ok. Check pool: ok. -Check container: - uuid: {{UUID}} -- uuid... ok. -- Padding (cd_pad)... ok. -- Padding (cd_used)... ok. -- Reserved (cd_reserv_upgrade)... ok. -- Object index tree... --- Tree class... ok. --- Tree features... ok. --- Node (off=0xa7a6c0)... ok. ---- Record fetch (off=0xac05c0)... ok. ----- Object (oid=1185667690.2136093645.0.0)... ------ ILOG... ok. ----- Object (oid=1185667690.2136093645.0.0)... ok. ---- Record fetch (off=0xac0540)... ok. ----- Object (oid=471378945.1581695481.0.0)... ------ ILOG... ok. ----- Object (oid=471378945.1581695481.0.0)... ok. -- Object index tree: ok. -- Active DTX blob list... --- DTX blob (off=0x514650)... ---- Magic... ok. ---- 7 active entries: ----- [0] ID (dae_xid)... ok. ----- [0] LID (dae_lid)... ok. ----- [0] Append to active DTX tree... ok. ----- [1] ID (dae_xid)... ok. ----- [1] LID (dae_lid)... ok. ----- [1] Append to active DTX tree... ok. ----- [2] flagged invalid. ----- [3] ID (dae_xid)... ok. ----- [3] LID (dae_lid)... ok. ----- [3] Append to active DTX tree... ok. ----- [4] flagged invalid. ----- [5] ID (dae_xid)... ok. ----- [5] LID (dae_lid)... ok. ----- [5] Append to active DTX tree... ok. ----- [6] ID (dae_xid)... ok. ----- [6] LID (dae_lid)... ok. ----- [6] Append to active DTX tree... ok. --- DTX blob (off=0x514650)... ok. -- Active DTX blob list: ok. -Check container: ok. -Check oid: 1185667690.2136093645.0.0... -- Dkey tree... --- Tree class... ok. --- Tree features... ok. --- Node (off=0xb01880)... ok. -- Dkey tree: ok. -Check oid: 1185667690.2136093645.0.0: ok. -Check oid: 471378945.1581695481.0.0... -- Dkey tree... --- Tree class... ok. --- Tree features... ok. --- Node (off=0xb016a0)... ok. -- Dkey tree: ok. -Check oid: 471378945.1581695481.0.0: ok. diff --git a/src/utils/dlck/tests/run_fault_injection.py b/src/utils/dlck/tests/run_fault_injection.py index 0b24c97bd8c..be031ff7627 100755 --- a/src/utils/dlck/tests/run_fault_injection.py +++ b/src/utils/dlck/tests/run_fault_injection.py @@ -6,6 +6,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent """ import argparse +import difflib import json import os import re @@ -168,9 +169,9 @@ def has_nvme(self): """Return True if an NVMe device is specified.""" return self._nvme is not None - def run(self, config): + def run(self, config, env={}): """Run dlck with the fault config; return the exit code and stdout.""" - env = dict(os.environ, D_FI_CONFIG=str(config)) + env = dict(os.environ, D_FI_CONFIG=str(config), **env) cmd = ["sudo", "-E", str(self._dlck), "--file", self._file_arg, "--storage", self._storage, "--targets", "1"] if self._nvme is not None: @@ -198,17 +199,11 @@ def normalize(cls, text): @classmethod def compare_text(cls, name, expected, actual): - """Return mismatch messages between a template and the actual text, line by line.""" - errors = [] + """Return a unified diff between a template and the actual text, empty if they match.""" exp_lines = cls.normalize(expected).splitlines() act_lines = cls.normalize(actual).splitlines() - if len(exp_lines) != len(act_lines): - errors.append(f"{name}: {len(act_lines)} line(s), template has {len(exp_lines)}") - # enumerate(..., 1) starts line numbering at 1 - for num, (exp, act) in enumerate(zip(exp_lines, act_lines), 1): - if exp != act: - errors.append(f"{name}:{num}: expected '{exp}', got '{act}'") - return errors + return list(difflib.unified_diff(exp_lines, act_lines, fromfile=f"template/{name}", + tofile=f"actual/{name}", lineterm="")) @classmethod def compare_logs(cls, expected_files, actual_dir): @@ -298,6 +293,25 @@ def _make_config(fault_id): """Return the YAML config text that enables only the given fault.""" return yaml.safe_dump({"fault_config": [{"id": int(fault_id)}]}, sort_keys=False) + @staticmethod + def _env(name): + """Return the environment variables for the given fault.""" + pool_faults = ["ENGINE", "POOL", "CONT_TREE"] + cont_faults = ["CONT", "OBJ_ILOG", "DAE", "DBD"] + env_check_pool_only = { + "DLCK_CHECK_NO_CONTAINERS": "1", + "DLCK_CHECK_NO_OBJECTS": "1", + } + env_check_cont_only = { + "DLCK_CHECK_NO_POOLS": "1", + "DLCK_CHECK_NO_OBJECTS": "1", + } + if any(fault in name for fault in pool_faults): + return env_check_pool_only + elif any(fault in name for fault in cont_faults): + return env_check_cont_only + return {} + @staticmethod def _collect_logs(log_dir, dest): """Copy dlck's log directory to dest and remove the original.""" @@ -306,15 +320,6 @@ def _collect_logs(log_dir, dest): str(dest)], check=True) subprocess.run(["sudo", "rm", "-rf", log_dir], check=True) - @staticmethod - def _print_logs(logs_dir): - """Print the content of every collected log file to stdout.""" - if not logs_dir.is_dir(): - return - for log in sorted(p for p in logs_dir.rglob("*") if p.is_file()): - print(f"--- {log.relative_to(logs_dir)} ---") - print(log.read_text()) - def _skip_code(self, name): """Return the ReturnCode for a fault that must be skipped, or None to run it.""" if name in FaultCatalog.UNSUPPORTED_FAULTS: @@ -341,13 +346,14 @@ def run_fault(self, fault): if skip_code is not None: return skip_code - # generate result directory and config for the fault + # generate result directory, config, and env for the fault result_dir = Path(tempfile.mkdtemp(prefix=f"{name}_")) config = result_dir / "fault_injection_dlck.yaml" config.write_text(self._make_config(fault_id)) + env = self._env(name) # run dlck with the generated config and capture output - rc, output, errors = self._runner.run(config) + rc, output, errors = self._runner.run(config, env) (result_dir / "output.txt").write_text(output) # collect logs if dlck produced any @@ -375,7 +381,6 @@ def run_fault(self, fault): if errors: print("FAIL") print("\n".join(errors)) - self._print_logs(logs_dir) return self.ReturnCode.FAIL print("PASS") return self.ReturnCode.OK From a0f91da2684bfb47955c8a85be344ba70dfd9713 Mon Sep 17 00:00:00 2001 From: Jan Michalski Date: Wed, 2 Dec 2026 15:13:49 +0000 Subject: [PATCH 7/7] DAOS-19846 dlck: make the unit test more robust Another unit test may leave the default /mnt/daos directory dirty. In this case this unit test would complain as follows: Create and populate a pool with standard data: stale files already exist, remove them first: /mnt/daos/daos_sys Mounting tmpfs instead is both non-destructive and robust. Signed-off-by: Jan Michalski --- src/utils/dlck/tests/run_fault_injection.py | 25 ++++++++------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/src/utils/dlck/tests/run_fault_injection.py b/src/utils/dlck/tests/run_fault_injection.py index be031ff7627..863d5cd9f41 100755 --- a/src/utils/dlck/tests/run_fault_injection.py +++ b/src/utils/dlck/tests/run_fault_injection.py @@ -41,6 +41,7 @@ MD-on-PMem mode: In this mode, a pool is automatically created and populated using `dlck_test_helper`. \ +The storage directory is temporarily mounted as tmpfs, hiding its existing contents. \ Most templates are optimized for this mode, but some faults cannot be tested in it. MD-on-SSD mode: @@ -120,20 +121,13 @@ class DlckTestHelperRunner: def __init__(self, storage, pool_uuid): self._storage = storage self._pool_uuid = pool_uuid - self._files_created = False - - def _cleanup_paths(self): - """Return the VOS file and system database paths under the storage path.""" - pool_dir = Path(self._storage) / self._pool_uuid - sys_dir = Path(self._storage) / "daos_sys/" - return [pool_dir / "vos-0", sys_dir / "sys_db", pool_dir, sys_dir] + self._mounted = False def init(self): """Run dlck_test_helper""" - existing = [p for p in self._cleanup_paths() if p.exists()] - if existing: - names = ", ".join(str(p) for p in existing) - raise SystemExit(f"stale files already exist, remove them first: {names}") + subprocess.run(["sudo", "mount", "-t", "tmpfs", "--", "tmpfs", self._storage], + check=True) + self._mounted = True cmd = ["sudo", "-E", str(self.DLCK_TEST_HELPER), "--file", self._pool_uuid, "--storage", self._storage, "--create_pools", "--verbose", "--targets", "1"] env = dict(os.environ, DLCK_NO_NVME="1") @@ -143,17 +137,16 @@ def init(self): raise SystemExit(f"dlck_test_helper failed with exit code {proc.returncode}\n\n" f"{proc.stderr}\n\n{proc.stdout}") print(proc.stdout) - self._files_created = True # Change permissions of the VOS file to be read-only. vos_file = Path(self._storage) / self._pool_uuid / "vos-0" subprocess.run(["sudo", "chmod", "440", str(vos_file)], check=True) def fini(self): - """Remove created VOS file and system database.""" - if not self._files_created: + """Unmount the temporary storage.""" + if not self._mounted: return - subprocess.run(["sudo", "rm", "-fd", "--", *map(str, self._cleanup_paths())], check=True) - self._files_created = False + subprocess.run(["sudo", "umount", "--", self._storage], check=True) + self._mounted = False class DlckRunner: