From c647d4581f5578d76896b96f1ead6287d7e34eeb Mon Sep 17 00:00:00 2001 From: Kenneth Cain Date: Thu, 5 Nov 2026 16:59:30 -0500 Subject: [PATCH 1/4] DAOS-19789 test: report unrunnable cmocka tests as skipped Replace silent prerequisite returns with cmocka skip() calls. Add test_runable_or_skip() as a macro to preserve the calling file and line, and convert existing simple skip guards to use it. Preserve compound conditions, diagnostic messages, and boolean checks selecting optional subcases. Increase REBUILD21's service replica count from three to five so its test body can execute. Skip-nlt: true Skip-fault-injection-test: true Test-tag: pr test_rebuild_31 test_rebuild_32 test_rebuild_33 test_rebuild_34 test_rebuild_35 test_rebuild_36 test_rebuild_37 Signed-off-by: Kenneth Cain --- src/tests/ftest/daos_test/rebuild.yaml | 2 +- src/tests/suite/daos_aggregate_ec.c | 10 +-- src/tests/suite/daos_array.c | 3 +- src/tests/suite/daos_base_tx.c | 48 ++++------- src/tests/suite/daos_checksum.c | 43 +++++----- src/tests/suite/daos_container.c | 6 +- src/tests/suite/daos_degrade_ec.c | 17 ++-- src/tests/suite/daos_dist_tx.c | 72 ++++++---------- src/tests/suite/daos_drain_common.c | 5 +- src/tests/suite/daos_drain_simple.c | 38 +++------ src/tests/suite/daos_extend_simple.c | 15 ++-- src/tests/suite/daos_obj.c | 40 ++++----- src/tests/suite/daos_obj_ec.c | 96 ++++++++-------------- src/tests/suite/daos_pool.c | 3 +- src/tests/suite/daos_rebuild.c | 93 ++++++++------------- src/tests/suite/daos_rebuild_ec.c | 53 +++++------- src/tests/suite/daos_rebuild_interactive.c | 20 ++--- src/tests/suite/daos_rebuild_simple.c | 79 ++++++------------ src/tests/suite/daos_test.h | 10 +++ src/tests/suite/daos_upgrade.c | 7 +- src/tests/suite/daos_verify_consistency.c | 22 ++--- src/tests/suite/dfs_par_test.c | 3 +- 22 files changed, 251 insertions(+), 434 deletions(-) diff --git a/src/tests/ftest/daos_test/rebuild.yaml b/src/tests/ftest/daos_test/rebuild.yaml index fbff71863b2..343c9423511 100644 --- a/src/tests/ftest/daos_test/rebuild.yaml +++ b/src/tests/ftest/daos_test/rebuild.yaml @@ -121,7 +121,7 @@ daos_tests: test_rebuild_18: -s3 -u subtests="18" test_rebuild_19: -s3 -u subtests="19" test_rebuild_20: -s3 -u subtests="20" - test_rebuild_21: -s3 -u subtests="21" + test_rebuild_21: -s5 -u subtests="21" test_rebuild_22: -s3 -u subtests="22" test_rebuild_23: -s3 -u subtests="23" test_rebuild_24: -s3 -u subtests="24" diff --git a/src/tests/suite/daos_aggregate_ec.c b/src/tests/suite/daos_aggregate_ec.c index e361fed5580..850dca1218d 100644 --- a/src/tests/suite/daos_aggregate_ec.c +++ b/src/tests/suite/daos_aggregate_ec.c @@ -1,4 +1,6 @@ -/** * (C) Copyright 2020-2022 Intel Corporation. +/** + * (C) Copyright 2020-2022 Intel Corporation. + * (C) Copyright 2026 Hewlett Packard Enterprise Development LP * * SPDX-License-Identifier: BSD-2-Clause-Patent */ @@ -845,8 +847,7 @@ test_all_ec_agg(void **statep) test_arg_t *arg = *statep; struct ec_agg_test_ctx ctx = { 0 }; - if (!test_runable(arg, 5)) - return; + test_runable_or_skip(arg, 5); daos_pool_set_prop(arg->pool.pool_uuid, "reclaim", "disabled"); setup_ec_agg_tests(statep, &ctx); @@ -892,8 +893,7 @@ fetch_snap_with_agg(void **statep) bool snap_higher = false; int rc; - if (!test_runable(arg, 4)) - skip(); + test_runable_or_skip(arg, 4); FAULT_INJECTION_REQUIRED(); diff --git a/src/tests/suite/daos_array.c b/src/tests/suite/daos_array.c index 2d3101bb198..e3c7770686c 100644 --- a/src/tests/suite/daos_array.c +++ b/src/tests/suite/daos_array.c @@ -1229,8 +1229,7 @@ ec_array_key_query(void **state) int rc; par_barrier(PAR_COMM_WORLD); - if (!test_runable(arg, 6)) - skip(); + test_runable_or_skip(arg, 6); oid = daos_test_oid_gen(arg->coh, OC_EC_4P1G1, typeb, 0, arg->myrank); diff --git a/src/tests/suite/daos_base_tx.c b/src/tests/suite/daos_base_tx.c index bebf07bd75c..e3938273b71 100644 --- a/src/tests/suite/daos_base_tx.c +++ b/src/tests/suite/daos_base_tx.c @@ -78,8 +78,7 @@ dtx_io_test_succ(void **state, daos_iod_type_t iod_type) daos_obj_id_t oid; struct ioreq req; - if (!test_runable(arg, dts_dtx_replica_cnt)) - return; + test_runable_or_skip(arg, dts_dtx_replica_cnt); D_ALLOC(update_buf, dts_dtx_iosize); assert_non_null(update_buf); @@ -133,8 +132,7 @@ dtx_io_test_fail(void **state, uint64_t fail_loc) daos_obj_id_t oid; struct ioreq req; - if (!test_runable(arg, dts_dtx_replica_cnt)) - return; + test_runable_or_skip(arg, dts_dtx_replica_cnt); D_ALLOC(update_buf1, dts_dtx_iosize); assert_non_null(update_buf1); @@ -251,8 +249,7 @@ dtx_fetch_committable(void **state, bool punch) struct ioreq req; int rc; - if (!test_runable(arg, dts_dtx_replica_cnt)) - return; + test_runable_or_skip(arg, dts_dtx_replica_cnt); D_ALLOC(update_buf1, dts_dtx_iosize); assert_non_null(update_buf1); @@ -336,8 +333,7 @@ dtx_modify_committable(void **state, bool committable_punch, bool sync_update) daos_obj_id_t oid; struct ioreq req; - if (!test_runable(arg, dts_dtx_replica_cnt)) - return; + test_runable_or_skip(arg, dts_dtx_replica_cnt); D_ALLOC(update_buf1, dts_dtx_iosize); assert_non_null(update_buf1); @@ -420,8 +416,7 @@ dtx_batched_commit(void **state, int count) int rc; int i; - if (!test_runable(arg, dts_dtx_replica_cnt)) - return; + test_runable_or_skip(arg, dts_dtx_replica_cnt); D_ALLOC(update_buf, size); assert_non_null(update_buf); @@ -540,8 +535,7 @@ dtx_14(void **state) print_message("Resend with lost multiple replicated obj request\n"); - if (!test_runable(arg, dts_dtx_replica_cnt)) - return; + test_runable_or_skip(arg, dts_dtx_replica_cnt); dtx_handle_resend(state, DAOS_DTX_LOST_RPC_REQUEST | DAOS_FAIL_ALWAYS, dts_dtx_class); @@ -554,8 +548,7 @@ dtx_15(void **state) print_message("Resend with lost multiple replicated obj reply\n"); - if (!test_runable(arg, dts_dtx_replica_cnt)) - return; + test_runable_or_skip(arg, dts_dtx_replica_cnt); dtx_handle_resend(state, DAOS_DTX_LOST_RPC_REPLY | DAOS_FAIL_ALWAYS, dts_dtx_class); @@ -575,8 +568,7 @@ dtx_16(void **state) print_message("Resend after DTX aggregation\n"); - if (!test_runable(arg, dts_dtx_replica_cnt)) - return; + test_runable_or_skip(arg, dts_dtx_replica_cnt); D_ALLOC(update_buf, dts_dtx_iosize); assert_non_null(update_buf); @@ -631,8 +623,7 @@ dtx_17(void **state) print_message("DTX resync during open-close\n"); - if (!test_runable(arg, dts_dtx_replica_cnt)) - return; + test_runable_or_skip(arg, dts_dtx_replica_cnt); D_ALLOC(update_buf, dts_dtx_iosize); assert_non_null(update_buf); @@ -735,8 +726,7 @@ dtx_19(void **state) print_message("DTX resend during bulk data transfer - multiple reps\n"); - if (!test_runable(arg, 2)) - return; + test_runable_or_skip(arg, 2); dtx_resend_delay(arg, OC_RP_2G1); } @@ -757,8 +747,7 @@ dtx_20(void **state) print_message("race between DTX refresh and DTX resync\n"); - if (!test_runable(arg, dts_dtx_replica_cnt)) - return; + test_runable_or_skip(arg, dts_dtx_replica_cnt); D_ALLOC(update_buf, dts_dtx_iosize); assert_non_null(update_buf); @@ -860,8 +849,7 @@ dtx_21(void **state) print_message("do not abort partially committed DTX\n"); - if (!test_runable(arg, dts_dtx_replica_cnt)) - return; + test_runable_or_skip(arg, dts_dtx_replica_cnt); D_ALLOC(update_buf, dts_dtx_iosize); assert_non_null(update_buf); @@ -910,8 +898,7 @@ dtx_22(void **state) print_message("iteration does not return aborted DTX\n"); - if (!test_runable(arg, dts_dtx_replica_cnt)) - return; + test_runable_or_skip(arg, dts_dtx_replica_cnt); oid = daos_test_oid_gen(arg->coh, dts_dtx_class, DAOS_OT_MULTI_UINT64, 0, arg->myrank); rc = daos_obj_open(arg->coh, oid, DAOS_OO_RW, &oh, NULL); @@ -1002,8 +989,7 @@ dtx_23(void **state) print_message("DTX23: Resend with lost reply from non-leader\n"); - if (!test_runable(arg, dts_dtx_replica_cnt)) - return; + test_runable_or_skip(arg, dts_dtx_replica_cnt); D_ALLOC(update_buf, dts_dtx_iosize); assert_non_null(update_buf); @@ -1044,8 +1030,7 @@ dtx_24(void **state) print_message("DTX24: DTX commit under space pressure with single container\n"); - if (!test_runable(arg, dts_dtx_replica_cnt)) - return; + test_runable_or_skip(arg, dts_dtx_replica_cnt); oid = daos_test_oid_gen(arg->coh, dts_dtx_class, 0, 0, arg->myrank); ioreq_init(&req, arg->coh, oid, DAOS_IOD_ARRAY, arg); @@ -1124,8 +1109,7 @@ dtx_25(void **state) print_message("DTX25: DTX commit under space pressure with multiple containers\n"); - if (!test_runable(arg, 3)) - return; + test_runable_or_skip(arg, 3); redun_prop = daos_prop_alloc(1); assert_non_null(redun_prop); diff --git a/src/tests/suite/daos_checksum.c b/src/tests/suite/daos_checksum.c index dfbacad5d0b..1a25bb7cfbc 100644 --- a/src/tests/suite/daos_checksum.c +++ b/src/tests/suite/daos_checksum.c @@ -1,5 +1,6 @@ /** * (C) Copyright 2019-2023 Intel Corporation. + * (C) Copyright 2026 Hewlett Packard Enterprise Development LP * * SPDX-License-Identifier: BSD-2-Clause-Patent */ @@ -346,8 +347,8 @@ checksum_disabled(void **state) daos_oclass_id_t oc = dts_csum_oc; int rc; - if (csum_ec_enabled() && !test_runable(*state, csum_ec_grp_size())) - skip(); + if (csum_ec_enabled()) + test_runable_or_skip(*state, csum_ec_grp_size()); /** * Setup @@ -388,8 +389,8 @@ io_with_server_side_verify(void **state) FAULT_INJECTION_REQUIRED(); - if (csum_ec_enabled() && !test_runable(*state, csum_ec_grp_size())) - skip(); + if (csum_ec_enabled()) + test_runable_or_skip(*state, csum_ec_grp_size()); /** * Setup @@ -491,8 +492,8 @@ test_fetch_array(void **state) FAULT_INJECTION_REQUIRED(); - if (csum_ec_enabled() && !test_runable(*state, csum_ec_grp_size())) - skip(); + if (csum_ec_enabled()) + test_runable_or_skip(*state, csum_ec_grp_size()); /** * Setup @@ -1309,8 +1310,8 @@ single_value(void **state) { FAULT_INJECTION_REQUIRED(); - if (csum_ec_enabled() && !test_runable(*state, csum_ec_grp_size())) - skip(); + if (csum_ec_enabled()) + test_runable_or_skip(*state, csum_ec_grp_size()); print_message("test small single-value\n"); single_value_test(state, false); @@ -1327,8 +1328,8 @@ dtx_with_csum(void **state) daos_oclass_id_t oc = dts_csum_oc; int rc; - if (csum_ec_enabled() && !test_runable(arg, csum_ec_grp_size())) - skip(); + if (csum_ec_enabled()) + test_runable_or_skip(arg, csum_ec_grp_size()); setup_from_test_args(&ctx, arg); setup_simple_data(&ctx); @@ -1796,8 +1797,7 @@ rebuild_test(void **state, int chunksize, int data_len_bytes, int iod_type) d_rank_list_t *affected_engines = NULL; int rc; - if (!test_runable(*state, 3)) - skip(); + test_runable_or_skip(*state, 3); setup_from_test_args(&ctx, *state); setup_cont_obj(&ctx, DAOS_PROP_CO_CSUM_CRC64, false, chunksize, @@ -2524,9 +2524,7 @@ ec_chunk_plus_one(void **state) { const uint32_t ec_chunk_plus_one = 1024 * 1024 + 1; - if (!test_runable(*state, 3)) - skip(); - + test_runable_or_skip(*state, 3); ARRAY_UPDATE_FETCH_TESTCASE(state, { .oclass = OC_EC_2P1G1, @@ -2546,8 +2544,7 @@ ec_two_chunk_plus_one(void **state) { const uint32_t ec_chunk_plus_one = 2 * 1024 * 1024 + 1; - if (!test_runable(*state, 3)) - skip(); + test_runable_or_skip(*state, 3); ARRAY_UPDATE_FETCH_TESTCASE(state, { .oclass = OC_EC_2P1G1, @@ -2569,8 +2566,8 @@ basic_scrubbing_test(void **state, char *scrub_freq) daos_oclass_id_t oc = dts_csum_oc; int rc; - if (csum_ec_enabled() && !test_runable(*state, csum_ec_grp_size())) - skip(); + if (csum_ec_enabled()) + test_runable_or_skip(*state, csum_ec_grp_size()); /** * Setup @@ -2638,8 +2635,8 @@ multiple_ec_singv_csum(void **state) FAULT_INJECTION_REQUIRED(); - if (csum_ec_enabled() && !test_runable(arg, csum_ec_grp_size())) - skip(); + if (csum_ec_enabled()) + test_runable_or_skip(arg, csum_ec_grp_size()); setup_from_test_args(&ctx, *state); setup_cont_obj(&ctx, dts_csum_prop_type, true, 0, oc); @@ -2715,8 +2712,8 @@ multiple_ec_singv_csum_with_iod_size_0(void **state) size_t len[3]; int i, rc; - if (csum_ec_enabled() && !test_runable(arg, csum_ec_grp_size())) - skip(); + if (csum_ec_enabled()) + test_runable_or_skip(arg, csum_ec_grp_size()); setup_from_test_args(&ctx, *state); setup_cont_obj(&ctx, dts_csum_prop_type, true, 0, oc); diff --git a/src/tests/suite/daos_container.c b/src/tests/suite/daos_container.c index 2237bb9e42d..591e2abc2d8 100644 --- a/src/tests/suite/daos_container.c +++ b/src/tests/suite/daos_container.c @@ -2723,8 +2723,7 @@ co_rf_simple(void **state) FAULT_INJECTION_REQUIRED(); /* needs 3 alive nodes after excluding 3 */ - if (!test_runable(arg0, 6)) - skip(); + test_runable_or_skip(arg0, 6); print_message("create container with properties, and query/verify.\n"); rc = test_setup((void **)&arg, SETUP_POOL_CONNECT, arg0->multi_rank, @@ -3138,8 +3137,7 @@ co_redun_lvl(void **state) FAULT_INJECTION_REQUIRED(); - if (!test_runable(arg0, 8)) - skip(); + test_runable_or_skip(arg0, 8); print_message("create container with properties, and query/verify.\n"); rc = test_setup((void **)&arg, SETUP_POOL_CONNECT, arg0->multi_rank, diff --git a/src/tests/suite/daos_degrade_ec.c b/src/tests/suite/daos_degrade_ec.c index 09a68609f64..cbeedb4cd4b 100644 --- a/src/tests/suite/daos_degrade_ec.c +++ b/src/tests/suite/daos_degrade_ec.c @@ -145,8 +145,7 @@ degrade_ec_internal(void **state, int *shards, int shards_nr, int write_type) d_rank_t ranks[4] = { -1 }; int idx = 0; - if (!test_runable(arg, DEGRADE_RANK_SIZE)) - return; + test_runable_or_skip(arg, DEGRADE_RANK_SIZE); oid = daos_test_oid_gen(arg->coh, OC_EC_4P2G1, 0, 0, arg->myrank); degrade_ec_write(arg, oid, write_type); @@ -396,8 +395,7 @@ degrade_multi_conts_agg(void **state) int i; int rc; - if (!test_runable(arg, DEGRADE_RANK_SIZE)) - return; + test_runable_or_skip(arg, DEGRADE_RANK_SIZE); FAULT_INJECTION_REQUIRED(); @@ -493,8 +491,7 @@ degrade_ec_partial_update_agg(void **state) FAULT_INJECTION_REQUIRED(); - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); data = (char *)malloc(EC_CELL_SIZE); assert_true(data != NULL); @@ -546,8 +543,7 @@ degrade_ec_agg(void **state) char *data; char *verify_data; - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); data = (char *)malloc(EC_CELL_SIZE); assert_true(data != NULL); @@ -614,7 +610,7 @@ degrade_ec_update(void **state) #define TEST_EC_STRIPE_SIZE (1 * 1024 * 1024 * 4) if (!test_runable(arg, 6) || (arg->srv_ntgts / arg->srv_nnodes) < 2) - return; + skip(); print_message("test 1 - DER_NEED_TX case\n"); data = (char *)malloc(TEST_EC_STRIPE_SIZE); @@ -689,8 +685,7 @@ degrade_ec_agg_punch(void **state, int shard) char *data; char *verify_data; - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); data = (char *)malloc(EC_CELL_SIZE); assert_true(data != NULL); diff --git a/src/tests/suite/daos_dist_tx.c b/src/tests/suite/daos_dist_tx.c index 3fb76874eb2..33f83d252cb 100644 --- a/src/tests/suite/daos_dist_tx.c +++ b/src/tests/suite/daos_dist_tx.c @@ -43,8 +43,7 @@ dtx_0(void **state) */ print_message("DTX0: SV fetch against EC obj\n"); - if (!test_runable(arg, 3)) - skip(); + test_runable_or_skip(arg, 3); MUST(daos_tx_open(arg->coh, &th, 0, NULL)); @@ -212,8 +211,7 @@ dtx_5(void **state) print_message("DTX5: Multiple small SV update on multiple EC objs\n"); - if (!test_runable(arg, 3)) - skip(); + test_runable_or_skip(arg, 3); dtx_update_multiple_objs(arg, DAOS_IOD_SINGLE, 1 << 8, OC_EC_2P1G1); } @@ -225,8 +223,7 @@ dtx_6(void **state) print_message("DTX6: Multiple large EV update on multiple EC objs\n"); - if (!test_runable(arg, 3)) - skip(); + test_runable_or_skip(arg, 3); dtx_update_multiple_objs(arg, DAOS_IOD_ARRAY, 1 << 16, OC_EC_2P1G1); } @@ -821,8 +818,7 @@ dtx_18(void **state) print_message("DTX18: Spread read time-stamp when commit\n"); - if (!test_runable(arg, 3)) - skip(); + test_runable_or_skip(arg, 3); arg->async = 0; oid = daos_test_oid_gen(arg->coh, OC_RP_3G1, 0, 0, arg->myrank); @@ -903,8 +899,7 @@ dtx_19(void **state) print_message("DTX19: misc rep and EC object update in same TX.\n"); - if (!test_runable(arg, 4)) - skip(); + test_runable_or_skip(arg, 4); MUST(daos_tx_open(arg->coh, &th, DAOS_TF_ZERO_COPY, NULL)); arg->async = 0; @@ -1026,8 +1021,7 @@ dtx_20(void **state) print_message("DTX20: atomicity - either all done or none done\n"); - if (!test_runable(arg, 3)) - skip(); + test_runable_or_skip(arg, 3); dtx_init_oid_req_akey(arg, oids, reqs, ocs, types, NULL, 2, 0, 0); @@ -1123,8 +1117,7 @@ dtx_21(void **state) print_message("DTX21: TX atomicity - internal transaction.\n"); - if (!test_runable(arg, 4)) - skip(); + test_runable_or_skip(arg, 4); dtx_init_oid_req_akey(arg, &oid, &req, &oc, &type, NULL, 1, 0, 0); @@ -1230,8 +1223,7 @@ dtx_22(void **state) print_message("DTX22: TX isolation - invisible partial modification\n"); - if (!test_runable(arg, 3)) - skip(); + test_runable_or_skip(arg, 3); if (arg->myrank == 0) dtx_init_oid_req_akey(arg, oids, reqs, ocs, types, @@ -1327,8 +1319,7 @@ dtx_23(void **state) print_message("DTX23: server start epoch - refuse TX with old epoch\n"); - if (!test_runable(arg, 3)) - skip(); + test_runable_or_skip(arg, 3); dtx_init_oid_req_akey(arg, oids, reqs, ocs, types, NULL, 2, 0, 0); @@ -1396,8 +1387,7 @@ dtx_24(void **state) print_message("DTX24: async batched commit\n"); - if (!test_runable(arg, 4)) - skip(); + test_runable_or_skip(arg, 4); print_message("Transactional update something\n"); @@ -1468,8 +1458,7 @@ dtx_25(void **state) print_message("DTX25: uncertain status check - committable\n"); - if (!test_runable(arg, 4)) - skip(); + test_runable_or_skip(arg, 4); par_barrier(PAR_COMM_WORLD); if (arg->myrank == 0) @@ -1537,8 +1526,7 @@ dtx_26(void **state) print_message("DTX26: uncertain status check - non-committable\n"); - if (!test_runable(arg, 4)) - skip(); + test_runable_or_skip(arg, 4); par_barrier(PAR_COMM_WORLD); daos_fail_loc_set(DAOS_DTX_COMMIT_SYNC | DAOS_FAIL_ALWAYS); @@ -1617,8 +1605,7 @@ dtx_uncertainty_miss_request(test_arg_t *arg, uint64_t loc, bool abort, int i; int rc; - if (!test_runable(arg, 4)) - skip(); + test_runable_or_skip(arg, 4); par_barrier(PAR_COMM_WORLD); daos_fail_loc_set(DAOS_DTX_COMMIT_SYNC | DAOS_FAIL_ALWAYS); @@ -1850,8 +1837,7 @@ dtx_29(void **state) print_message("DTX29: uncertain status check - fetch re-entry\n"); - if (!test_runable(arg, 4)) - skip(); + test_runable_or_skip(arg, 4); dtx_init_oid_req_akey(arg, oids, reqs, ocs, types, akeys, 2, DTX_NC_CNT, 0); @@ -1985,8 +1971,7 @@ dtx_30(void **state) print_message("DTX30: uncertain status check - enumeration re-entry\n"); - if (!test_runable(arg, 4)) - skip(); + test_runable_or_skip(arg, 4); dtx_init_oid_req_akey(arg, oids, reqs, ocs, types, NULL, 2, 0, 0); @@ -2087,8 +2072,7 @@ dtx_31(void **state) print_message("DTX31: uncertain status check - punch re-entry\n"); - if (!test_runable(arg, 4)) - skip(); + test_runable_or_skip(arg, 4); dtx_init_oid_req_akey(arg, oids, reqs, ocs, types, akeys, 2, DTX_NC_CNT, 0); @@ -2154,8 +2138,7 @@ dtx_32(void **state) print_message("DTX32: uncertain status check - update re-entry\n"); - if (!test_runable(arg, 4)) - skip(); + test_runable_or_skip(arg, 4); dtx_init_oid_req_akey(arg, oids, reqs, ocs, types, akeys, 2, IOREQ_SG_IOD_NR, 0); @@ -2230,8 +2213,7 @@ dtx_33(void **state) print_message("DTX33: uncertain status check - query key re-entry\n"); - if (!test_runable(arg, 4)) - skip(); + test_runable_or_skip(arg, 4); dtx_init_oid_req_akey(arg, oids, reqs, ocs, types, NULL, 2, 0, DAOS_OT_MULTI_UINT64); @@ -2344,8 +2326,7 @@ dtx_34(void **state) print_message("DTX34: uncertain status check - CPD RPC re-entry\n"); - if (!test_runable(arg, 4)) - skip(); + test_runable_or_skip(arg, 4); dtx_init_oid_req_akey(arg, oids, reqs, ocs, types, akeys, 2, DTX_NC_CNT, 0); @@ -2436,8 +2417,7 @@ dtx_35(void **state) print_message("DTX35: resync during reopen container\n"); - if (!test_runable(arg, 4)) - skip(); + test_runable_or_skip(arg, 4); dtx_init_oid_req_akey(arg, oids, reqs, ocs, types, akeys, 2, DTX_NC_CNT, 0); @@ -2544,8 +2524,7 @@ dtx_36(void **state) print_message("DTX36: resync - DTX entry for read only ops\n"); - if (!test_runable(arg, 7)) - skip(); + test_runable_or_skip(arg, 7); /* Obj1 has more redundancy groups than obj2. If the TX reads * from multiple redundancy groups of obj1 and only writes to @@ -2663,8 +2642,7 @@ dtx_37(void **state) print_message("DTX37: resync - leader failed during prepare\n"); - if (!test_runable(arg, 7)) - skip(); + test_runable_or_skip(arg, 7); dtx_init_oid_req_akey(arg, &oid, &req, &oc, &type, akeys, 1, DTX_NC_CNT, 0); @@ -2796,8 +2774,7 @@ dtx_38(void **state) print_message("DTX38: resync - lost whole redundancy groups\n"); - if (!test_runable(arg, 7)) - skip(); + test_runable_or_skip(arg, 7); d_getenv_bool("DAOS_TX_VERIFY_RDG", &rdg_verify); if (!rdg_verify) @@ -2967,8 +2944,7 @@ dtx_39(void **state) print_message("DTX39: not restar the transaction with fixed epoch\n"); - if (!test_runable(arg, 3)) - skip(); + test_runable_or_skip(arg, 3); if (arg->myrank == 0) { daos_obj_id_t oid; diff --git a/src/tests/suite/daos_drain_common.c b/src/tests/suite/daos_drain_common.c index b1d317a1a0e..07aa89c2926 100644 --- a/src/tests/suite/daos_drain_common.c +++ b/src/tests/suite/daos_drain_common.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 */ @@ -163,8 +163,7 @@ dfs_extend_drain_common(void **state, int opc, uint32_t objclass, FAULT_INJECTION_REQUIRED(); - if (!test_runable(arg, 4)) - return; + test_runable_or_skip(arg, 4); attr.da_props = daos_prop_alloc(2); assert_non_null(attr.da_props); diff --git a/src/tests/suite/daos_drain_simple.c b/src/tests/suite/daos_drain_simple.c index 2227a3bcbc4..4849883f1a3 100644 --- a/src/tests/suite/daos_drain_simple.c +++ b/src/tests/suite/daos_drain_simple.c @@ -1,6 +1,6 @@ /** * (C) Copyright 2016-2023 Intel Corporation. - * (C) Copyright 2025 Hewlett Packard Enterprise Development LP + * (C) Copyright 2025-2026 Hewlett Packard Enterprise Development LP * * SPDX-License-Identifier: BSD-2-Clause-Patent */ @@ -41,8 +41,7 @@ drain_dkeys(void **state) FAULT_INJECTION_REQUIRED(); - if (!test_runable(arg, 4)) - return; + test_runable_or_skip(arg, 4); T_BEGIN(); oid = daos_test_oid_gen(arg->coh, DAOS_OC_R1S_SPEC_RANK, 0, 0, @@ -110,8 +109,7 @@ cont_open_in_drain(void **state) FAULT_INJECTION_REQUIRED(); - if (!test_runable(arg, 4)) - return; + test_runable_or_skip(arg, 4); T_BEGIN(); oid = daos_test_oid_gen(arg->coh, DAOS_OC_R1S_SPEC_RANK, 0, 0, @@ -168,8 +166,7 @@ drain_akeys(void **state) FAULT_INJECTION_REQUIRED(); - if (!test_runable(arg, 4)) - return; + test_runable_or_skip(arg, 4); T_BEGIN(); oid = daos_test_oid_gen(arg->coh, DAOS_OC_R1S_SPEC_RANK, 0, 0, @@ -223,8 +220,7 @@ drain_indexes(void **state) FAULT_INJECTION_REQUIRED(); - if (!test_runable(arg, 4)) - return; + test_runable_or_skip(arg, 4); T_BEGIN(); oid = daos_test_oid_gen(arg->coh, DAOS_OC_R1S_SPEC_RANK, 0, 0, @@ -286,8 +282,7 @@ drain_snap_update_keys(void **state) FAULT_INJECTION_REQUIRED(); - if (!test_runable(arg, 4)) - return; + test_runable_or_skip(arg, 4); T_BEGIN(); oid = daos_test_oid_gen(arg->coh, DAOS_OC_R1S_SPEC_RANK, 0, 0, @@ -365,8 +360,7 @@ drain_snap_punch_keys(void **state) FAULT_INJECTION_REQUIRED(); - if (!test_runable(arg, 4)) - return; + test_runable_or_skip(arg, 4); T_BEGIN(); oid = daos_test_oid_gen(arg->coh, DAOS_OC_R3S_SPEC_RANK, 0, 0, @@ -455,8 +449,7 @@ drain_multiple(void **state) FAULT_INJECTION_REQUIRED(); - if (!test_runable(arg, 4)) - return; + test_runable_or_skip(arg, 4); T_BEGIN(); oid = daos_test_oid_gen(arg->coh, DAOS_OC_R1S_SPEC_RANK, 0, 0, @@ -525,8 +518,7 @@ drain_large_rec(void **state) FAULT_INJECTION_REQUIRED(); - if (!test_runable(arg, 4)) - return; + test_runable_or_skip(arg, 4); T_BEGIN(); oid = daos_test_oid_gen(arg->coh, DAOS_OC_R1S_SPEC_RANK, 0, 0, @@ -577,8 +569,7 @@ drain_objects(void **state) FAULT_INJECTION_REQUIRED(); - if (!test_runable(arg, 4)) - return; + test_runable_or_skip(arg, 4); T_BEGIN(); for (i = 0; i < OBJ_NR; i++) { @@ -607,8 +598,7 @@ drain_fail_and_retry_objects(void **state) FAULT_INJECTION_REQUIRED(); - if (!test_runable(arg, 4)) - return; + test_runable_or_skip(arg, 4); T_BEGIN(); for (i = 0; i < OBJ_NR; i++) { @@ -647,8 +637,7 @@ drain_then_exclude(void **state) FAULT_INJECTION_REQUIRED(); - if (!test_runable(arg, 4)) - return; + test_runable_or_skip(arg, 4); T_BEGIN(); oid = daos_test_oid_gen(arg->coh, OC_EC_2P1GX, 0, 0, arg->myrank); @@ -847,8 +836,7 @@ dfs_drain_extend(void **state) FAULT_INJECTION_REQUIRED(); - if (!test_runable(arg, 3)) - return; + test_runable_or_skip(arg, 3); T_BEGIN(); attr.da_props = daos_prop_alloc(2); diff --git a/src/tests/suite/daos_extend_simple.c b/src/tests/suite/daos_extend_simple.c index ee99907d68f..57193937afd 100644 --- a/src/tests/suite/daos_extend_simple.c +++ b/src/tests/suite/daos_extend_simple.c @@ -37,8 +37,7 @@ extend_dkeys(void **state) T_BEGIN(); - if (!test_runable(arg, 3)) - return; + test_runable_or_skip(arg, 3); for (i = 0; i < OBJ_NR; i++) { oids[i] = daos_test_oid_gen(arg->coh, OC_RP_3G1, 0, 0, arg->myrank); @@ -79,8 +78,7 @@ extend_akeys(void **state) T_BEGIN(); - if (!test_runable(arg, 3)) - return; + test_runable_or_skip(arg, 3); for (i = 0; i < OBJ_NR; i++) { oids[i] = daos_test_oid_gen(arg->coh, OC_RP_3G1, 0, 0, arg->myrank); @@ -121,8 +119,7 @@ extend_indexes(void **state) T_BEGIN(); - if (!test_runable(arg, 3)) - return; + test_runable_or_skip(arg, 3); for (i = 0; i < OBJ_NR; i++) { oids[i] = daos_test_oid_gen(arg->coh, OC_RP_3G1, 0, 0, arg->myrank); @@ -165,8 +162,7 @@ extend_large_rec(void **state) T_BEGIN(); - if (!test_runable(arg, 3)) - return; + test_runable_or_skip(arg, 3); memset(buffer, 'a', 5000); for (i = 0; i < OBJ_NR; i++) { @@ -204,8 +200,7 @@ extend_objects(void **state) T_BEGIN(); - if (!test_runable(arg, 3)) - return; + test_runable_or_skip(arg, 3); for (i = 0; i < OBJ_NR; i++) { oids[i] = daos_test_oid_gen(arg->coh, OC_S1, 0, 0, arg->myrank); diff --git a/src/tests/suite/daos_obj.c b/src/tests/suite/daos_obj.c index 635c800b054..d30a3effbd6 100644 --- a/src/tests/suite/daos_obj.c +++ b/src/tests/suite/daos_obj.c @@ -1,5 +1,6 @@ /** * (C) Copyright 2016-2024 Intel Corporation. + * (C) Copyright 2026 Hewlett Packard Enterprise Development LP * (C) Copyright 2026 Google LLC * * SPDX-License-Identifier: BSD-2-Clause-Patent @@ -3115,8 +3116,7 @@ tgt_idx_change_retry(void **state) */ /* needs at lest 4 targets, exclude one and another 3 raft nodes */ - if (!test_runable(arg, 4)) - skip(); + test_runable_or_skip(arg, 4); if (!arg0->async) { if (arg->myrank == 0) @@ -3259,8 +3259,7 @@ fetch_replica_unavail(void **state) FAULT_INJECTION_REQUIRED(); /* needs at lest 4 targets, exclude one and another 3 raft nodes */ - if (!test_runable(arg, 4)) - skip(); + test_runable_or_skip(arg, 4); oid = daos_test_oid_gen(arg->coh, DAOS_OC_R1S_SPEC_RANK, 0, 0, arg->myrank); @@ -3854,8 +3853,7 @@ io_pool_map_refresh_trigger(void **state) FAULT_INJECTION_REQUIRED(); /* needs at lest 2 targets */ - if (!test_runable(arg, 2)) - skip(); + test_runable_or_skip(arg, 2); /* Choose an rank other than leader */ test_get_leader(arg, &leader); @@ -4059,8 +4057,7 @@ io_capa_iv_fetch(void **state) d_rank_t leader; /* needs at lest 2 targets */ - if (!test_runable(arg, 2)) - skip(); + test_runable_or_skip(arg, 2); test_get_leader(arg, &leader); oid = daos_test_oid_gen(arg->coh, DAOS_OC_R1S_SPEC_RANK, 0, 0, @@ -4186,8 +4183,7 @@ io_fetch_retry_another_replica(void **state) FAULT_INJECTION_REQUIRED(); /* needs at lest 2 targets */ - if (!test_runable(arg, 2)) - skip(); + test_runable_or_skip(arg, 2); oid = daos_test_oid_gen(arg->coh, DAOS_OC_R2S_SPEC_RANK, 0, 0, arg->myrank); @@ -5176,8 +5172,7 @@ io_50(void **state) print_message("Collective punch object - OC_SX\n"); - if (!test_runable(arg, 2)) - return; + test_runable_or_skip(arg, 2); obj_coll_punch(arg, OC_SX); } @@ -5189,8 +5184,7 @@ io_51(void **state) print_message("Collective punch object - OC_EC_2P1G2\n"); - if (!test_runable(arg, 3)) - return; + test_runable_or_skip(arg, 3); obj_coll_punch(arg, OC_EC_2P1G2); } @@ -5202,8 +5196,7 @@ io_52(void **state) print_message("Collective punch object - OC_EC_4P1GX\n"); - if (!test_runable(arg, 5)) - return; + test_runable_or_skip(arg, 5); obj_coll_punch(arg, OC_EC_4P1GX); } @@ -5308,8 +5301,7 @@ io_53(void **state) print_message("Collective object query - OC_SX\n"); - if (!test_runable(arg, 2)) - return; + test_runable_or_skip(arg, 2); obj_coll_query(arg, OC_SX, false); } @@ -5321,8 +5313,7 @@ io_54(void **state) print_message("Collective object query - OC_EC_2P1G2\n"); - if (!test_runable(arg, 3)) - return; + test_runable_or_skip(arg, 3); obj_coll_query(arg, OC_EC_2P1G2, false); } @@ -5334,8 +5325,7 @@ io_55(void **state) print_message("Collective object query - OC_EC_4P1GX\n"); - if (!test_runable(arg, 5)) - return; + test_runable_or_skip(arg, 5); obj_coll_query(arg, OC_EC_4P1GX, false); } @@ -5347,8 +5337,7 @@ io_56(void **state) print_message("Collective object query with sparse ranks\n"); - if (!test_runable(arg, 3)) - return; + test_runable_or_skip(arg, 3); obj_coll_query(arg, OC_RP_3GX, true); } @@ -5360,8 +5349,7 @@ io_57(void **state) print_message("Collective object query with rank_0 excluded\n"); - if (!test_runable(arg, 4)) - return; + test_runable_or_skip(arg, 4); rebuild_single_pool_rank(arg, 0, false); obj_coll_query(arg, OC_EC_2P1GX, false); diff --git a/src/tests/suite/daos_obj_ec.c b/src/tests/suite/daos_obj_ec.c index ce0819b6dde..55259967a33 100644 --- a/src/tests/suite/daos_obj_ec.c +++ b/src/tests/suite/daos_obj_ec.c @@ -97,8 +97,7 @@ ec_dkey_list_punch(void **state) char *dkeys[10000]; int i; - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); oid = daos_test_oid_gen(arg->coh, ec_obj_class, 0, 0, arg->myrank); ioreq_init(&req, arg->coh, oid, DAOS_IOD_ARRAY, arg); @@ -196,8 +195,7 @@ ec_akey_list_punch(void **state) int num_akey; int i; - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); oid = daos_test_oid_gen(arg->coh, ec_obj_class, 0, 0, arg->myrank); ioreq_init(&req, arg->coh, oid, DAOS_IOD_ARRAY, arg); @@ -289,8 +287,7 @@ ec_rec_list_punch(void **state) daos_recx_t recx; char data[16]; - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); oid = daos_test_oid_gen(arg->coh, ec_obj_class, 0, 0, arg->myrank); ioreq_init(&req, arg->coh, oid, DAOS_IOD_ARRAY, arg); @@ -536,8 +533,7 @@ ec_partial_update_agg(void **state) FAULT_INJECTION_REQUIRED(); - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); daos_pool_set_prop(arg->pool.pool_uuid, "reclaim", "time"); data = (char *)malloc(EC_CELL_SIZE); @@ -600,8 +596,7 @@ ec_cross_cell_partial_update_agg(void **state) FAULT_INJECTION_REQUIRED(); - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); daos_pool_set_prop(arg->pool.pool_uuid, "reclaim", "time"); data = (char *)malloc(update_size); @@ -655,8 +650,7 @@ ec_full_partial_update_agg(void **state) FAULT_INJECTION_REQUIRED(); - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); daos_pool_set_prop(arg->pool.pool_uuid, "reclaim", "time"); oid = daos_test_oid_gen(arg->coh, ec_obj_class, 0, 0, arg->myrank); @@ -734,8 +728,7 @@ ec_partial_full_update_agg(void **state) FAULT_INJECTION_REQUIRED(); - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); daos_pool_set_prop(arg->pool.pool_uuid, "reclaim", "time"); oid = daos_test_oid_gen(arg->coh, ec_obj_class, 0, 0, arg->myrank); @@ -927,8 +920,7 @@ ec_fail_agg_internal(void **state, unsigned fail_loc) char *data; char *verify_data; - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); daos_pool_set_prop(arg->pool.pool_uuid, "reclaim", "time"); data = (char *)malloc(EC_CELL_SIZE); @@ -995,8 +987,7 @@ ec_singv_array_mixed_io(void **state) int i, rc; daos_size_t size = 131071; - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); /** open object */ oid = daos_test_oid_gen(arg->coh, ec_obj_class, 0, 0, arg->myrank); @@ -1101,8 +1092,7 @@ ec_full_stripe_snapshot(void **state) char *verify_data; int i; - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); daos_pool_set_prop(arg->pool.pool_uuid, "reclaim", "time"); oid = daos_test_oid_gen(arg->coh, ec_obj_class, 0, 0, arg->myrank); @@ -1160,8 +1150,7 @@ ec_partial_stripe_snapshot_internal(void **state, int data_size) FAULT_INJECTION_REQUIRED(); - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); daos_pool_set_prop(arg->pool.pool_uuid, "reclaim", "time"); oid = daos_test_oid_gen(arg->coh, ec_obj_class, 0, 0, arg->myrank); @@ -1351,8 +1340,7 @@ ec_singv_overwrite_oc(void **state, unsigned int ec_oc) int i, rc; daos_size_t size; - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); /** open object */ oid = daos_test_oid_gen(arg->coh, ec_oc, 0, 0, arg->myrank); @@ -1480,8 +1468,7 @@ ec_singv_overwrite(void **state) { test_arg_t *arg = *state; - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); ec_singv_overwrite_oc(state, OC_EC_2P1G1); ec_singv_overwrite_oc(state, OC_EC_2P1G2); @@ -1653,8 +1640,7 @@ ec_singv_diff_size_fetch(void **state) { test_arg_t *arg = *state; - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); print_message("test OC_EC_2P1G1, small singv 511B\n"); ec_singv_size_fetch_oc(state, OC_EC_2P1G1, 511, 0); @@ -1706,8 +1692,7 @@ ec_cond_fetch(void **state) uint64_t fail_val; bool degraded_test = false; - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); /** open object */ oid = daos_test_oid_gen(arg->coh, ec_obj_class, 0, 0, arg->myrank); @@ -1879,8 +1864,7 @@ ec_data_recov(void **state) uint16_t shard[2]; uint64_t fail_val; - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); /** open object */ oid = daos_test_oid_gen(arg->coh, ec_obj_class, 0, 0, arg->myrank); @@ -1980,8 +1964,7 @@ ec_multi_singv_overwrite(void **state) size_t new_len[3]; int i, rc; - if (!test_runable(arg, 4)) - return; + test_runable_or_skip(arg, 4); for (i = 0; i < 3; i++) { buf[i] = NULL; @@ -2074,8 +2057,7 @@ ec_multi_array(void **state) daos_recx_t recx[3]; int i, rc; - if (!test_runable(arg, 4)) - return; + test_runable_or_skip(arg, 4); for (i = 0; i < 3; i++) { buf[i] = NULL; @@ -2186,8 +2168,7 @@ ec_few_partial_stripe_aggregation(void **state) char *data; daos_recx_t recx; - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); daos_pool_set_prop(arg->pool.pool_uuid, "reclaim", "time"); oid = daos_test_oid_gen(arg->coh, OC_EC_4P2GX, 0, 0, arg->myrank); @@ -2232,8 +2213,7 @@ ec_rec_parity_list(void **state) uint64_t start = UINT64_MAX; uint64_t end = 0; - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); data = (char *)malloc(stripe_size); oid = daos_test_oid_gen(arg->coh, OC_EC_4P2G1, 0, 0, arg->myrank); @@ -2302,8 +2282,7 @@ ec_update_2akeys(void **state) FAULT_INJECTION_REQUIRED(); - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); /** open object */ oid = daos_test_oid_gen(arg->coh, ec_obj_class, 0, 0, arg->myrank); @@ -2411,8 +2390,7 @@ ec_dkey_enum_fail(void **state) int i; int rc; - if (!test_runable(arg, 3)) - return; + test_runable_or_skip(arg, 3); oid = daos_test_oid_gen(arg->coh, OC_EC_2P1G1, 0, 0, arg->myrank); ioreq_init(&req, arg->coh, oid, DAOS_IOD_ARRAY, arg); @@ -2465,8 +2443,7 @@ ec_single_stripe_nvme_io(void **state) daos_recx_t recx; int i; - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); oid = daos_test_oid_gen(arg->coh, OC_EC_2P1G1, 0, 0, arg->myrank); ioreq_init(&req, arg->coh, oid, DAOS_IOD_ARRAY, arg); @@ -2514,8 +2491,7 @@ ec_two_stripes_nvme_io(void **state) daos_recx_t recx; int i; - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); oid = daos_test_oid_gen(arg->coh, OC_EC_4P2G1, 0, 0, arg->myrank); ioreq_init(&req, arg->coh, oid, DAOS_IOD_ARRAY, arg); @@ -2571,8 +2547,7 @@ ec_three_stripes_nvme_io(void **state) FAULT_INJECTION_REQUIRED(); - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); oid = daos_test_oid_gen(arg->coh, OC_EC_4P2G1, 0, 0, arg->myrank); ioreq_init(&req, arg->coh, oid, DAOS_IOD_ARRAY, arg); @@ -2635,8 +2610,7 @@ ec_full_partial_punch_agg(void **state) FAULT_INJECTION_REQUIRED(); - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); daos_pool_set_prop(arg->pool.pool_uuid, "reclaim", "time"); oid = daos_test_oid_gen(arg->coh, ec_obj_class, 0, 0, arg->myrank); @@ -2737,8 +2711,7 @@ ec_fetch_iom(void **state) char *buf; int i, rc; - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); buf_len = EC_IOM_EXT_NR * EC_IOM_EXT_SIZE; D_ALLOC(buf, buf_len); @@ -2897,8 +2870,7 @@ ec_fetch_multi_iom(void **state) char *buf; int i, rc; - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); buf_len = EC_IOM_EXT_NR * EC_IOM_EXT_SIZE; D_ALLOC(buf, buf_len); @@ -3250,8 +3222,7 @@ ec_clone_punched_stripe(void **state) int i; int rc; - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); D_ALLOC(data, stripe_size); assert_non_null(data); @@ -3309,8 +3280,7 @@ ec_clone_sparse_stripe(void **state) int i; int rc; - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); D_ALLOC(data, stripe_size); assert_non_null(data); @@ -3376,8 +3346,7 @@ ec_clone_random(void **state) int i; int rc; - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); env = getenv("DAOS_CLONE_TEST_SEED"); seed = env != NULL ? atoi(env) : (unsigned int)time(NULL); @@ -3464,8 +3433,7 @@ clone_epoch_skew(void **state) int i; int rc; - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); D_ALLOC(data, len); assert_non_null(data); diff --git a/src/tests/suite/daos_pool.c b/src/tests/suite/daos_pool.c index 479b24c4270..39bf7e016ed 100644 --- a/src/tests/suite/daos_pool.c +++ b/src/tests/suite/daos_pool.c @@ -2243,8 +2243,7 @@ pool_map_refreshes_common(void **state, bool fall_back) skip(); } - if (!test_runable(arg, 2)) - skip(); + test_runable_or_skip(arg, 2); rebuild_single_pool_target(arg, rank, tgt, false); diff --git a/src/tests/suite/daos_rebuild.c b/src/tests/suite/daos_rebuild.c index 7e51fe438ef..ca1323918d2 100644 --- a/src/tests/suite/daos_rebuild.c +++ b/src/tests/suite/daos_rebuild.c @@ -47,8 +47,7 @@ rebuild_drop_scan(void **state) int rc; int i; - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); for (i = 0; i < OBJ_NR; i++) { oids[i] = daos_test_oid_gen(arg->coh, DAOS_OC_R3S_SPEC_RANK, 0, @@ -86,8 +85,7 @@ rebuild_retry_rebuild(void **state) int tgt = DEFAULT_FAIL_TGT; int i; - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); for (i = 0; i < OBJ_NR; i++) { oids[i] = daos_test_oid_gen(arg->coh, DAOS_OC_R3S_SPEC_RANK, 0, @@ -119,8 +117,7 @@ rebuild_retry_for_stale_pool(void **state) daos_obj_id_t oids[OBJ_NR]; int i; - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); for (i = 0; i < OBJ_NR; i++) { oids[i] = daos_test_oid_gen(arg->coh, DAOS_OC_R3S_SPEC_RANK, 0, @@ -157,8 +154,7 @@ rebuild_drop_obj(void **state) daos_obj_id_t oids[OBJ_NR]; int i; - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); for (i = 0; i < OBJ_NR; i++) { oids[i] = daos_test_oid_gen(arg->coh, DAOS_OC_R3S_SPEC_RANK, 0, @@ -189,8 +185,7 @@ rebuild_update_failed(void **state) int tgt = DEFAULT_FAIL_TGT; int i; - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); for (i = 0; i < OBJ_NR; i++) { oids[i] = daos_test_oid_gen(arg->coh, DAOS_OC_R3S_SPEC_RANK, 0, @@ -220,8 +215,7 @@ rebuild_multiple_pools(void **state) int i; int rc; - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); args[0] = arg; /* create/connect another pool */ @@ -320,8 +314,7 @@ rebuild_destroy_container(void **state) int i; int rc; - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); /* create/connect another pool */ rc = rebuild_pool_create(&new_arg, arg, SETUP_CONT_CONNECT, NULL); @@ -352,8 +345,7 @@ rebuild_close_container(void **state) int i; int rc; - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); /* create/connect another pool */ rc = rebuild_pool_create(&new_arg, arg, SETUP_CONT_CONNECT, NULL); @@ -418,8 +410,7 @@ rebuild_destroy_pool_internal(void **state, uint64_t fail_loc) int i; int rc; - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); rc = rebuild_pool_create(&new_arg, arg, SETUP_CONT_CONNECT, NULL); if (rc) @@ -466,8 +457,7 @@ rebuild_iv_tgt_fail(void **state) daos_obj_id_t oids[OBJ_NR]; int i; - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); for (i = 0; i < OBJ_NR; i++) { oids[i] = daos_test_oid_gen(arg->coh, DAOS_OC_R3S_SPEC_RANK, 0, @@ -498,8 +488,7 @@ rebuild_tgt_start_fail(void **state) d_rank_t exclude_rank = 0; int i; - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); for (i = 0; i < OBJ_NR; i++) { oids[i] = daos_test_oid_gen(arg->coh, DAOS_OC_R3S_SPEC_RANK, 0, @@ -528,8 +517,7 @@ rebuild_send_objects_fail(void **state) daos_obj_id_t oids[OBJ_NR]; int i; - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); for (i = 0; i < OBJ_NR; i++) { oids[i] = daos_test_oid_gen(arg->coh, DAOS_OC_R3S_SPEC_RANK, 0, @@ -598,8 +586,7 @@ rebuild_tgt_pool_disconnect_internal(void **state, unsigned int fail_loc) daos_obj_id_t oids[OBJ_NR]; int i; - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); for (i = 0; i < OBJ_NR; i++) { oids[i] = daos_test_oid_gen(arg->coh, DAOS_OC_R3S_SPEC_RANK, 0, @@ -668,8 +655,7 @@ rebuild_offline_pool_connect_internal(void **state, unsigned int fail_loc) daos_obj_id_t oids[OBJ_NR]; int i; - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); for (i = 0; i < OBJ_NR; i++) { oids[i] = daos_test_oid_gen(arg->coh, DAOS_OC_R3S_SPEC_RANK, 0, @@ -720,8 +706,7 @@ rebuild_offline(void **state) daos_obj_id_t oids[OBJ_NR]; int i; - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); for (i = 0; i < OBJ_NR; i++) { oids[i] = daos_test_oid_gen(arg->coh, DAOS_OC_R3S_SPEC_RANK, 0, @@ -751,8 +736,7 @@ rebuild_offline_empty(void **state) test_arg_t *new_arg = NULL; int rc; - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); rc = rebuild_pool_create(&new_arg, arg, SETUP_POOL_CREATE, NULL); if (rc) @@ -794,7 +778,7 @@ rebuild_master_change_during_scan(void **state) int i; if (!test_runable(arg, 6) || arg->pool.alive_svc->rl_nr == 1) - return; + skip(); for (i = 0; i < OBJ_NR; i++) { oids[i] = daos_test_oid_gen(arg->coh, DAOS_OC_R3S_SPEC_RANK, 0, @@ -825,7 +809,7 @@ rebuild_master_change_during_rebuild(void **state) int i; if (!test_runable(arg, 6) || arg->pool.alive_svc->rl_nr == 1) - return; + skip(); for (i = 0; i < OBJ_NR; i++) { oids[i] = daos_test_oid_gen(arg->coh, DAOS_OC_R3S_SPEC_RANK, 0, @@ -875,7 +859,7 @@ rebuild_nospace(void **state) int i; if (!test_runable(arg, 6) || true) /* skip for now */ - return; + skip(); for (i = 0; i < OBJ_NR; i++) { oids[i] = daos_test_oid_gen(arg->coh, DAOS_OC_R3S_SPEC_RANK, 0, @@ -912,8 +896,7 @@ rebuild_multiple_tgts(void **state) int rc; int i; - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); oid = daos_test_oid_gen(arg->coh, DAOS_OC_R3S_SPEC_RANK, 0, 0, arg->myrank); @@ -1010,7 +993,7 @@ rebuild_master_failure(void **state) /* need 5 svc replicas, as will kill the leader 2 times */ if (!test_runable(arg, 6) || arg->pool.alive_svc->rl_nr < 5) { print_message("testing skipped ...\n"); - return; + skip(); } test_get_leader(arg, &ranks_to_kill[0]); @@ -1088,8 +1071,7 @@ rebuild_multiple_failures(void **state) daos_obj_id_t cb_arg_oids[OBJ_NR]; int i; - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); for (i = 0; i < OBJ_NR; i++) { oids[i] = daos_test_oid_gen(arg->coh, DAOS_OC_R3S_SPEC_RANK, 0, @@ -1128,7 +1110,7 @@ rebuild_fail_all_replicas_before_rebuild(void **state) int rc; if (!test_runable(arg, 6) || arg->pool.alive_svc->rl_nr < 5) - return; + skip(); oid = daos_test_oid_gen(arg->coh, DAOS_OC_R2S_SPEC_RANK, 0, 0, arg->myrank); @@ -1190,7 +1172,7 @@ rebuild_fail_all_replicas(void **state) */ if (!test_runable(arg, 7) || arg->pool.alive_svc->rl_nr < 7) { print_message("need at least 7 svcs, -s7\n"); - return; + skip(); } oid = daos_test_oid_gen(arg->coh, DAOS_OC_R3S_SPEC_RANK, 0, 0, @@ -1238,8 +1220,7 @@ multi_pools_rebuild_concurrently(void **state) int i; int rc; - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); memset(args, 0, sizeof(args[0]) * POOL_NUM * CONT_PER_POOL); for (i = 0; i < POOL_NUM * CONT_PER_POOL; i++) { @@ -1302,8 +1283,7 @@ rebuild_kill_rank_during_rebuild(void **state) daos_obj_id_t oids[OBJ_NR]; int i; - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); for (i = 0; i < OBJ_NR; i++) { oids[i] = daos_test_oid_gen(arg->coh, DAOS_OC_R3S_SPEC_RANK, 0, @@ -1345,7 +1325,7 @@ rebuild_kill_PS_leader_during_rebuild(void **state) if (!test_runable(arg, 7) || arg->pool.alive_svc->rl_nr < 5) { print_message("need at least 5 svcs, -s5\n"); - return; + skip(); } test_get_leader(arg, &leader); @@ -1409,8 +1389,7 @@ reintegrate_failure_and_retry(void **state) FAULT_INJECTION_REQUIRED(); - if (!test_runable(arg, 4)) - return; + test_runable_or_skip(arg, 4); for (i = 0; i < 20; i++) oids[i] = daos_test_oid_gen(arg->coh, OC_RP_3GX, 0, @@ -1445,7 +1424,7 @@ rebuild_kill_more_RF_ranks(void **state) if (!test_runable(arg, 7) || arg->pool.alive_svc->rl_nr < 7) { print_message("need at least 7 svcs, -s7\n"); - return; + skip(); } for (i = 0; i < OBJ_NR; i++) { @@ -1500,8 +1479,7 @@ rebuild_delay_and_reintegrate(void **state) int rc; int i; - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); rc = daos_pool_set_prop(arg->pool.pool_uuid, "self_heal", "exclude\\;delay_rebuild"); assert_rc_equal(rc, 0); @@ -1534,8 +1512,7 @@ rebuild_delay_and_extend(void **state) int rc; int i; - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); rc = daos_pool_set_prop(arg->pool.pool_uuid, "self_heal", "exclude\\;delay_rebuild"); assert_rc_equal(rc, 0); @@ -1572,8 +1549,7 @@ rebuild_cont_destroy_and_reintegrate(void **state) int rc; int i; - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); for (i = 0; i < OBJ_NR; i++) { oids[i] = daos_test_oid_gen(arg->coh, DAOS_OC_R3S_SPEC_RANK, 0, 0, arg->myrank); @@ -1602,8 +1578,7 @@ rebuild_incr_reint_basic(void **state) int rc; int i; - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); rc = daos_pool_set_prop(arg->pool.pool_uuid, "reintegration", "incremental"); assert_rc_equal(rc, 0); @@ -1640,7 +1615,7 @@ rebuild_long_scan_hang(void **state) if (!test_runable(arg, 7) || arg->pool.alive_svc->rl_nr < 5) { print_message("need at least 5 svcs, -s5\n"); - return; + skip(); } print_message("inject DAOS_REBUILD_TGT_SCAN_HANG fault into engine rank %u\n", fault_rank); diff --git a/src/tests/suite/daos_rebuild_ec.c b/src/tests/suite/daos_rebuild_ec.c index 595558e2d6b..dc137b6ed38 100644 --- a/src/tests/suite/daos_rebuild_ec.c +++ b/src/tests/suite/daos_rebuild_ec.c @@ -33,13 +33,13 @@ rebuild_ec_internal(void **state, daos_oclass_id_t oclass, int kill_data_nr, d_rank_t extra_kill_ranks[4] = { -1 }; int rc; - if (oclass == OC_EC_2P1G1 && !test_runable(arg, 4)) - return; - if (oclass == OC_EC_4P2G1 && !test_runable(arg, 8)) - return; + if (oclass == OC_EC_2P1G1) + test_runable_or_skip(arg, 4); + if (oclass == OC_EC_4P2G1) + test_runable_or_skip(arg, 8); if (svc_nreplicas < 5) - return; + skip(); daos_pool_set_prop(arg->pool.pool_uuid, "reclaim", "disabled"); oid = daos_test_oid_gen(arg->coh, oclass, 0, 0, arg->myrank); @@ -115,8 +115,7 @@ rebuild_mixed_stripes(void **state) print_message("BEGIN %s\n", __FUNCTION__); - if (!test_runable(arg, 7)) - return; + test_runable_or_skip(arg, 7); oid = daos_test_oid_gen(arg->coh, OC_EC_4P2G1, 0, 0, arg->myrank); ioreq_init(&req, arg->coh, oid, DAOS_IOD_ARRAY, arg); @@ -178,8 +177,7 @@ rebuild_ec_multi_stripes(void **state) print_message("BEGIN %s\n", __FUNCTION__); - if (!test_runable(arg, 7)) - return; + test_runable_or_skip(arg, 7); oid = daos_test_oid_gen(arg->coh, OC_EC_4P2G1, 0, 0, arg->myrank); ioreq_init(&req, arg->coh, oid, DAOS_IOD_ARRAY, arg); @@ -805,8 +803,7 @@ rebuild_multiple_group_ec_object(void **state) print_message("BEGIN %s\n", __FUNCTION__); - if (!test_runable(arg, 8)) - return; + test_runable_or_skip(arg, 8); oid = daos_test_oid_gen(arg->coh, OC_EC_4P1G8, 0, 0, arg->myrank); ioreq_init(&req, arg->coh, oid, DAOS_IOD_ARRAY, arg); @@ -916,8 +913,7 @@ rebuild_ec_dkey_enumeration(void **state) print_message("BEGIN %s\n", __FUNCTION__); - if (!test_runable(arg, 8)) - return; + test_runable_or_skip(arg, 8); oid = daos_test_oid_gen(arg->coh, OC_EC_4P1G1, 0, 0, arg->myrank); ioreq_init(&req, arg->coh, oid, DAOS_IOD_ARRAY, arg); @@ -949,8 +945,7 @@ rebuild_ec_parity_multi_group(void **state) print_message("BEGIN %s\n", __FUNCTION__); - if (!test_runable(arg, 8)) - return; + test_runable_or_skip(arg, 8); oid = daos_test_oid_gen(arg->coh, OC_EC_4P1G8, 0, 0, arg->myrank); ioreq_init(&req, arg->coh, oid, DAOS_IOD_ARRAY, arg); @@ -986,8 +981,7 @@ rebuild_ec_snapshot(void **state, daos_oclass_id_t oclass, int shard) int rc; int i; - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); daos_pool_set_prop(arg->pool.pool_uuid, "reclaim", "time"); oid = daos_test_oid_gen(arg->coh, oclass, 0, 0, arg->myrank); @@ -1062,8 +1056,7 @@ rebuild_ec_parity_overwrite(void **state) print_message("BEGIN %s\n", __FUNCTION__); - if (!test_runable(arg, 8)) - return; + test_runable_or_skip(arg, 8); oid = daos_test_oid_gen(arg->coh, OC_EC_2P2G1, 0, 0, arg->myrank); ioreq_init(&req, arg->coh, oid, DAOS_IOD_ARRAY, arg); @@ -1108,8 +1101,7 @@ rebuild_ec_then_aggregation(void **state) print_message("BEGIN %s\n", __FUNCTION__); - if (!test_runable(arg, 8)) - return; + test_runable_or_skip(arg, 8); daos_pool_set_prop(arg->pool.pool_uuid, "reclaim", "disabled"); data = (char *)malloc(CELL_SIZE); @@ -1167,8 +1159,7 @@ rebuild_ec_multiple_shards(void **state) print_message("BEGIN %s\n", __FUNCTION__); - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); data = (char *)malloc(stripe_size); verify_data = (char *)malloc(stripe_size); @@ -1252,8 +1243,7 @@ rebuild_ec_multiple_failure_tgts(void **state) print_message("BEGIN %s\n", __FUNCTION__); - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); oid = daos_test_oid_gen(arg->coh, OC_EC_4P2GX, 0, 0, arg->myrank); ioreq_init(&req, arg->coh, oid, DAOS_IOD_ARRAY, arg); @@ -1324,11 +1314,10 @@ rebuild_ec_parity_overwrite_fail_parity_internal(void **state, int *kill_shards, int stripe_size = 4 * CELL_SIZE; int i; - if (!test_runable(arg, 8)) - return; + test_runable_or_skip(arg, 8); if (svc_nreplicas < 5) - return; + skip(); oid = daos_test_oid_gen(arg->coh, OC_EC_4P2G1, 0, 0, arg->myrank); ioreq_init(&req, arg->coh, oid, DAOS_IOD_ARRAY, arg); @@ -1420,8 +1409,7 @@ rebuild_ec_combined_ops(void **state) int rc; print_message("BEGIN %s\n", __FUNCTION__); - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); rc = daos_pool_set_prop(arg->pool.pool_uuid, "self_heal", "exclude\\;delay_rebuild"); assert_int_equal(rc, 0); @@ -1834,10 +1822,9 @@ rebuild_ec_reint_parity_epoch_inflation(void **state) char stage[64]; print_message("BEGIN %s\n", __FUNCTION__); - if (!test_runable(arg, 8)) - return; + test_runable_or_skip(arg, 8); if (svc_nreplicas < 5) - return; + skip(); D_ALLOC_PTR(ctx); assert_non_null(ctx); diff --git a/src/tests/suite/daos_rebuild_interactive.c b/src/tests/suite/daos_rebuild_interactive.c index f521a27607d..81aab738af0 100644 --- a/src/tests/suite/daos_rebuild_interactive.c +++ b/src/tests/suite/daos_rebuild_interactive.c @@ -72,8 +72,7 @@ int_rebuild_snap_update_recs(void **state) int i; int rc; - if (!test_runable(arg, 4)) - return; + test_runable_or_skip(arg, 4); T_BEGIN(); oid = daos_test_oid_gen(arg->coh, arg->obj_class, 0, 0, arg->myrank); @@ -138,8 +137,7 @@ int_rebuild_snap_punch_recs(void **state) int i; int rc; - if (!test_runable(arg, 4)) - return; + test_runable_or_skip(arg, 4); T_BEGIN(); oid = daos_test_oid_gen(arg->coh, arg->obj_class, 0, 0, arg->myrank); @@ -226,8 +224,7 @@ int_rebuild_many_objects_with_failure(void **state) FAULT_INJECTION_REQUIRED(); - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); T_BEGIN(); D_ALLOC_ARRAY(oids, NUM_OBJS); @@ -298,8 +295,7 @@ int_cont_open_in_drain(void **state) FAULT_INJECTION_REQUIRED(); - if (!test_runable(arg, 4)) - return; + test_runable_or_skip(arg, 4); T_BEGIN(); oid = daos_test_oid_gen(arg->coh, DAOS_OC_R1S_SPEC_RANK, 0, 0, arg->myrank); @@ -352,8 +348,7 @@ int_drain_fail_and_retry_objects(void **state) FAULT_INJECTION_REQUIRED(); - if (!test_runable(arg, 4)) - return; + test_runable_or_skip(arg, 4); T_BEGIN(); for (i = 0; i < OBJ_NR; i++) { @@ -657,8 +652,7 @@ int_rebuild_dkeys_stop_failing(void **state) FAULT_INJECTION_REQUIRED(); - if (!test_runable(arg, 4)) - return; + test_runable_or_skip(arg, 4); T_BEGIN(); @@ -790,7 +784,7 @@ int_rebuild_stranded_lower_fseq_target(void **state) * (same constraint the rebuild_kill_multiple test uses). */ if (!test_runable(arg, 6) || arg->pool.alive_svc->rl_nr < 5) - return; + skip(); T_BEGIN(); diff --git a/src/tests/suite/daos_rebuild_simple.c b/src/tests/suite/daos_rebuild_simple.c index 04b8305523a..7b3dc21b519 100644 --- a/src/tests/suite/daos_rebuild_simple.c +++ b/src/tests/suite/daos_rebuild_simple.c @@ -77,8 +77,7 @@ rebuild_dkeys(void **state) int i; int rc; - if (!test_runable(arg, 4)) - return; + test_runable_or_skip(arg, 4); T_BEGIN(); oid = daos_test_oid_gen(arg->coh, arg->obj_class, 0, 0, arg->myrank); @@ -133,8 +132,7 @@ rebuild_akeys(void **state) int i; int rc; - if (!test_runable(arg, 4)) - return; + test_runable_or_skip(arg, 4); T_BEGIN(); oid = daos_test_oid_gen(arg->coh, arg->obj_class, 0, 0, arg->myrank); @@ -189,8 +187,7 @@ rebuild_indexes(void **state) int j; int rc; - if (!test_runable(arg, 4)) - return; + test_runable_or_skip(arg, 4); T_BEGIN(); oid = daos_test_oid_gen(arg->coh, arg->obj_class, 0, 0, arg->myrank); @@ -239,8 +236,7 @@ rebuild_snap_update_recs(void **state) int i; int rc; - if (!test_runable(arg, 4)) - return; + test_runable_or_skip(arg, 4); T_BEGIN(); oid = daos_test_oid_gen(arg->coh, arg->obj_class, 0, 0, arg->myrank); @@ -304,8 +300,7 @@ rebuild_snap_punch_recs(void **state) int i; int rc; - if (!test_runable(arg, 4)) - return; + test_runable_or_skip(arg, 4); T_BEGIN(); oid = daos_test_oid_gen(arg->coh, arg->obj_class, 0, 0, arg->myrank); @@ -363,8 +358,7 @@ rebuild_snap_update_keys(void **state) int i; int rc; - if (!test_runable(arg, 4)) - return; + test_runable_or_skip(arg, 4); T_BEGIN(); oid = daos_test_oid_gen(arg->coh, arg->obj_class, 0, 0, arg->myrank); @@ -448,8 +442,7 @@ rebuild_snap_punch_keys(void **state) int i; int rc; - if (!test_runable(arg, 4)) - return; + test_runable_or_skip(arg, 4); T_BEGIN(); oid = daos_test_oid_gen(arg->coh, arg->obj_class, 0, 0, arg->myrank); @@ -552,8 +545,7 @@ rebuild_snap_punch_empty(void **state) int i; int rc; - if (!test_runable(arg, 4)) - return; + test_runable_or_skip(arg, 4); T_BEGIN(); oid = daos_test_oid_gen(arg->coh, DAOS_OC_R3S_SPEC_RANK, 0, 0, @@ -629,8 +621,7 @@ rebuild_multiple(void **state) int k; int rc; - if (!test_runable(arg, 4)) - return; + test_runable_or_skip(arg, 4); T_BEGIN(); oid = daos_test_oid_gen(arg->coh, arg->obj_class, 0, 0, arg->myrank); @@ -677,8 +668,7 @@ rebuild_large_rec(void **state) char buffer[LARGE_BUFFER_SIZE]; int rc; - if (!test_runable(arg, 4)) - return; + test_runable_or_skip(arg, 4); T_BEGIN(); oid = daos_test_oid_gen(arg->coh, arg->obj_class, 0, 0, arg->myrank); @@ -731,8 +721,7 @@ rebuild_objects(void **state) int i; int rc; - if (!test_runable(arg, 4)) - return; + test_runable_or_skip(arg, 4); T_BEGIN(); for (i = 0; i < OBJ_NR; i++) { @@ -777,8 +766,7 @@ rebuild_sx_object_internal(void **state, daos_oclass_id_t oclass, int rc = 0; char buffer[32]; - if (!test_runable(arg, 4)) - return; + test_runable_or_skip(arg, 4); oid = daos_test_oid_gen(arg->coh, oclass, 0, 0, arg->myrank); ioreq_init(&req, arg->coh, oid, DAOS_IOD_ARRAY, arg); @@ -896,8 +884,7 @@ rebuild_large_object(void **state) int j; int rc = 0; - if (!test_runable(arg, 4)) - return; + test_runable_or_skip(arg, 4); T_BEGIN(); for (i = 0; i < 5; i++) { @@ -1000,8 +987,7 @@ rebuild_large_snap(void **state) daos_epoch_t snap_epoch[100]; int i; - if (!test_runable(arg, 4)) - return; + test_runable_or_skip(arg, 4); T_BEGIN(); oid = daos_test_oid_gen(arg->coh, arg->obj_class, 0, 0, arg->myrank); @@ -1036,8 +1022,7 @@ rebuild_full_shards(void **state) struct ioreq req; int i; - if (!test_runable(arg, 4)) - return; + test_runable_or_skip(arg, 4); T_BEGIN(); /* require 4 nodes and 8 targets per node */ @@ -1082,8 +1067,7 @@ rebuild_punch_recs(void **state) int i; int rc; - if (!test_runable(arg, 4)) - return; + test_runable_or_skip(arg, 4); T_BEGIN(); oid = daos_test_oid_gen(arg->coh, arg->obj_class, 0, 0, arg->myrank); @@ -1123,8 +1107,7 @@ rebuild_multiple_group(void **state) int i; int rc; - if (!test_runable(arg, 7)) - return; + test_runable_or_skip(arg, 7); T_BEGIN(); oid = daos_test_oid_gen(arg->coh, OC_RP_2G4, 0, 0, arg->myrank); @@ -1185,8 +1168,7 @@ rebuild_with_large_offset(void **state) int i; int rc; - if (!test_runable(arg, 4)) - return; + test_runable_or_skip(arg, 4); T_BEGIN(); oid = daos_test_oid_gen(arg->coh, arg->obj_class, 0, 0, arg->myrank); @@ -1234,8 +1216,7 @@ rebuild_with_large_key(void **state) int i; int rc; - if (!test_runable(arg, 4)) - return; + test_runable_or_skip(arg, 4); T_BEGIN(); oid = daos_test_oid_gen(arg->coh, arg->obj_class, 0, 0, arg->myrank); @@ -1284,8 +1265,7 @@ rebuild_with_dfs_open_create_punch(void **state) daos_size_t chunk_size = 1048576; int rc; - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); T_BEGIN(); dfs_attr_t attr = {}; @@ -1375,8 +1355,7 @@ rebuild_many_objects_with_failure(void **state) FAULT_INJECTION_REQUIRED(); - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); T_BEGIN(); D_ALLOC_ARRAY(oids, 8000); @@ -1468,9 +1447,7 @@ rebuild_object_with_csum_error(void **state) FAULT_INJECTION_REQUIRED(); - if (!test_runable(arg, 3)) { - skip(); - } + test_runable_or_skip(arg, 3); T_BEGIN(); @@ -1755,8 +1732,7 @@ rebuild_with_dfs_inflight_append(void **state) FAULT_INJECTION_REQUIRED(); - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); T_BEGIN(); daos_pool_set_prop(arg->pool.pool_uuid, "reclaim", "disabled"); @@ -1818,8 +1794,7 @@ rebuild_with_dfs_inflight_punch(void **state) FAULT_INJECTION_REQUIRED(); - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); T_BEGIN(); daos_pool_set_prop(arg->pool.pool_uuid, "reclaim", "disabled"); @@ -1904,8 +1879,7 @@ rebuild_with_dfs_inflight_append_punch(void **state) FAULT_INJECTION_REQUIRED(); - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); T_BEGIN(); daos_pool_set_prop(arg->pool.pool_uuid, "reclaim", "disabled"); @@ -1983,8 +1957,7 @@ rebuild_with_dfs_inflight_punch_create(void **state) struct stat st; int rc; - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); T_BEGIN(); daos_pool_set_prop(arg->pool.pool_uuid, "reclaim", "disabled"); diff --git a/src/tests/suite/daos_test.h b/src/tests/suite/daos_test.h index 4e6faecae58..173884e6372 100644 --- a/src/tests/suite/daos_test.h +++ b/src/tests/suite/daos_test.h @@ -413,7 +413,17 @@ daos_prop_t *get_daos_prop_with_owner_and_acl(char *owner, uint32_t owner_type, typedef int (*test_setup_cb_t)(void **state); typedef int (*test_teardown_cb_t)(void **state); +/* + * Collective across PAR_COMM_WORLD. Use the boolean check for optional subcases; + * the macro skips the whole cmocka test at its call site when prerequisites are not met. + */ bool test_runable(test_arg_t *arg, unsigned int required_nodes); +#define test_runable_or_skip(arg, required_nodes) \ + do { \ + if (!test_runable((arg), (required_nodes))) \ + skip(); \ + } while (0) + int test_pool_get_info(test_arg_t *arg, daos_pool_info_t *pinfo, d_rank_list_t **engine_ranks); int test_get_leader(test_arg_t *arg, d_rank_t *rank); bool test_rebuild_query(test_arg_t **args, int args_cnt); diff --git a/src/tests/suite/daos_upgrade.c b/src/tests/suite/daos_upgrade.c index 9372b75d8be..82f325806ce 100644 --- a/src/tests/suite/daos_upgrade.c +++ b/src/tests/suite/daos_upgrade.c @@ -1,5 +1,6 @@ /** * (C) Copyright 2016-2023 Intel Corporation. + * (C) Copyright 2026 Hewlett Packard Enterprise Development LP * * SPDX-License-Identifier: BSD-2-Clause-Patent */ @@ -31,8 +32,7 @@ upgrade_ec_parity_rotate(void **state) int i; int rc; - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); if (arg->myrank == 0) { rc = daos_debug_set_params(arg->group, -1, DMG_KEY_FAIL_LOC, @@ -99,8 +99,7 @@ upgrade_ec_parity_rotate_single_dkey(void **state) char buf[10]; int rc; - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); if (arg->myrank == 0) { rc = daos_debug_set_params(arg->group, -1, DMG_KEY_FAIL_LOC, diff --git a/src/tests/suite/daos_verify_consistency.c b/src/tests/suite/daos_verify_consistency.c index 398276cbe1f..31e40cbd938 100644 --- a/src/tests/suite/daos_verify_consistency.c +++ b/src/tests/suite/daos_verify_consistency.c @@ -1,5 +1,6 @@ /** * (C) Copyright 2019-2022 Intel Corporation. + * (C) Copyright 2026 Hewlett Packard Enterprise Development LP * * SPDX-License-Identifier: BSD-2-Clause-Patent */ @@ -138,8 +139,7 @@ vc_without_inconsistency(void **state, daos_iod_type_t iod_type) struct ioreq req; int rc; - if (!test_runable(arg, dts_vc_replica_cnt)) - return; + test_runable_or_skip(arg, dts_vc_replica_cnt); oid = daos_test_oid_gen(arg->coh, dts_vc_class, 0, 0, arg->myrank); ioreq_init(&req, arg->coh, oid, iod_type, arg); @@ -176,8 +176,7 @@ vc_3(void **state) print_message("misc single and array value without inconsistency\n"); - if (!test_runable(arg, dts_vc_replica_cnt)) - return; + test_runable_or_skip(arg, dts_vc_replica_cnt); oid = daos_test_oid_gen(arg->coh, dts_vc_class, 0, 0, arg->myrank); @@ -206,8 +205,7 @@ vc_4(void **state) print_message("verify with different rec\n"); - if (!test_runable(arg, dts_vc_replica_cnt)) - return; + test_runable_or_skip(arg, dts_vc_replica_cnt); oid = daos_test_oid_gen(arg->coh, dts_vc_class, 0, 0, arg->myrank); ioreq_init(&req, arg->coh, oid, DAOS_IOD_SINGLE, arg); @@ -235,8 +233,7 @@ vc_test_lost_data(void **state, int type) struct ioreq req; int rc; - if (!test_runable(arg, dts_vc_replica_cnt)) - return; + test_runable_or_skip(arg, dts_vc_replica_cnt); oid = daos_test_oid_gen(arg->coh, dts_vc_class, 0, 0, arg->myrank); ioreq_init(&req, arg->coh, oid, DAOS_IOD_ARRAY, arg); @@ -307,8 +304,7 @@ vc_8(void **state) print_message("verify with lost replica\n"); - if (!test_runable(arg, dts_vc_replica_cnt)) - return; + test_runable_or_skip(arg, dts_vc_replica_cnt); oid = daos_test_oid_gen(arg->coh, dts_vc_class, 0, 0, arg->myrank); ioreq_init(&req, arg->coh, oid, DAOS_IOD_ARRAY, arg); @@ -346,8 +342,7 @@ vc_9(void **state) print_message("verify with different dkey\n"); - if (!test_runable(arg, dts_vc_replica_cnt)) - return; + test_runable_or_skip(arg, dts_vc_replica_cnt); oid = daos_test_oid_gen(arg->coh, dts_vc_class, 0, 0, arg->myrank); ioreq_init(&req, arg->coh, oid, DAOS_IOD_ARRAY, arg); @@ -370,8 +365,7 @@ vc_10(void **state) print_message("OBJ_SYNC RPC retry\n"); - if (!test_runable(arg, dts_vc_replica_cnt)) - return; + test_runable_or_skip(arg, dts_vc_replica_cnt); oid = daos_test_oid_gen(arg->coh, dts_vc_class, 0, 0, arg->myrank); arg->fail_loc = DAOS_OBJ_SYNC_RETRY | DAOS_FAIL_SOME; diff --git a/src/tests/suite/dfs_par_test.c b/src/tests/suite/dfs_par_test.c index f58682db62a..6bd60d1914d 100644 --- a/src/tests/suite/dfs_par_test.c +++ b/src/tests/suite/dfs_par_test.c @@ -394,8 +394,7 @@ dfs_test_ec_short_read(void **state) { test_arg_t *arg = *state; - if (!test_runable(arg, 6)) - return; + test_runable_or_skip(arg, 6); /* less than 1 EC stripe */ dfs_test_short_read_internal(state, OC_EC_4P2G1, From a850b4edf5240535e4d1cd25be4c0655da4d9057 Mon Sep 17 00:00:00 2001 From: Kenneth Cain Date: Fri, 20 Nov 2026 18:27:47 -0500 Subject: [PATCH 2/4] DAOS-19789 test: correct runnable helper spelling Rename the test_runable helper and its skip macro to use runnable spelling. Skip-nlt: true Skip-fault-injection-test: true Test-tag: pr test_rebuild_31 test_rebuild_32 test_rebuild_33 test_rebuild_34 test_rebuild_35 test_rebuild_36 test_rebuild_37 Signed-off-by: Kenneth Cain --- src/tests/suite/daos_aggregate_ec.c | 4 +- src/tests/suite/daos_array.c | 2 +- src/tests/suite/daos_base_tx.c | 32 +++++----- src/tests/suite/daos_checksum.c | 24 ++++---- src/tests/suite/daos_container.c | 4 +- src/tests/suite/daos_degrade_ec.c | 12 ++-- src/tests/suite/daos_dist_tx.c | 54 ++++++++--------- src/tests/suite/daos_drain_common.c | 2 +- src/tests/suite/daos_drain_simple.c | 24 ++++---- src/tests/suite/daos_extend_simple.c | 10 ++-- src/tests/suite/daos_obj.c | 26 ++++---- src/tests/suite/daos_obj_ec.c | 66 ++++++++++---------- src/tests/suite/daos_pool.c | 2 +- src/tests/suite/daos_rebuild.c | 70 +++++++++++----------- src/tests/suite/daos_rebuild_ec.c | 32 +++++----- src/tests/suite/daos_rebuild_interactive.c | 14 ++--- src/tests/suite/daos_rebuild_simple.c | 52 ++++++++-------- src/tests/suite/daos_rebuild_weekly.c | 2 +- src/tests/suite/daos_test.h | 7 ++- src/tests/suite/daos_test_common.c | 2 +- src/tests/suite/daos_upgrade.c | 4 +- src/tests/suite/daos_verify_consistency.c | 14 ++--- src/tests/suite/dfs_par_test.c | 10 ++-- src/tests/suite/dfs_unit_test.c | 2 +- 24 files changed, 236 insertions(+), 235 deletions(-) diff --git a/src/tests/suite/daos_aggregate_ec.c b/src/tests/suite/daos_aggregate_ec.c index 850dca1218d..8c3284514ed 100644 --- a/src/tests/suite/daos_aggregate_ec.c +++ b/src/tests/suite/daos_aggregate_ec.c @@ -847,7 +847,7 @@ test_all_ec_agg(void **statep) test_arg_t *arg = *statep; struct ec_agg_test_ctx ctx = { 0 }; - test_runable_or_skip(arg, 5); + test_runnable_or_skip(arg, 5); daos_pool_set_prop(arg->pool.pool_uuid, "reclaim", "disabled"); setup_ec_agg_tests(statep, &ctx); @@ -893,7 +893,7 @@ fetch_snap_with_agg(void **statep) bool snap_higher = false; int rc; - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); FAULT_INJECTION_REQUIRED(); diff --git a/src/tests/suite/daos_array.c b/src/tests/suite/daos_array.c index e3c7770686c..390386c33e1 100644 --- a/src/tests/suite/daos_array.c +++ b/src/tests/suite/daos_array.c @@ -1229,7 +1229,7 @@ ec_array_key_query(void **state) int rc; par_barrier(PAR_COMM_WORLD); - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); oid = daos_test_oid_gen(arg->coh, OC_EC_4P1G1, typeb, 0, arg->myrank); diff --git a/src/tests/suite/daos_base_tx.c b/src/tests/suite/daos_base_tx.c index e3938273b71..83a15bdf58b 100644 --- a/src/tests/suite/daos_base_tx.c +++ b/src/tests/suite/daos_base_tx.c @@ -78,7 +78,7 @@ dtx_io_test_succ(void **state, daos_iod_type_t iod_type) daos_obj_id_t oid; struct ioreq req; - test_runable_or_skip(arg, dts_dtx_replica_cnt); + test_runnable_or_skip(arg, dts_dtx_replica_cnt); D_ALLOC(update_buf, dts_dtx_iosize); assert_non_null(update_buf); @@ -132,7 +132,7 @@ dtx_io_test_fail(void **state, uint64_t fail_loc) daos_obj_id_t oid; struct ioreq req; - test_runable_or_skip(arg, dts_dtx_replica_cnt); + test_runnable_or_skip(arg, dts_dtx_replica_cnt); D_ALLOC(update_buf1, dts_dtx_iosize); assert_non_null(update_buf1); @@ -249,7 +249,7 @@ dtx_fetch_committable(void **state, bool punch) struct ioreq req; int rc; - test_runable_or_skip(arg, dts_dtx_replica_cnt); + test_runnable_or_skip(arg, dts_dtx_replica_cnt); D_ALLOC(update_buf1, dts_dtx_iosize); assert_non_null(update_buf1); @@ -333,7 +333,7 @@ dtx_modify_committable(void **state, bool committable_punch, bool sync_update) daos_obj_id_t oid; struct ioreq req; - test_runable_or_skip(arg, dts_dtx_replica_cnt); + test_runnable_or_skip(arg, dts_dtx_replica_cnt); D_ALLOC(update_buf1, dts_dtx_iosize); assert_non_null(update_buf1); @@ -416,7 +416,7 @@ dtx_batched_commit(void **state, int count) int rc; int i; - test_runable_or_skip(arg, dts_dtx_replica_cnt); + test_runnable_or_skip(arg, dts_dtx_replica_cnt); D_ALLOC(update_buf, size); assert_non_null(update_buf); @@ -535,7 +535,7 @@ dtx_14(void **state) print_message("Resend with lost multiple replicated obj request\n"); - test_runable_or_skip(arg, dts_dtx_replica_cnt); + test_runnable_or_skip(arg, dts_dtx_replica_cnt); dtx_handle_resend(state, DAOS_DTX_LOST_RPC_REQUEST | DAOS_FAIL_ALWAYS, dts_dtx_class); @@ -548,7 +548,7 @@ dtx_15(void **state) print_message("Resend with lost multiple replicated obj reply\n"); - test_runable_or_skip(arg, dts_dtx_replica_cnt); + test_runnable_or_skip(arg, dts_dtx_replica_cnt); dtx_handle_resend(state, DAOS_DTX_LOST_RPC_REPLY | DAOS_FAIL_ALWAYS, dts_dtx_class); @@ -568,7 +568,7 @@ dtx_16(void **state) print_message("Resend after DTX aggregation\n"); - test_runable_or_skip(arg, dts_dtx_replica_cnt); + test_runnable_or_skip(arg, dts_dtx_replica_cnt); D_ALLOC(update_buf, dts_dtx_iosize); assert_non_null(update_buf); @@ -623,7 +623,7 @@ dtx_17(void **state) print_message("DTX resync during open-close\n"); - test_runable_or_skip(arg, dts_dtx_replica_cnt); + test_runnable_or_skip(arg, dts_dtx_replica_cnt); D_ALLOC(update_buf, dts_dtx_iosize); assert_non_null(update_buf); @@ -726,7 +726,7 @@ dtx_19(void **state) print_message("DTX resend during bulk data transfer - multiple reps\n"); - test_runable_or_skip(arg, 2); + test_runnable_or_skip(arg, 2); dtx_resend_delay(arg, OC_RP_2G1); } @@ -747,7 +747,7 @@ dtx_20(void **state) print_message("race between DTX refresh and DTX resync\n"); - test_runable_or_skip(arg, dts_dtx_replica_cnt); + test_runnable_or_skip(arg, dts_dtx_replica_cnt); D_ALLOC(update_buf, dts_dtx_iosize); assert_non_null(update_buf); @@ -849,7 +849,7 @@ dtx_21(void **state) print_message("do not abort partially committed DTX\n"); - test_runable_or_skip(arg, dts_dtx_replica_cnt); + test_runnable_or_skip(arg, dts_dtx_replica_cnt); D_ALLOC(update_buf, dts_dtx_iosize); assert_non_null(update_buf); @@ -898,7 +898,7 @@ dtx_22(void **state) print_message("iteration does not return aborted DTX\n"); - test_runable_or_skip(arg, dts_dtx_replica_cnt); + test_runnable_or_skip(arg, dts_dtx_replica_cnt); oid = daos_test_oid_gen(arg->coh, dts_dtx_class, DAOS_OT_MULTI_UINT64, 0, arg->myrank); rc = daos_obj_open(arg->coh, oid, DAOS_OO_RW, &oh, NULL); @@ -989,7 +989,7 @@ dtx_23(void **state) print_message("DTX23: Resend with lost reply from non-leader\n"); - test_runable_or_skip(arg, dts_dtx_replica_cnt); + test_runnable_or_skip(arg, dts_dtx_replica_cnt); D_ALLOC(update_buf, dts_dtx_iosize); assert_non_null(update_buf); @@ -1030,7 +1030,7 @@ dtx_24(void **state) print_message("DTX24: DTX commit under space pressure with single container\n"); - test_runable_or_skip(arg, dts_dtx_replica_cnt); + test_runnable_or_skip(arg, dts_dtx_replica_cnt); oid = daos_test_oid_gen(arg->coh, dts_dtx_class, 0, 0, arg->myrank); ioreq_init(&req, arg->coh, oid, DAOS_IOD_ARRAY, arg); @@ -1109,7 +1109,7 @@ dtx_25(void **state) print_message("DTX25: DTX commit under space pressure with multiple containers\n"); - test_runable_or_skip(arg, 3); + test_runnable_or_skip(arg, 3); redun_prop = daos_prop_alloc(1); assert_non_null(redun_prop); diff --git a/src/tests/suite/daos_checksum.c b/src/tests/suite/daos_checksum.c index 1a25bb7cfbc..d313b316fd8 100644 --- a/src/tests/suite/daos_checksum.c +++ b/src/tests/suite/daos_checksum.c @@ -348,7 +348,7 @@ checksum_disabled(void **state) int rc; if (csum_ec_enabled()) - test_runable_or_skip(*state, csum_ec_grp_size()); + test_runnable_or_skip(*state, csum_ec_grp_size()); /** * Setup @@ -390,7 +390,7 @@ io_with_server_side_verify(void **state) FAULT_INJECTION_REQUIRED(); if (csum_ec_enabled()) - test_runable_or_skip(*state, csum_ec_grp_size()); + test_runnable_or_skip(*state, csum_ec_grp_size()); /** * Setup @@ -493,7 +493,7 @@ test_fetch_array(void **state) FAULT_INJECTION_REQUIRED(); if (csum_ec_enabled()) - test_runable_or_skip(*state, csum_ec_grp_size()); + test_runnable_or_skip(*state, csum_ec_grp_size()); /** * Setup @@ -578,7 +578,7 @@ test_fetch_array(void **state) node_nr = 2; oc = OC_RP_2GX; } - if (test_runable(*state, node_nr)) { + if (test_runnable(*state, node_nr)) { /** 5. Replicated object with corruption */ cleanup_cont_obj(&ctx); setup_cont_obj(&ctx, dts_csum_prop_type, false, 1024 * 8, oc); @@ -1311,7 +1311,7 @@ single_value(void **state) FAULT_INJECTION_REQUIRED(); if (csum_ec_enabled()) - test_runable_or_skip(*state, csum_ec_grp_size()); + test_runnable_or_skip(*state, csum_ec_grp_size()); print_message("test small single-value\n"); single_value_test(state, false); @@ -1329,7 +1329,7 @@ dtx_with_csum(void **state) int rc; if (csum_ec_enabled()) - test_runable_or_skip(arg, csum_ec_grp_size()); + test_runnable_or_skip(arg, csum_ec_grp_size()); setup_from_test_args(&ctx, arg); setup_simple_data(&ctx); @@ -1797,7 +1797,7 @@ rebuild_test(void **state, int chunksize, int data_len_bytes, int iod_type) d_rank_list_t *affected_engines = NULL; int rc; - test_runable_or_skip(*state, 3); + test_runnable_or_skip(*state, 3); setup_from_test_args(&ctx, *state); setup_cont_obj(&ctx, DAOS_PROP_CO_CSUM_CRC64, false, chunksize, @@ -2524,7 +2524,7 @@ ec_chunk_plus_one(void **state) { const uint32_t ec_chunk_plus_one = 1024 * 1024 + 1; - test_runable_or_skip(*state, 3); + test_runnable_or_skip(*state, 3); ARRAY_UPDATE_FETCH_TESTCASE(state, { .oclass = OC_EC_2P1G1, @@ -2544,7 +2544,7 @@ ec_two_chunk_plus_one(void **state) { const uint32_t ec_chunk_plus_one = 2 * 1024 * 1024 + 1; - test_runable_or_skip(*state, 3); + test_runnable_or_skip(*state, 3); ARRAY_UPDATE_FETCH_TESTCASE(state, { .oclass = OC_EC_2P1G1, @@ -2567,7 +2567,7 @@ basic_scrubbing_test(void **state, char *scrub_freq) int rc; if (csum_ec_enabled()) - test_runable_or_skip(*state, csum_ec_grp_size()); + test_runnable_or_skip(*state, csum_ec_grp_size()); /** * Setup @@ -2636,7 +2636,7 @@ multiple_ec_singv_csum(void **state) FAULT_INJECTION_REQUIRED(); if (csum_ec_enabled()) - test_runable_or_skip(arg, csum_ec_grp_size()); + test_runnable_or_skip(arg, csum_ec_grp_size()); setup_from_test_args(&ctx, *state); setup_cont_obj(&ctx, dts_csum_prop_type, true, 0, oc); @@ -2713,7 +2713,7 @@ multiple_ec_singv_csum_with_iod_size_0(void **state) int i, rc; if (csum_ec_enabled()) - test_runable_or_skip(arg, csum_ec_grp_size()); + test_runnable_or_skip(arg, csum_ec_grp_size()); setup_from_test_args(&ctx, *state); setup_cont_obj(&ctx, dts_csum_prop_type, true, 0, oc); diff --git a/src/tests/suite/daos_container.c b/src/tests/suite/daos_container.c index 80d6e414f5f..ca31cdfbc24 100644 --- a/src/tests/suite/daos_container.c +++ b/src/tests/suite/daos_container.c @@ -2723,7 +2723,7 @@ co_rf_simple(void **state) FAULT_INJECTION_REQUIRED(); /* needs 3 alive nodes after excluding 3 */ - test_runable_or_skip(arg0, 6); + test_runnable_or_skip(arg0, 6); print_message("create container with properties, and query/verify.\n"); rc = test_setup((void **)&arg, SETUP_POOL_CONNECT, arg0->multi_rank, @@ -3137,7 +3137,7 @@ co_redun_lvl(void **state) FAULT_INJECTION_REQUIRED(); - test_runable_or_skip(arg0, 8); + test_runnable_or_skip(arg0, 8); print_message("create container with properties, and query/verify.\n"); rc = test_setup((void **)&arg, SETUP_POOL_CONNECT, arg0->multi_rank, diff --git a/src/tests/suite/daos_degrade_ec.c b/src/tests/suite/daos_degrade_ec.c index cbeedb4cd4b..caa27738f09 100644 --- a/src/tests/suite/daos_degrade_ec.c +++ b/src/tests/suite/daos_degrade_ec.c @@ -145,7 +145,7 @@ degrade_ec_internal(void **state, int *shards, int shards_nr, int write_type) d_rank_t ranks[4] = { -1 }; int idx = 0; - test_runable_or_skip(arg, DEGRADE_RANK_SIZE); + test_runnable_or_skip(arg, DEGRADE_RANK_SIZE); oid = daos_test_oid_gen(arg->coh, OC_EC_4P2G1, 0, 0, arg->myrank); degrade_ec_write(arg, oid, write_type); @@ -395,7 +395,7 @@ degrade_multi_conts_agg(void **state) int i; int rc; - test_runable_or_skip(arg, DEGRADE_RANK_SIZE); + test_runnable_or_skip(arg, DEGRADE_RANK_SIZE); FAULT_INJECTION_REQUIRED(); @@ -491,7 +491,7 @@ degrade_ec_partial_update_agg(void **state) FAULT_INJECTION_REQUIRED(); - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); data = (char *)malloc(EC_CELL_SIZE); assert_true(data != NULL); @@ -543,7 +543,7 @@ degrade_ec_agg(void **state) char *data; char *verify_data; - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); data = (char *)malloc(EC_CELL_SIZE); assert_true(data != NULL); @@ -609,7 +609,7 @@ degrade_ec_update(void **state) char *data; #define TEST_EC_STRIPE_SIZE (1 * 1024 * 1024 * 4) - if (!test_runable(arg, 6) || (arg->srv_ntgts / arg->srv_nnodes) < 2) + if (!test_runnable(arg, 6) || (arg->srv_ntgts / arg->srv_nnodes) < 2) skip(); print_message("test 1 - DER_NEED_TX case\n"); @@ -685,7 +685,7 @@ degrade_ec_agg_punch(void **state, int shard) char *data; char *verify_data; - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); data = (char *)malloc(EC_CELL_SIZE); assert_true(data != NULL); diff --git a/src/tests/suite/daos_dist_tx.c b/src/tests/suite/daos_dist_tx.c index 6ceac4d92c1..6e18116134a 100644 --- a/src/tests/suite/daos_dist_tx.c +++ b/src/tests/suite/daos_dist_tx.c @@ -43,7 +43,7 @@ dtx_0(void **state) */ print_message("DTX0: SV fetch against EC obj\n"); - test_runable_or_skip(arg, 3); + test_runnable_or_skip(arg, 3); MUST(daos_tx_open(arg->coh, &th, 0, NULL)); @@ -211,7 +211,7 @@ dtx_5(void **state) print_message("DTX5: Multiple small SV update on multiple EC objs\n"); - test_runable_or_skip(arg, 3); + test_runnable_or_skip(arg, 3); dtx_update_multiple_objs(arg, DAOS_IOD_SINGLE, 1 << 8, OC_EC_2P1G1); } @@ -223,7 +223,7 @@ dtx_6(void **state) print_message("DTX6: Multiple large EV update on multiple EC objs\n"); - test_runable_or_skip(arg, 3); + test_runnable_or_skip(arg, 3); dtx_update_multiple_objs(arg, DAOS_IOD_ARRAY, 1 << 16, OC_EC_2P1G1); } @@ -818,7 +818,7 @@ dtx_18(void **state) print_message("DTX18: Spread read time-stamp when commit\n"); - test_runable_or_skip(arg, 3); + test_runnable_or_skip(arg, 3); arg->async = 0; oid = daos_test_oid_gen(arg->coh, OC_RP_3G1, 0, 0, arg->myrank); @@ -899,7 +899,7 @@ dtx_19(void **state) print_message("DTX19: misc rep and EC object update in same TX.\n"); - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); MUST(daos_tx_open(arg->coh, &th, DAOS_TF_ZERO_COPY, NULL)); arg->async = 0; @@ -1021,7 +1021,7 @@ dtx_20(void **state) print_message("DTX20: atomicity - either all done or none done\n"); - test_runable_or_skip(arg, 3); + test_runnable_or_skip(arg, 3); dtx_init_oid_req_akey(arg, oids, reqs, ocs, types, NULL, 2, 0, 0); @@ -1117,7 +1117,7 @@ dtx_21(void **state) print_message("DTX21: TX atomicity - internal transaction.\n"); - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); dtx_init_oid_req_akey(arg, &oid, &req, &oc, &type, NULL, 1, 0, 0); @@ -1223,7 +1223,7 @@ dtx_22(void **state) print_message("DTX22: TX isolation - invisible partial modification\n"); - test_runable_or_skip(arg, 3); + test_runnable_or_skip(arg, 3); if (arg->myrank == 0) dtx_init_oid_req_akey(arg, oids, reqs, ocs, types, @@ -1319,7 +1319,7 @@ dtx_23(void **state) print_message("DTX23: server start epoch - refuse TX with old epoch\n"); - test_runable_or_skip(arg, 3); + test_runnable_or_skip(arg, 3); dtx_init_oid_req_akey(arg, oids, reqs, ocs, types, NULL, 2, 0, 0); @@ -1387,7 +1387,7 @@ dtx_24(void **state) print_message("DTX24: async batched commit\n"); - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); print_message("Transactional update something\n"); @@ -1458,7 +1458,7 @@ dtx_25(void **state) print_message("DTX25: uncertain status check - committable\n"); - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); par_barrier(PAR_COMM_WORLD); if (arg->myrank == 0) @@ -1526,7 +1526,7 @@ dtx_26(void **state) print_message("DTX26: uncertain status check - non-committable\n"); - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); par_barrier(PAR_COMM_WORLD); daos_fail_loc_set(DAOS_DTX_COMMIT_SYNC | DAOS_FAIL_ALWAYS); @@ -1605,7 +1605,7 @@ dtx_uncertainty_miss_request(test_arg_t *arg, uint64_t loc, bool abort, int i; int rc; - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); par_barrier(PAR_COMM_WORLD); daos_fail_loc_set(DAOS_DTX_COMMIT_SYNC | DAOS_FAIL_ALWAYS); @@ -1837,7 +1837,7 @@ dtx_29(void **state) print_message("DTX29: uncertain status check - fetch re-entry\n"); - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); dtx_init_oid_req_akey(arg, oids, reqs, ocs, types, akeys, 2, DTX_NC_CNT, 0); @@ -1971,7 +1971,7 @@ dtx_30(void **state) print_message("DTX30: uncertain status check - enumeration re-entry\n"); - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); dtx_init_oid_req_akey(arg, oids, reqs, ocs, types, NULL, 2, 0, 0); @@ -2072,7 +2072,7 @@ dtx_31(void **state) print_message("DTX31: uncertain status check - punch re-entry\n"); - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); dtx_init_oid_req_akey(arg, oids, reqs, ocs, types, akeys, 2, DTX_NC_CNT, 0); @@ -2138,7 +2138,7 @@ dtx_32(void **state) print_message("DTX32: uncertain status check - update re-entry\n"); - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); dtx_init_oid_req_akey(arg, oids, reqs, ocs, types, akeys, 2, IOREQ_SG_IOD_NR, 0); @@ -2213,7 +2213,7 @@ dtx_33(void **state) print_message("DTX33: uncertain status check - query key re-entry\n"); - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); dtx_init_oid_req_akey(arg, oids, reqs, ocs, types, NULL, 2, 0, DAOS_OT_MULTI_UINT64); @@ -2326,7 +2326,7 @@ dtx_34(void **state) print_message("DTX34: uncertain status check - CPD RPC re-entry\n"); - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); dtx_init_oid_req_akey(arg, oids, reqs, ocs, types, akeys, 2, DTX_NC_CNT, 0); @@ -2417,7 +2417,7 @@ dtx_35(void **state) print_message("DTX35: resync during reopen container\n"); - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); dtx_init_oid_req_akey(arg, oids, reqs, ocs, types, akeys, 2, DTX_NC_CNT, 0); @@ -2524,7 +2524,7 @@ dtx_36(void **state) print_message("DTX36: resync - DTX entry for read only ops\n"); - test_runable_or_skip(arg, 7); + test_runnable_or_skip(arg, 7); /* Obj1 has more redundancy groups than obj2. If the TX reads * from multiple redundancy groups of obj1 and only writes to @@ -2642,7 +2642,7 @@ dtx_37(void **state) print_message("DTX37: resync - leader failed during prepare\n"); - test_runable_or_skip(arg, 7); + test_runnable_or_skip(arg, 7); dtx_init_oid_req_akey(arg, &oid, &req, &oc, &type, akeys, 1, DTX_NC_CNT, 0); @@ -2774,7 +2774,7 @@ dtx_38(void **state) print_message("DTX38: resync - lost whole redundancy groups\n"); - test_runable_or_skip(arg, 7); + test_runnable_or_skip(arg, 7); d_getenv_bool("DAOS_TX_VERIFY_RDG", &rdg_verify); if (!rdg_verify) @@ -2944,7 +2944,7 @@ dtx_39(void **state) print_message("DTX39: not restar the transaction with fixed epoch\n"); - test_runable_or_skip(arg, 3); + test_runnable_or_skip(arg, 3); if (arg->myrank == 0) { daos_obj_id_t oid; @@ -3176,7 +3176,7 @@ dtx_43(void **state) print_message("DTX43: engine restarted quickly without pool map change\n"); - if (!test_runable(arg, 3)) + if (!test_runnable(arg, 3)) skip(); arg->async = 0; @@ -3364,7 +3364,7 @@ dtx_44(void **state) print_message("DTX44: leader switch - resend update with same leader\n"); - if (!test_runable(arg, 4)) + if (!test_runnable(arg, 4)) skip(); dtx_leader_switch(state, OC_RP_3G1, DAOS_IOD_SINGLE, false); @@ -3377,7 +3377,7 @@ dtx_45(void **state) print_message("DTX45: leader switch - resend update with spec leader\n"); - if (!test_runable(arg, 7)) + if (!test_runnable(arg, 7)) skip(); dtx_leader_switch(state, OC_EC_4P2G1, DAOS_IOD_ARRAY, true); diff --git a/src/tests/suite/daos_drain_common.c b/src/tests/suite/daos_drain_common.c index 07aa89c2926..38cb200b6a1 100644 --- a/src/tests/suite/daos_drain_common.c +++ b/src/tests/suite/daos_drain_common.c @@ -163,7 +163,7 @@ dfs_extend_drain_common(void **state, int opc, uint32_t objclass, FAULT_INJECTION_REQUIRED(); - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); attr.da_props = daos_prop_alloc(2); assert_non_null(attr.da_props); diff --git a/src/tests/suite/daos_drain_simple.c b/src/tests/suite/daos_drain_simple.c index 4849883f1a3..88d52efdccb 100644 --- a/src/tests/suite/daos_drain_simple.c +++ b/src/tests/suite/daos_drain_simple.c @@ -41,7 +41,7 @@ drain_dkeys(void **state) FAULT_INJECTION_REQUIRED(); - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); T_BEGIN(); oid = daos_test_oid_gen(arg->coh, DAOS_OC_R1S_SPEC_RANK, 0, 0, @@ -109,7 +109,7 @@ cont_open_in_drain(void **state) FAULT_INJECTION_REQUIRED(); - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); T_BEGIN(); oid = daos_test_oid_gen(arg->coh, DAOS_OC_R1S_SPEC_RANK, 0, 0, @@ -166,7 +166,7 @@ drain_akeys(void **state) FAULT_INJECTION_REQUIRED(); - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); T_BEGIN(); oid = daos_test_oid_gen(arg->coh, DAOS_OC_R1S_SPEC_RANK, 0, 0, @@ -220,7 +220,7 @@ drain_indexes(void **state) FAULT_INJECTION_REQUIRED(); - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); T_BEGIN(); oid = daos_test_oid_gen(arg->coh, DAOS_OC_R1S_SPEC_RANK, 0, 0, @@ -282,7 +282,7 @@ drain_snap_update_keys(void **state) FAULT_INJECTION_REQUIRED(); - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); T_BEGIN(); oid = daos_test_oid_gen(arg->coh, DAOS_OC_R1S_SPEC_RANK, 0, 0, @@ -360,7 +360,7 @@ drain_snap_punch_keys(void **state) FAULT_INJECTION_REQUIRED(); - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); T_BEGIN(); oid = daos_test_oid_gen(arg->coh, DAOS_OC_R3S_SPEC_RANK, 0, 0, @@ -449,7 +449,7 @@ drain_multiple(void **state) FAULT_INJECTION_REQUIRED(); - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); T_BEGIN(); oid = daos_test_oid_gen(arg->coh, DAOS_OC_R1S_SPEC_RANK, 0, 0, @@ -518,7 +518,7 @@ drain_large_rec(void **state) FAULT_INJECTION_REQUIRED(); - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); T_BEGIN(); oid = daos_test_oid_gen(arg->coh, DAOS_OC_R1S_SPEC_RANK, 0, 0, @@ -569,7 +569,7 @@ drain_objects(void **state) FAULT_INJECTION_REQUIRED(); - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); T_BEGIN(); for (i = 0; i < OBJ_NR; i++) { @@ -598,7 +598,7 @@ drain_fail_and_retry_objects(void **state) FAULT_INJECTION_REQUIRED(); - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); T_BEGIN(); for (i = 0; i < OBJ_NR; i++) { @@ -637,7 +637,7 @@ drain_then_exclude(void **state) FAULT_INJECTION_REQUIRED(); - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); T_BEGIN(); oid = daos_test_oid_gen(arg->coh, OC_EC_2P1GX, 0, 0, arg->myrank); @@ -836,7 +836,7 @@ dfs_drain_extend(void **state) FAULT_INJECTION_REQUIRED(); - test_runable_or_skip(arg, 3); + test_runnable_or_skip(arg, 3); T_BEGIN(); attr.da_props = daos_prop_alloc(2); diff --git a/src/tests/suite/daos_extend_simple.c b/src/tests/suite/daos_extend_simple.c index 57193937afd..113f7f4c5a8 100644 --- a/src/tests/suite/daos_extend_simple.c +++ b/src/tests/suite/daos_extend_simple.c @@ -37,7 +37,7 @@ extend_dkeys(void **state) T_BEGIN(); - test_runable_or_skip(arg, 3); + test_runnable_or_skip(arg, 3); for (i = 0; i < OBJ_NR; i++) { oids[i] = daos_test_oid_gen(arg->coh, OC_RP_3G1, 0, 0, arg->myrank); @@ -78,7 +78,7 @@ extend_akeys(void **state) T_BEGIN(); - test_runable_or_skip(arg, 3); + test_runnable_or_skip(arg, 3); for (i = 0; i < OBJ_NR; i++) { oids[i] = daos_test_oid_gen(arg->coh, OC_RP_3G1, 0, 0, arg->myrank); @@ -119,7 +119,7 @@ extend_indexes(void **state) T_BEGIN(); - test_runable_or_skip(arg, 3); + test_runnable_or_skip(arg, 3); for (i = 0; i < OBJ_NR; i++) { oids[i] = daos_test_oid_gen(arg->coh, OC_RP_3G1, 0, 0, arg->myrank); @@ -162,7 +162,7 @@ extend_large_rec(void **state) T_BEGIN(); - test_runable_or_skip(arg, 3); + test_runnable_or_skip(arg, 3); memset(buffer, 'a', 5000); for (i = 0; i < OBJ_NR; i++) { @@ -200,7 +200,7 @@ extend_objects(void **state) T_BEGIN(); - test_runable_or_skip(arg, 3); + test_runnable_or_skip(arg, 3); for (i = 0; i < OBJ_NR; i++) { oids[i] = daos_test_oid_gen(arg->coh, OC_S1, 0, 0, arg->myrank); diff --git a/src/tests/suite/daos_obj.c b/src/tests/suite/daos_obj.c index d30a3effbd6..aa7fd52ed6d 100644 --- a/src/tests/suite/daos_obj.c +++ b/src/tests/suite/daos_obj.c @@ -3116,7 +3116,7 @@ tgt_idx_change_retry(void **state) */ /* needs at lest 4 targets, exclude one and another 3 raft nodes */ - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); if (!arg0->async) { if (arg->myrank == 0) @@ -3259,7 +3259,7 @@ fetch_replica_unavail(void **state) FAULT_INJECTION_REQUIRED(); /* needs at lest 4 targets, exclude one and another 3 raft nodes */ - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); oid = daos_test_oid_gen(arg->coh, DAOS_OC_R1S_SPEC_RANK, 0, 0, arg->myrank); @@ -3853,7 +3853,7 @@ io_pool_map_refresh_trigger(void **state) FAULT_INJECTION_REQUIRED(); /* needs at lest 2 targets */ - test_runable_or_skip(arg, 2); + test_runnable_or_skip(arg, 2); /* Choose an rank other than leader */ test_get_leader(arg, &leader); @@ -4057,7 +4057,7 @@ io_capa_iv_fetch(void **state) d_rank_t leader; /* needs at lest 2 targets */ - test_runable_or_skip(arg, 2); + test_runnable_or_skip(arg, 2); test_get_leader(arg, &leader); oid = daos_test_oid_gen(arg->coh, DAOS_OC_R1S_SPEC_RANK, 0, 0, @@ -4183,7 +4183,7 @@ io_fetch_retry_another_replica(void **state) FAULT_INJECTION_REQUIRED(); /* needs at lest 2 targets */ - test_runable_or_skip(arg, 2); + test_runnable_or_skip(arg, 2); oid = daos_test_oid_gen(arg->coh, DAOS_OC_R2S_SPEC_RANK, 0, 0, arg->myrank); @@ -5172,7 +5172,7 @@ io_50(void **state) print_message("Collective punch object - OC_SX\n"); - test_runable_or_skip(arg, 2); + test_runnable_or_skip(arg, 2); obj_coll_punch(arg, OC_SX); } @@ -5184,7 +5184,7 @@ io_51(void **state) print_message("Collective punch object - OC_EC_2P1G2\n"); - test_runable_or_skip(arg, 3); + test_runnable_or_skip(arg, 3); obj_coll_punch(arg, OC_EC_2P1G2); } @@ -5196,7 +5196,7 @@ io_52(void **state) print_message("Collective punch object - OC_EC_4P1GX\n"); - test_runable_or_skip(arg, 5); + test_runnable_or_skip(arg, 5); obj_coll_punch(arg, OC_EC_4P1GX); } @@ -5301,7 +5301,7 @@ io_53(void **state) print_message("Collective object query - OC_SX\n"); - test_runable_or_skip(arg, 2); + test_runnable_or_skip(arg, 2); obj_coll_query(arg, OC_SX, false); } @@ -5313,7 +5313,7 @@ io_54(void **state) print_message("Collective object query - OC_EC_2P1G2\n"); - test_runable_or_skip(arg, 3); + test_runnable_or_skip(arg, 3); obj_coll_query(arg, OC_EC_2P1G2, false); } @@ -5325,7 +5325,7 @@ io_55(void **state) print_message("Collective object query - OC_EC_4P1GX\n"); - test_runable_or_skip(arg, 5); + test_runnable_or_skip(arg, 5); obj_coll_query(arg, OC_EC_4P1GX, false); } @@ -5337,7 +5337,7 @@ io_56(void **state) print_message("Collective object query with sparse ranks\n"); - test_runable_or_skip(arg, 3); + test_runnable_or_skip(arg, 3); obj_coll_query(arg, OC_RP_3GX, true); } @@ -5349,7 +5349,7 @@ io_57(void **state) print_message("Collective object query with rank_0 excluded\n"); - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); rebuild_single_pool_rank(arg, 0, false); obj_coll_query(arg, OC_EC_2P1GX, false); diff --git a/src/tests/suite/daos_obj_ec.c b/src/tests/suite/daos_obj_ec.c index 9473de1dce4..98cb2fa5af1 100644 --- a/src/tests/suite/daos_obj_ec.c +++ b/src/tests/suite/daos_obj_ec.c @@ -97,7 +97,7 @@ ec_dkey_list_punch(void **state) char *dkeys[10000]; int i; - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); oid = daos_test_oid_gen(arg->coh, ec_obj_class, 0, 0, arg->myrank); ioreq_init(&req, arg->coh, oid, DAOS_IOD_ARRAY, arg); @@ -195,7 +195,7 @@ ec_akey_list_punch(void **state) int num_akey; int i; - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); oid = daos_test_oid_gen(arg->coh, ec_obj_class, 0, 0, arg->myrank); ioreq_init(&req, arg->coh, oid, DAOS_IOD_ARRAY, arg); @@ -287,7 +287,7 @@ ec_rec_list_punch(void **state) daos_recx_t recx; char data[16]; - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); oid = daos_test_oid_gen(arg->coh, ec_obj_class, 0, 0, arg->myrank); ioreq_init(&req, arg->coh, oid, DAOS_IOD_ARRAY, arg); @@ -533,7 +533,7 @@ ec_partial_update_agg(void **state) FAULT_INJECTION_REQUIRED(); - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); daos_pool_set_prop(arg->pool.pool_uuid, "reclaim", "time"); data = (char *)malloc(EC_CELL_SIZE); @@ -596,7 +596,7 @@ ec_cross_cell_partial_update_agg(void **state) FAULT_INJECTION_REQUIRED(); - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); daos_pool_set_prop(arg->pool.pool_uuid, "reclaim", "time"); data = (char *)malloc(update_size); @@ -650,7 +650,7 @@ ec_full_partial_update_agg(void **state) FAULT_INJECTION_REQUIRED(); - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); daos_pool_set_prop(arg->pool.pool_uuid, "reclaim", "time"); oid = daos_test_oid_gen(arg->coh, ec_obj_class, 0, 0, arg->myrank); @@ -728,7 +728,7 @@ ec_partial_full_update_agg(void **state) FAULT_INJECTION_REQUIRED(); - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); daos_pool_set_prop(arg->pool.pool_uuid, "reclaim", "time"); oid = daos_test_oid_gen(arg->coh, ec_obj_class, 0, 0, arg->myrank); @@ -920,7 +920,7 @@ ec_fail_agg_internal(void **state, unsigned fail_loc) char *data; char *verify_data; - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); daos_pool_set_prop(arg->pool.pool_uuid, "reclaim", "time"); data = (char *)malloc(EC_CELL_SIZE); @@ -987,7 +987,7 @@ ec_singv_array_mixed_io(void **state) int i, rc; daos_size_t size = 131071; - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); /** open object */ oid = daos_test_oid_gen(arg->coh, ec_obj_class, 0, 0, arg->myrank); @@ -1092,7 +1092,7 @@ ec_full_stripe_snapshot(void **state) char *verify_data; int i; - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); daos_pool_set_prop(arg->pool.pool_uuid, "reclaim", "time"); oid = daos_test_oid_gen(arg->coh, ec_obj_class, 0, 0, arg->myrank); @@ -1150,7 +1150,7 @@ ec_partial_stripe_snapshot_internal(void **state, int data_size) FAULT_INJECTION_REQUIRED(); - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); daos_pool_set_prop(arg->pool.pool_uuid, "reclaim", "time"); oid = daos_test_oid_gen(arg->coh, ec_obj_class, 0, 0, arg->myrank); @@ -1340,7 +1340,7 @@ ec_singv_overwrite_oc(void **state, unsigned int ec_oc) int i, rc; daos_size_t size; - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); /** open object */ oid = daos_test_oid_gen(arg->coh, ec_oc, 0, 0, arg->myrank); @@ -1468,7 +1468,7 @@ ec_singv_overwrite(void **state) { test_arg_t *arg = *state; - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); ec_singv_overwrite_oc(state, OC_EC_2P1G1); ec_singv_overwrite_oc(state, OC_EC_2P1G2); @@ -1640,7 +1640,7 @@ ec_singv_diff_size_fetch(void **state) { test_arg_t *arg = *state; - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); print_message("test OC_EC_2P1G1, small singv 511B\n"); ec_singv_size_fetch_oc(state, OC_EC_2P1G1, 511, 0); @@ -1824,7 +1824,7 @@ ec_singv_stale_shard_fetch(void **state) char co_str_nocsum[37]; int rc; - if (!test_runable(arg, 6)) + if (!test_runnable(arg, 6)) return; /* The checksum of the fetched data is only verified if checksum is enabled for the @@ -1910,7 +1910,7 @@ ec_cond_fetch(void **state) uint64_t fail_val; bool degraded_test = false; - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); /** open object */ oid = daos_test_oid_gen(arg->coh, ec_obj_class, 0, 0, arg->myrank); @@ -2082,7 +2082,7 @@ ec_data_recov(void **state) uint16_t shard[2]; uint64_t fail_val; - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); /** open object */ oid = daos_test_oid_gen(arg->coh, ec_obj_class, 0, 0, arg->myrank); @@ -2182,7 +2182,7 @@ ec_multi_singv_overwrite(void **state) size_t new_len[3]; int i, rc; - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); for (i = 0; i < 3; i++) { buf[i] = NULL; @@ -2275,7 +2275,7 @@ ec_multi_array(void **state) daos_recx_t recx[3]; int i, rc; - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); for (i = 0; i < 3; i++) { buf[i] = NULL; @@ -2386,7 +2386,7 @@ ec_few_partial_stripe_aggregation(void **state) char *data; daos_recx_t recx; - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); daos_pool_set_prop(arg->pool.pool_uuid, "reclaim", "time"); oid = daos_test_oid_gen(arg->coh, OC_EC_4P2GX, 0, 0, arg->myrank); @@ -2431,7 +2431,7 @@ ec_rec_parity_list(void **state) uint64_t start = UINT64_MAX; uint64_t end = 0; - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); data = (char *)malloc(stripe_size); oid = daos_test_oid_gen(arg->coh, OC_EC_4P2G1, 0, 0, arg->myrank); @@ -2500,7 +2500,7 @@ ec_update_2akeys(void **state) FAULT_INJECTION_REQUIRED(); - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); /** open object */ oid = daos_test_oid_gen(arg->coh, ec_obj_class, 0, 0, arg->myrank); @@ -2608,7 +2608,7 @@ ec_dkey_enum_fail(void **state) int i; int rc; - test_runable_or_skip(arg, 3); + test_runnable_or_skip(arg, 3); oid = daos_test_oid_gen(arg->coh, OC_EC_2P1G1, 0, 0, arg->myrank); ioreq_init(&req, arg->coh, oid, DAOS_IOD_ARRAY, arg); @@ -2661,7 +2661,7 @@ ec_single_stripe_nvme_io(void **state) daos_recx_t recx; int i; - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); oid = daos_test_oid_gen(arg->coh, OC_EC_2P1G1, 0, 0, arg->myrank); ioreq_init(&req, arg->coh, oid, DAOS_IOD_ARRAY, arg); @@ -2709,7 +2709,7 @@ ec_two_stripes_nvme_io(void **state) daos_recx_t recx; int i; - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); oid = daos_test_oid_gen(arg->coh, OC_EC_4P2G1, 0, 0, arg->myrank); ioreq_init(&req, arg->coh, oid, DAOS_IOD_ARRAY, arg); @@ -2765,7 +2765,7 @@ ec_three_stripes_nvme_io(void **state) FAULT_INJECTION_REQUIRED(); - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); oid = daos_test_oid_gen(arg->coh, OC_EC_4P2G1, 0, 0, arg->myrank); ioreq_init(&req, arg->coh, oid, DAOS_IOD_ARRAY, arg); @@ -2828,7 +2828,7 @@ ec_full_partial_punch_agg(void **state) FAULT_INJECTION_REQUIRED(); - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); daos_pool_set_prop(arg->pool.pool_uuid, "reclaim", "time"); oid = daos_test_oid_gen(arg->coh, ec_obj_class, 0, 0, arg->myrank); @@ -2929,7 +2929,7 @@ ec_fetch_iom(void **state) char *buf; int i, rc; - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); buf_len = EC_IOM_EXT_NR * EC_IOM_EXT_SIZE; D_ALLOC(buf, buf_len); @@ -3088,7 +3088,7 @@ ec_fetch_multi_iom(void **state) char *buf; int i, rc; - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); buf_len = EC_IOM_EXT_NR * EC_IOM_EXT_SIZE; D_ALLOC(buf, buf_len); @@ -3440,7 +3440,7 @@ ec_clone_punched_stripe(void **state) int i; int rc; - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); D_ALLOC(data, stripe_size); assert_non_null(data); @@ -3498,7 +3498,7 @@ ec_clone_sparse_stripe(void **state) int i; int rc; - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); D_ALLOC(data, stripe_size); assert_non_null(data); @@ -3564,7 +3564,7 @@ ec_clone_random(void **state) int i; int rc; - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); env = getenv("DAOS_CLONE_TEST_SEED"); seed = env != NULL ? atoi(env) : (unsigned int)time(NULL); @@ -3651,7 +3651,7 @@ clone_epoch_skew(void **state) int i; int rc; - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); D_ALLOC(data, len); assert_non_null(data); diff --git a/src/tests/suite/daos_pool.c b/src/tests/suite/daos_pool.c index 39bf7e016ed..764d20871f1 100644 --- a/src/tests/suite/daos_pool.c +++ b/src/tests/suite/daos_pool.c @@ -2243,7 +2243,7 @@ pool_map_refreshes_common(void **state, bool fall_back) skip(); } - test_runable_or_skip(arg, 2); + test_runnable_or_skip(arg, 2); rebuild_single_pool_target(arg, rank, tgt, false); diff --git a/src/tests/suite/daos_rebuild.c b/src/tests/suite/daos_rebuild.c index 3cabac9ef58..5a3b2cf560c 100644 --- a/src/tests/suite/daos_rebuild.c +++ b/src/tests/suite/daos_rebuild.c @@ -47,7 +47,7 @@ rebuild_drop_scan(void **state) int rc; int i; - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); for (i = 0; i < OBJ_NR; i++) { oids[i] = daos_test_oid_gen(arg->coh, DAOS_OC_R3S_SPEC_RANK, 0, @@ -85,7 +85,7 @@ rebuild_retry_rebuild(void **state) int tgt = DEFAULT_FAIL_TGT; int i; - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); for (i = 0; i < OBJ_NR; i++) { oids[i] = daos_test_oid_gen(arg->coh, DAOS_OC_R3S_SPEC_RANK, 0, @@ -117,7 +117,7 @@ rebuild_retry_for_stale_pool(void **state) daos_obj_id_t oids[OBJ_NR]; int i; - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); for (i = 0; i < OBJ_NR; i++) { oids[i] = daos_test_oid_gen(arg->coh, DAOS_OC_R3S_SPEC_RANK, 0, @@ -154,7 +154,7 @@ rebuild_drop_obj(void **state) daos_obj_id_t oids[OBJ_NR]; int i; - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); for (i = 0; i < OBJ_NR; i++) { oids[i] = daos_test_oid_gen(arg->coh, DAOS_OC_R3S_SPEC_RANK, 0, @@ -185,7 +185,7 @@ rebuild_update_failed(void **state) int tgt = DEFAULT_FAIL_TGT; int i; - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); for (i = 0; i < OBJ_NR; i++) { oids[i] = daos_test_oid_gen(arg->coh, DAOS_OC_R3S_SPEC_RANK, 0, @@ -215,7 +215,7 @@ rebuild_multiple_pools(void **state) int i; int rc; - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); args[0] = arg; /* create/connect another pool */ @@ -314,7 +314,7 @@ rebuild_destroy_container(void **state) int i; int rc; - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); /* create/connect another pool */ rc = rebuild_pool_create(&new_arg, arg, SETUP_CONT_CONNECT, NULL); @@ -345,7 +345,7 @@ rebuild_close_container(void **state) int i; int rc; - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); /* create/connect another pool */ rc = rebuild_pool_create(&new_arg, arg, SETUP_CONT_CONNECT, NULL); @@ -410,7 +410,7 @@ rebuild_destroy_pool_internal(void **state, uint64_t fail_loc) int i; int rc; - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); rc = rebuild_pool_create(&new_arg, arg, SETUP_CONT_CONNECT, NULL); if (rc) @@ -457,7 +457,7 @@ rebuild_iv_tgt_fail(void **state) daos_obj_id_t oids[OBJ_NR]; int i; - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); for (i = 0; i < OBJ_NR; i++) { oids[i] = daos_test_oid_gen(arg->coh, DAOS_OC_R3S_SPEC_RANK, 0, @@ -488,7 +488,7 @@ rebuild_tgt_start_fail(void **state) d_rank_t exclude_rank = 0; int i; - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); for (i = 0; i < OBJ_NR; i++) { oids[i] = daos_test_oid_gen(arg->coh, DAOS_OC_R3S_SPEC_RANK, 0, @@ -517,7 +517,7 @@ rebuild_send_objects_fail(void **state) daos_obj_id_t oids[OBJ_NR]; int i; - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); for (i = 0; i < OBJ_NR; i++) { oids[i] = daos_test_oid_gen(arg->coh, DAOS_OC_R3S_SPEC_RANK, 0, @@ -586,7 +586,7 @@ rebuild_tgt_pool_disconnect_internal(void **state, unsigned int fail_loc) daos_obj_id_t oids[OBJ_NR]; int i; - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); for (i = 0; i < OBJ_NR; i++) { oids[i] = daos_test_oid_gen(arg->coh, DAOS_OC_R3S_SPEC_RANK, 0, @@ -655,7 +655,7 @@ rebuild_offline_pool_connect_internal(void **state, unsigned int fail_loc) daos_obj_id_t oids[OBJ_NR]; int i; - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); for (i = 0; i < OBJ_NR; i++) { oids[i] = daos_test_oid_gen(arg->coh, DAOS_OC_R3S_SPEC_RANK, 0, @@ -706,7 +706,7 @@ rebuild_offline(void **state) daos_obj_id_t oids[OBJ_NR]; int i; - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); for (i = 0; i < OBJ_NR; i++) { oids[i] = daos_test_oid_gen(arg->coh, DAOS_OC_R3S_SPEC_RANK, 0, @@ -736,7 +736,7 @@ rebuild_offline_empty(void **state) test_arg_t *new_arg = NULL; int rc; - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); rc = rebuild_pool_create(&new_arg, arg, SETUP_POOL_CREATE, NULL); if (rc) @@ -777,7 +777,7 @@ rebuild_master_change_during_scan(void **state) daos_obj_id_t oids[OBJ_NR]; int i; - if (!test_runable(arg, 6) || arg->pool.alive_svc->rl_nr == 1) + if (!test_runnable(arg, 6) || arg->pool.alive_svc->rl_nr == 1) skip(); for (i = 0; i < OBJ_NR; i++) { @@ -808,7 +808,7 @@ rebuild_master_change_during_rebuild(void **state) daos_obj_id_t oids[OBJ_NR]; int i; - if (!test_runable(arg, 6) || arg->pool.alive_svc->rl_nr == 1) + if (!test_runnable(arg, 6) || arg->pool.alive_svc->rl_nr == 1) skip(); for (i = 0; i < OBJ_NR; i++) { @@ -858,7 +858,7 @@ rebuild_nospace(void **state) daos_obj_id_t oids[OBJ_NR]; int i; - if (!test_runable(arg, 6) || true) /* skip for now */ + if (!test_runnable(arg, 6) || true) /* skip for now */ skip(); for (i = 0; i < OBJ_NR; i++) { @@ -896,7 +896,7 @@ rebuild_multiple_tgts(void **state) int rc; int i; - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); oid = daos_test_oid_gen(arg->coh, DAOS_OC_R3S_SPEC_RANK, 0, 0, arg->myrank); @@ -1045,7 +1045,7 @@ rebuild_master_failure(void **state) int rc; /* need 5 svc replicas, as will kill the leader 2 times */ - if (!test_runable(arg, 6) || arg->pool.alive_svc->rl_nr < 5) { + if (!test_runnable(arg, 6) || arg->pool.alive_svc->rl_nr < 5) { print_message("testing skipped ...\n"); skip(); } @@ -1154,7 +1154,7 @@ rebuild_map_refresh_hint(void **state) bool refreshed; int i; - if (!test_runable(arg, 4)) + if (!test_runnable(arg, 4)) return; for (i = 0; i < OBJ_NR; i++) { @@ -1198,7 +1198,7 @@ rebuild_multiple_failures(void **state) daos_obj_id_t cb_arg_oids[OBJ_NR]; int i; - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); for (i = 0; i < OBJ_NR; i++) { oids[i] = daos_test_oid_gen(arg->coh, DAOS_OC_R3S_SPEC_RANK, 0, @@ -1236,7 +1236,7 @@ rebuild_fail_all_replicas_before_rebuild(void **state) struct daos_obj_shard *shard; int rc; - if (!test_runable(arg, 6) || arg->pool.alive_svc->rl_nr < 5) + if (!test_runnable(arg, 6) || arg->pool.alive_svc->rl_nr < 5) skip(); oid = daos_test_oid_gen(arg->coh, DAOS_OC_R2S_SPEC_RANK, 0, 0, @@ -1297,7 +1297,7 @@ rebuild_fail_all_replicas(void **state) * in svcs, so make sure there are at least 7 ranks in svc, so * the new leader can be chosen. */ - if (!test_runable(arg, 7) || arg->pool.alive_svc->rl_nr < 7) { + if (!test_runnable(arg, 7) || arg->pool.alive_svc->rl_nr < 7) { print_message("need at least 7 svcs, -s7\n"); skip(); } @@ -1347,7 +1347,7 @@ multi_pools_rebuild_concurrently(void **state) int i; int rc; - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); memset(args, 0, sizeof(args[0]) * POOL_NUM * CONT_PER_POOL); for (i = 0; i < POOL_NUM * CONT_PER_POOL; i++) { @@ -1410,7 +1410,7 @@ rebuild_kill_rank_during_rebuild(void **state) daos_obj_id_t oids[OBJ_NR]; int i; - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); for (i = 0; i < OBJ_NR; i++) { oids[i] = daos_test_oid_gen(arg->coh, DAOS_OC_R3S_SPEC_RANK, 0, @@ -1450,7 +1450,7 @@ rebuild_kill_PS_leader_during_rebuild(void **state) if (arg->myrank != 0) return; - if (!test_runable(arg, 7) || arg->pool.alive_svc->rl_nr < 5) { + if (!test_runnable(arg, 7) || arg->pool.alive_svc->rl_nr < 5) { print_message("need at least 5 svcs, -s5\n"); skip(); } @@ -1516,7 +1516,7 @@ reintegrate_failure_and_retry(void **state) FAULT_INJECTION_REQUIRED(); - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); for (i = 0; i < 20; i++) oids[i] = daos_test_oid_gen(arg->coh, OC_RP_3GX, 0, @@ -1549,7 +1549,7 @@ rebuild_kill_more_RF_ranks(void **state) d_rank_t ranks[3] = {7, 6, 5}; int i; - if (!test_runable(arg, 7) || arg->pool.alive_svc->rl_nr < 7) { + if (!test_runnable(arg, 7) || arg->pool.alive_svc->rl_nr < 7) { print_message("need at least 7 svcs, -s7\n"); skip(); } @@ -1606,7 +1606,7 @@ rebuild_delay_and_reintegrate(void **state) int rc; int i; - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); rc = daos_pool_set_prop(arg->pool.pool_uuid, "self_heal", "exclude\\;delay_rebuild"); assert_rc_equal(rc, 0); @@ -1639,7 +1639,7 @@ rebuild_delay_and_extend(void **state) int rc; int i; - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); rc = daos_pool_set_prop(arg->pool.pool_uuid, "self_heal", "exclude\\;delay_rebuild"); assert_rc_equal(rc, 0); @@ -1676,7 +1676,7 @@ rebuild_cont_destroy_and_reintegrate(void **state) int rc; int i; - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); for (i = 0; i < OBJ_NR; i++) { oids[i] = daos_test_oid_gen(arg->coh, DAOS_OC_R3S_SPEC_RANK, 0, 0, arg->myrank); @@ -1705,7 +1705,7 @@ rebuild_incr_reint_basic(void **state) int rc; int i; - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); rc = daos_pool_set_prop(arg->pool.pool_uuid, "reintegration", "incremental"); assert_rc_equal(rc, 0); @@ -1740,7 +1740,7 @@ rebuild_long_scan_hang(void **state) d_rank_t excl_rank = 0; int rc; - if (!test_runable(arg, 7) || arg->pool.alive_svc->rl_nr < 5) { + if (!test_runnable(arg, 7) || arg->pool.alive_svc->rl_nr < 5) { print_message("need at least 5 svcs, -s5\n"); skip(); } diff --git a/src/tests/suite/daos_rebuild_ec.c b/src/tests/suite/daos_rebuild_ec.c index 46dc36a2263..8cfeee4c879 100644 --- a/src/tests/suite/daos_rebuild_ec.c +++ b/src/tests/suite/daos_rebuild_ec.c @@ -36,9 +36,9 @@ rebuild_ec_internal(void **state, daos_oclass_id_t oclass, int kill_data_nr, int rc; if (oclass == OC_EC_2P1G1) - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); if (oclass == OC_EC_4P2G1) - test_runable_or_skip(arg, 8); + test_runnable_or_skip(arg, 8); if (svc_nreplicas < 5) skip(); @@ -117,7 +117,7 @@ rebuild_mixed_stripes(void **state) print_message("BEGIN %s\n", __FUNCTION__); - test_runable_or_skip(arg, 7); + test_runnable_or_skip(arg, 7); oid = daos_test_oid_gen(arg->coh, OC_EC_4P2G1, 0, 0, arg->myrank); ioreq_init(&req, arg->coh, oid, DAOS_IOD_ARRAY, arg); @@ -179,7 +179,7 @@ rebuild_ec_multi_stripes(void **state) print_message("BEGIN %s\n", __FUNCTION__); - test_runable_or_skip(arg, 7); + test_runnable_or_skip(arg, 7); oid = daos_test_oid_gen(arg->coh, OC_EC_4P2G1, 0, 0, arg->myrank); ioreq_init(&req, arg->coh, oid, DAOS_IOD_ARRAY, arg); @@ -815,7 +815,7 @@ rebuild_multiple_group_ec_object(void **state) print_message("BEGIN %s\n", __FUNCTION__); - test_runable_or_skip(arg, 8); + test_runnable_or_skip(arg, 8); oid = daos_test_oid_gen(arg->coh, OC_EC_4P1G8, 0, 0, arg->myrank); ioreq_init(&req, arg->coh, oid, DAOS_IOD_ARRAY, arg); @@ -925,7 +925,7 @@ rebuild_ec_dkey_enumeration(void **state) print_message("BEGIN %s\n", __FUNCTION__); - test_runable_or_skip(arg, 8); + test_runnable_or_skip(arg, 8); oid = daos_test_oid_gen(arg->coh, OC_EC_4P1G1, 0, 0, arg->myrank); ioreq_init(&req, arg->coh, oid, DAOS_IOD_ARRAY, arg); @@ -957,7 +957,7 @@ rebuild_ec_parity_multi_group(void **state) print_message("BEGIN %s\n", __FUNCTION__); - test_runable_or_skip(arg, 8); + test_runnable_or_skip(arg, 8); oid = daos_test_oid_gen(arg->coh, OC_EC_4P1G8, 0, 0, arg->myrank); ioreq_init(&req, arg->coh, oid, DAOS_IOD_ARRAY, arg); @@ -993,7 +993,7 @@ rebuild_ec_snapshot(void **state, daos_oclass_id_t oclass, int shard) int rc; int i; - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); daos_pool_set_prop(arg->pool.pool_uuid, "reclaim", "time"); oid = daos_test_oid_gen(arg->coh, oclass, 0, 0, arg->myrank); @@ -1068,7 +1068,7 @@ rebuild_ec_parity_overwrite(void **state) print_message("BEGIN %s\n", __FUNCTION__); - test_runable_or_skip(arg, 8); + test_runnable_or_skip(arg, 8); oid = daos_test_oid_gen(arg->coh, OC_EC_2P2G1, 0, 0, arg->myrank); ioreq_init(&req, arg->coh, oid, DAOS_IOD_ARRAY, arg); @@ -1113,7 +1113,7 @@ rebuild_ec_then_aggregation(void **state) print_message("BEGIN %s\n", __FUNCTION__); - test_runable_or_skip(arg, 8); + test_runnable_or_skip(arg, 8); daos_pool_set_prop(arg->pool.pool_uuid, "reclaim", "disabled"); data = (char *)malloc(CELL_SIZE); @@ -1171,7 +1171,7 @@ rebuild_ec_multiple_shards(void **state) print_message("BEGIN %s\n", __FUNCTION__); - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); data = (char *)malloc(stripe_size); verify_data = (char *)malloc(stripe_size); @@ -1255,7 +1255,7 @@ rebuild_ec_multiple_failure_tgts(void **state) print_message("BEGIN %s\n", __FUNCTION__); - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); oid = daos_test_oid_gen(arg->coh, OC_EC_4P2GX, 0, 0, arg->myrank); ioreq_init(&req, arg->coh, oid, DAOS_IOD_ARRAY, arg); @@ -1326,7 +1326,7 @@ rebuild_ec_parity_overwrite_fail_parity_internal(void **state, int *kill_shards, int stripe_size = 4 * CELL_SIZE; int i; - test_runable_or_skip(arg, 8); + test_runnable_or_skip(arg, 8); if (svc_nreplicas < 5) skip(); @@ -1421,7 +1421,7 @@ rebuild_ec_combined_ops(void **state) int rc; print_message("BEGIN %s\n", __FUNCTION__); - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); rc = daos_pool_set_prop(arg->pool.pool_uuid, "self_heal", "exclude\\;delay_rebuild"); assert_int_equal(rc, 0); @@ -2248,7 +2248,7 @@ rebuild_ec_parity_below_newer(void **state) char stage[64]; print_message("BEGIN %s\n", __FUNCTION__); - if (!test_runable(arg, 8)) + if (!test_runnable(arg, 8)) return; if (svc_nreplicas < 5) return; @@ -2368,7 +2368,7 @@ rebuild_ec_reint_parity_epoch_inflation(void **state) char stage[64]; print_message("BEGIN %s\n", __FUNCTION__); - test_runable_or_skip(arg, 8); + test_runnable_or_skip(arg, 8); if (svc_nreplicas < 5) skip(); diff --git a/src/tests/suite/daos_rebuild_interactive.c b/src/tests/suite/daos_rebuild_interactive.c index 81aab738af0..e46f82941d9 100644 --- a/src/tests/suite/daos_rebuild_interactive.c +++ b/src/tests/suite/daos_rebuild_interactive.c @@ -72,7 +72,7 @@ int_rebuild_snap_update_recs(void **state) int i; int rc; - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); T_BEGIN(); oid = daos_test_oid_gen(arg->coh, arg->obj_class, 0, 0, arg->myrank); @@ -137,7 +137,7 @@ int_rebuild_snap_punch_recs(void **state) int i; int rc; - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); T_BEGIN(); oid = daos_test_oid_gen(arg->coh, arg->obj_class, 0, 0, arg->myrank); @@ -224,7 +224,7 @@ int_rebuild_many_objects_with_failure(void **state) FAULT_INJECTION_REQUIRED(); - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); T_BEGIN(); D_ALLOC_ARRAY(oids, NUM_OBJS); @@ -295,7 +295,7 @@ int_cont_open_in_drain(void **state) FAULT_INJECTION_REQUIRED(); - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); T_BEGIN(); oid = daos_test_oid_gen(arg->coh, DAOS_OC_R1S_SPEC_RANK, 0, 0, arg->myrank); @@ -348,7 +348,7 @@ int_drain_fail_and_retry_objects(void **state) FAULT_INJECTION_REQUIRED(); - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); T_BEGIN(); for (i = 0; i < OBJ_NR; i++) { @@ -652,7 +652,7 @@ int_rebuild_dkeys_stop_failing(void **state) FAULT_INJECTION_REQUIRED(); - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); T_BEGIN(); @@ -783,7 +783,7 @@ int_rebuild_stranded_lower_fseq_target(void **state) * We KILL two engines, so the pool service must have enough replicas to keep quorum * (same constraint the rebuild_kill_multiple test uses). */ - if (!test_runable(arg, 6) || arg->pool.alive_svc->rl_nr < 5) + if (!test_runnable(arg, 6) || arg->pool.alive_svc->rl_nr < 5) skip(); T_BEGIN(); diff --git a/src/tests/suite/daos_rebuild_simple.c b/src/tests/suite/daos_rebuild_simple.c index 7b3dc21b519..62c96cfaa46 100644 --- a/src/tests/suite/daos_rebuild_simple.c +++ b/src/tests/suite/daos_rebuild_simple.c @@ -77,7 +77,7 @@ rebuild_dkeys(void **state) int i; int rc; - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); T_BEGIN(); oid = daos_test_oid_gen(arg->coh, arg->obj_class, 0, 0, arg->myrank); @@ -132,7 +132,7 @@ rebuild_akeys(void **state) int i; int rc; - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); T_BEGIN(); oid = daos_test_oid_gen(arg->coh, arg->obj_class, 0, 0, arg->myrank); @@ -187,7 +187,7 @@ rebuild_indexes(void **state) int j; int rc; - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); T_BEGIN(); oid = daos_test_oid_gen(arg->coh, arg->obj_class, 0, 0, arg->myrank); @@ -236,7 +236,7 @@ rebuild_snap_update_recs(void **state) int i; int rc; - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); T_BEGIN(); oid = daos_test_oid_gen(arg->coh, arg->obj_class, 0, 0, arg->myrank); @@ -300,7 +300,7 @@ rebuild_snap_punch_recs(void **state) int i; int rc; - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); T_BEGIN(); oid = daos_test_oid_gen(arg->coh, arg->obj_class, 0, 0, arg->myrank); @@ -358,7 +358,7 @@ rebuild_snap_update_keys(void **state) int i; int rc; - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); T_BEGIN(); oid = daos_test_oid_gen(arg->coh, arg->obj_class, 0, 0, arg->myrank); @@ -442,7 +442,7 @@ rebuild_snap_punch_keys(void **state) int i; int rc; - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); T_BEGIN(); oid = daos_test_oid_gen(arg->coh, arg->obj_class, 0, 0, arg->myrank); @@ -545,7 +545,7 @@ rebuild_snap_punch_empty(void **state) int i; int rc; - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); T_BEGIN(); oid = daos_test_oid_gen(arg->coh, DAOS_OC_R3S_SPEC_RANK, 0, 0, @@ -621,7 +621,7 @@ rebuild_multiple(void **state) int k; int rc; - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); T_BEGIN(); oid = daos_test_oid_gen(arg->coh, arg->obj_class, 0, 0, arg->myrank); @@ -668,7 +668,7 @@ rebuild_large_rec(void **state) char buffer[LARGE_BUFFER_SIZE]; int rc; - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); T_BEGIN(); oid = daos_test_oid_gen(arg->coh, arg->obj_class, 0, 0, arg->myrank); @@ -721,7 +721,7 @@ rebuild_objects(void **state) int i; int rc; - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); T_BEGIN(); for (i = 0; i < OBJ_NR; i++) { @@ -766,7 +766,7 @@ rebuild_sx_object_internal(void **state, daos_oclass_id_t oclass, int rc = 0; char buffer[32]; - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); oid = daos_test_oid_gen(arg->coh, oclass, 0, 0, arg->myrank); ioreq_init(&req, arg->coh, oid, DAOS_IOD_ARRAY, arg); @@ -884,7 +884,7 @@ rebuild_large_object(void **state) int j; int rc = 0; - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); T_BEGIN(); for (i = 0; i < 5; i++) { @@ -987,7 +987,7 @@ rebuild_large_snap(void **state) daos_epoch_t snap_epoch[100]; int i; - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); T_BEGIN(); oid = daos_test_oid_gen(arg->coh, arg->obj_class, 0, 0, arg->myrank); @@ -1022,7 +1022,7 @@ rebuild_full_shards(void **state) struct ioreq req; int i; - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); T_BEGIN(); /* require 4 nodes and 8 targets per node */ @@ -1067,7 +1067,7 @@ rebuild_punch_recs(void **state) int i; int rc; - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); T_BEGIN(); oid = daos_test_oid_gen(arg->coh, arg->obj_class, 0, 0, arg->myrank); @@ -1107,7 +1107,7 @@ rebuild_multiple_group(void **state) int i; int rc; - test_runable_or_skip(arg, 7); + test_runnable_or_skip(arg, 7); T_BEGIN(); oid = daos_test_oid_gen(arg->coh, OC_RP_2G4, 0, 0, arg->myrank); @@ -1168,7 +1168,7 @@ rebuild_with_large_offset(void **state) int i; int rc; - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); T_BEGIN(); oid = daos_test_oid_gen(arg->coh, arg->obj_class, 0, 0, arg->myrank); @@ -1216,7 +1216,7 @@ rebuild_with_large_key(void **state) int i; int rc; - test_runable_or_skip(arg, 4); + test_runnable_or_skip(arg, 4); T_BEGIN(); oid = daos_test_oid_gen(arg->coh, arg->obj_class, 0, 0, arg->myrank); @@ -1265,7 +1265,7 @@ rebuild_with_dfs_open_create_punch(void **state) daos_size_t chunk_size = 1048576; int rc; - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); T_BEGIN(); dfs_attr_t attr = {}; @@ -1355,7 +1355,7 @@ rebuild_many_objects_with_failure(void **state) FAULT_INJECTION_REQUIRED(); - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); T_BEGIN(); D_ALLOC_ARRAY(oids, 8000); @@ -1447,7 +1447,7 @@ rebuild_object_with_csum_error(void **state) FAULT_INJECTION_REQUIRED(); - test_runable_or_skip(arg, 3); + test_runnable_or_skip(arg, 3); T_BEGIN(); @@ -1732,7 +1732,7 @@ rebuild_with_dfs_inflight_append(void **state) FAULT_INJECTION_REQUIRED(); - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); T_BEGIN(); daos_pool_set_prop(arg->pool.pool_uuid, "reclaim", "disabled"); @@ -1794,7 +1794,7 @@ rebuild_with_dfs_inflight_punch(void **state) FAULT_INJECTION_REQUIRED(); - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); T_BEGIN(); daos_pool_set_prop(arg->pool.pool_uuid, "reclaim", "disabled"); @@ -1879,7 +1879,7 @@ rebuild_with_dfs_inflight_append_punch(void **state) FAULT_INJECTION_REQUIRED(); - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); T_BEGIN(); daos_pool_set_prop(arg->pool.pool_uuid, "reclaim", "disabled"); @@ -1957,7 +1957,7 @@ rebuild_with_dfs_inflight_punch_create(void **state) struct stat st; int rc; - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); T_BEGIN(); daos_pool_set_prop(arg->pool.pool_uuid, "reclaim", "disabled"); diff --git a/src/tests/suite/daos_rebuild_weekly.c b/src/tests/suite/daos_rebuild_weekly.c index 4f07b6fbdfc..a2f77a24897 100644 --- a/src/tests/suite/daos_rebuild_weekly.c +++ b/src/tests/suite/daos_rebuild_weekly.c @@ -136,7 +136,7 @@ rebuild_ec_agg_on_excluded_tgt(void **state) int s, c, rc, bad = 0; print_message("BEGIN %s\n", __FUNCTION__); - if (!test_runable(arg, 8)) + if (!test_runnable(arg, 8)) return; oid = daos_test_oid_gen(arg->coh, OC_EC_2P2G1, 0, 0, arg->myrank); diff --git a/src/tests/suite/daos_test.h b/src/tests/suite/daos_test.h index 79ba92ea144..855698cff1c 100644 --- a/src/tests/suite/daos_test.h +++ b/src/tests/suite/daos_test.h @@ -419,10 +419,11 @@ typedef int (*test_teardown_cb_t)(void **state); * Collective across PAR_COMM_WORLD. Use the boolean check for optional subcases; * the macro skips the whole cmocka test at its call site when prerequisites are not met. */ -bool test_runable(test_arg_t *arg, unsigned int required_nodes); -#define test_runable_or_skip(arg, required_nodes) \ +bool +test_runnable(test_arg_t *arg, unsigned int required_nodes); +#define test_runnable_or_skip(arg, required_nodes) \ do { \ - if (!test_runable((arg), (required_nodes))) \ + if (!test_runnable((arg), (required_nodes))) \ skip(); \ } while (0) diff --git a/src/tests/suite/daos_test_common.c b/src/tests/suite/daos_test_common.c index 414a89b7994..a96fc460983 100644 --- a/src/tests/suite/daos_test_common.c +++ b/src/tests/suite/daos_test_common.c @@ -706,7 +706,7 @@ int test_make_dirs(char *dir, mode_t mode) d_rank_t ranks_to_kill[MAX_KILLS]; bool -test_runable(test_arg_t *arg, unsigned int required_nodes) +test_runnable(test_arg_t *arg, unsigned int required_nodes) { int i; int runable = 1; diff --git a/src/tests/suite/daos_upgrade.c b/src/tests/suite/daos_upgrade.c index 82f325806ce..2f3ec6783d9 100644 --- a/src/tests/suite/daos_upgrade.c +++ b/src/tests/suite/daos_upgrade.c @@ -32,7 +32,7 @@ upgrade_ec_parity_rotate(void **state) int i; int rc; - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); if (arg->myrank == 0) { rc = daos_debug_set_params(arg->group, -1, DMG_KEY_FAIL_LOC, @@ -99,7 +99,7 @@ upgrade_ec_parity_rotate_single_dkey(void **state) char buf[10]; int rc; - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); if (arg->myrank == 0) { rc = daos_debug_set_params(arg->group, -1, DMG_KEY_FAIL_LOC, diff --git a/src/tests/suite/daos_verify_consistency.c b/src/tests/suite/daos_verify_consistency.c index 16defa54708..1c9178a6a91 100644 --- a/src/tests/suite/daos_verify_consistency.c +++ b/src/tests/suite/daos_verify_consistency.c @@ -139,7 +139,7 @@ vc_without_inconsistency(void **state, daos_iod_type_t iod_type) struct ioreq req; int rc; - test_runable_or_skip(arg, dts_vc_replica_cnt); + test_runnable_or_skip(arg, dts_vc_replica_cnt); oid = daos_test_oid_gen(arg->coh, dts_vc_class, 0, 0, arg->myrank); ioreq_init(&req, arg->coh, oid, iod_type, arg); @@ -176,7 +176,7 @@ vc_3(void **state) print_message("misc single and array value without inconsistency\n"); - test_runable_or_skip(arg, dts_vc_replica_cnt); + test_runnable_or_skip(arg, dts_vc_replica_cnt); oid = daos_test_oid_gen(arg->coh, dts_vc_class, 0, 0, arg->myrank); @@ -205,7 +205,7 @@ vc_4(void **state) print_message("verify with different rec\n"); - test_runable_or_skip(arg, dts_vc_replica_cnt); + test_runnable_or_skip(arg, dts_vc_replica_cnt); oid = daos_test_oid_gen(arg->coh, dts_vc_class, 0, 0, arg->myrank); ioreq_init(&req, arg->coh, oid, DAOS_IOD_SINGLE, arg); @@ -233,7 +233,7 @@ vc_test_lost_data(void **state, int type) struct ioreq req; int rc; - test_runable_or_skip(arg, dts_vc_replica_cnt); + test_runnable_or_skip(arg, dts_vc_replica_cnt); oid = daos_test_oid_gen(arg->coh, dts_vc_class, 0, 0, arg->myrank); ioreq_init(&req, arg->coh, oid, DAOS_IOD_ARRAY, arg); @@ -304,7 +304,7 @@ vc_8(void **state) print_message("verify with lost replica\n"); - test_runable_or_skip(arg, dts_vc_replica_cnt); + test_runnable_or_skip(arg, dts_vc_replica_cnt); oid = daos_test_oid_gen(arg->coh, dts_vc_class, 0, 0, arg->myrank); ioreq_init(&req, arg->coh, oid, DAOS_IOD_ARRAY, arg); @@ -342,7 +342,7 @@ vc_9(void **state) print_message("verify with different dkey\n"); - test_runable_or_skip(arg, dts_vc_replica_cnt); + test_runnable_or_skip(arg, dts_vc_replica_cnt); oid = daos_test_oid_gen(arg->coh, dts_vc_class, 0, 0, arg->myrank); ioreq_init(&req, arg->coh, oid, DAOS_IOD_ARRAY, arg); @@ -365,7 +365,7 @@ vc_10(void **state) print_message("OBJ_SYNC RPC retry\n"); - test_runable_or_skip(arg, dts_vc_replica_cnt); + test_runnable_or_skip(arg, dts_vc_replica_cnt); oid = daos_test_oid_gen(arg->coh, dts_vc_class, 0, 0, arg->myrank); arg->fail_loc = DAOS_OBJ_SYNC_RETRY | DAOS_FAIL_SOME; diff --git a/src/tests/suite/dfs_par_test.c b/src/tests/suite/dfs_par_test.c index 6bd60d1914d..c3571702837 100644 --- a/src/tests/suite/dfs_par_test.c +++ b/src/tests/suite/dfs_par_test.c @@ -226,12 +226,12 @@ dfs_test_cond(void **state) print_message("Testing with RF 0 ...\n"); test_cond_helper(arg, DAOS_PROP_CO_REDUN_RF0); - if (test_runable(arg, 2)) { + if (test_runnable(arg, 2)) { if (arg->myrank == 0) print_message("Testing with RF 1 ...\n"); test_cond_helper(arg, DAOS_PROP_CO_REDUN_RF1); } - if (test_runable(arg, 3)) { + if (test_runnable(arg, 3)) { if (arg->myrank == 0) print_message("Testing with RF 2 ...\n"); test_cond_helper(arg, DAOS_PROP_CO_REDUN_RF2); @@ -394,7 +394,7 @@ dfs_test_ec_short_read(void **state) { test_arg_t *arg = *state; - test_runable_or_skip(arg, 6); + test_runnable_or_skip(arg, 6); /* less than 1 EC stripe */ dfs_test_short_read_internal(state, OC_EC_4P2G1, @@ -923,12 +923,12 @@ dfs_test_create_atomicity(void **state) } atomicity_test_helper(arg, DAOS_PROP_CO_REDUN_RF0); - if (test_runable(arg, 2)) { + if (test_runnable(arg, 2)) { if (arg->myrank == 0) print_message("Testing with RF 1 ...\n"); atomicity_test_helper(arg, DAOS_PROP_CO_REDUN_RF1); } - if (test_runable(arg, 3)) { + if (test_runnable(arg, 3)) { if (arg->myrank == 0) print_message("Testing with RF 2 ...\n"); atomicity_test_helper(arg, DAOS_PROP_CO_REDUN_RF2); diff --git a/src/tests/suite/dfs_unit_test.c b/src/tests/suite/dfs_unit_test.c index f396551352f..b22cdc03a71 100644 --- a/src/tests/suite/dfs_unit_test.c +++ b/src/tests/suite/dfs_unit_test.c @@ -2360,7 +2360,7 @@ dfs_test_readdir(void **state) print_message("Running readdir test with OC_SX dir..\n"); dfs_test_readdir_internal(state, OC_SX); - if (test_runable(arg, 3)) { + if (test_runnable(arg, 3)) { print_message("Running readdir test with OC_RP_3GX dir..\n"); dfs_test_readdir_internal(state, OC_RP_3GX); } From f875c39f7b60eacf3a8181a198a86da53f390003 Mon Sep 17 00:00:00 2001 From: Kenneth Cain Date: Fri, 20 Nov 2026 18:56:13 -0500 Subject: [PATCH 3/4] DAOS-19789 test: retire obsolete I/O subtests Remove IO17, IO18, and IO33 while preserving historical subtest index selectors. To not cause confusion in (historical vs new) test naming and pass/fail/skip history, these subtest indexes will not be reused. i.e., new tests shall be added at the end, with new indexes. Print warnings when a retired test is selected via --subtests. Skip-nlt: true Skip-fault-injection-test: true Test-tag: pr test_rebuild_31 test_rebuild_32 test_rebuild_33 test_rebuild_34 test_rebuild_35 test_rebuild_36 test_rebuild_37 Signed-off-by: Kenneth Cain --- src/tests/suite/daos_obj.c | 745 ++++++++----------------------------- 1 file changed, 150 insertions(+), 595 deletions(-) diff --git a/src/tests/suite/daos_obj.c b/src/tests/suite/daos_obj.c index aa7fd52ed6d..13be80e4f63 100644 --- a/src/tests/suite/daos_obj.c +++ b/src/tests/suite/daos_obj.c @@ -2615,378 +2615,6 @@ close_reopen_coh_oh(test_arg_t *arg, struct ioreq *req, daos_obj_id_t oid) assert_rc_equal(rc, 0); } -/** - * Basic test to insert a few large and small records in different transactions, - * discard one of the transactions and commit the rest, then verify records both - * prior to and after the discarded transaction. - */ -static void -tx_discard(void **state) -{ - /* - * FIXME: This obsolete epoch model transaction API test have been - * broken by online aggregation, needs be removed or updated as per - * new transaction model. - */ - print_message("Skip obsolete test\n"); - skip(); -#if 0 - test_arg_t *arg = *state; - daos_obj_id_t oid; - struct ioreq req; - const int nakeys = 4; - const size_t nakeys_strlen = 4 /* "9999" */; - const char dkey[] = "tx_discard dkey"; - const char *akey_fmt = "tx_discard akey%d"; - char *akey[nakeys]; - char *rec[nakeys]; - daos_size_t rec_size[nakeys]; - int rx_nr[nakeys]; - daos_off_t offset[nakeys]; - char *rec_nvme; - char *rec_scm; - char *val[nakeys]; - daos_size_t val_size[nakeys]; - char *rec_verify; - daos_handle_t th[3]; - int i, t; - int rc; - - par_barrier(PAR_COMM_WORLD); - - D_ALLOC(rec_nvme, IO_SIZE_NVME); - assert_non_null(rec_nvme); - dts_buf_render(rec_nvme, IO_SIZE_NVME); - D_ALLOC(rec_scm, IO_SIZE_SCM); - assert_non_null(rec_scm); - dts_buf_render(rec_scm, IO_SIZE_SCM); - - oid = daos_test_oid_gen(arg->coh, dts_obj_class, 0, 0, arg->myrank); - ioreq_init(&req, arg->coh, oid, DAOS_IOD_SINGLE, arg); - - /** Prepare buffers for a fixed set of d-keys and a-keys. */ - for (i = 0; i < nakeys; i++) { - D_ALLOC(akey[i], strlen(akey_fmt) + nakeys_strlen + 1); - assert_non_null(akey[i]); - sprintf(akey[i], akey_fmt, i); - rec[i] = calloc(i % 2 == 0 ? IO_SIZE_NVME : IO_SIZE_SCM, 1); - assert_non_null(rec[i]); - offset[i] = i * 20; - val[i] = calloc(i % 2 == 0 ? IO_SIZE_NVME : IO_SIZE_SCM, 1); - assert_non_null(val[i]); - if (i % 2 == 0) - val_size[i] = IO_SIZE_NVME; - else - val_size[i] = IO_SIZE_SCM; - } - - /** Write three timestamps to same set of d-key and a-keys. */ - for (t = 0; t < 3; t++) { - rc = daos_tx_open(arg->coh, &th[t], NULL); - assert_success(rc); - - print_message("writing to transaction %d\n", t); - for (i = 0; i < nakeys; i++) { - if (i % 2 == 0) { - memcpy(rec[i], rec_nvme, IO_SIZE_NVME); - rec_size[i] = IO_SIZE_NVME; - } else { - memcpy(rec[i], rec_scm, IO_SIZE_SCM); - rec_size[i] = IO_SIZE_SCM; - } - rec[i][0] = i + '0'; /* akey */ - rec[i][1] = t + '0'; /* tx handle */ - rx_nr[i] = 1; - print_message("\takey[%d], val(%d):'%c%c'\n", i, - (int)rec_size[i], rec[i][0], rec[i][1]); - } - insert(dkey, nakeys, (const char **)akey, rec_size, rx_nr, - offset, (void **)rec, th[t], &req); - par_barrier(PAR_COMM_WORLD); - } - - for (t = 0; t < 3; t++) { - /** Discard second timestamp. */ - if (t == 1) { - print_message("aborting transaction %d.\n", t); - rc = daos_tx_abort(th[t], NULL); - assert_success(rc); - } else { - print_message("committing transaction %d.\n", t); - rc = daos_tx_commit(th[t], NULL); - assert_success(rc); - } - par_barrier(PAR_COMM_WORLD); - } - - /** Check the three transactions. */ - for (t = 0; t < 3; t++) { - print_message("verifying transaction %d\n", t); - lookup(dkey, nakeys, (const char **)akey, offset, rec_size, - (void **)val, val_size, th[t], &req, false); - for (i = 0; i < nakeys; i++) { - rec_verify = calloc(i % 2 == 0 ? IO_SIZE_NVME : - IO_SIZE_SCM, 1); - assert_non_null(rec_verify); - if (i % 2 == 0) - memcpy(rec_verify, rec_nvme, IO_SIZE_NVME); - else - memcpy(rec_verify, rec_scm, IO_SIZE_SCM); - - if (t == 1) { /* discarded */ - rec_verify[0] = i + '0'; /*akey*/ - rec_verify[1] = t - 1 + '0'; /*previous tx*/ - } else { /* intact */ - rec_verify[0] = i + '0'; - rec_verify[1] = t + '0'; - } - assert_int_equal(req.iod[i].iod_size, - strlen(rec_verify) + 1); - print_message("\takey[%d], val(%d):'%c%c'\n", - i, (int)req.iod[i].iod_size, val[i][0], - val[i][1]); - assert_memory_equal(val[i], rec_verify, - req.iod[i].iod_size); - D_FREE(rec_verify); - } - rc = daos_tx_close(th[t], NULL); - assert_success(rc); - } - - /** Close and reopen the container and the obj. */ - par_barrier(PAR_COMM_WORLD); - close_reopen_coh_oh(arg, &req, oid); - - /** Verify record is the same as the last committed transaction. */ - lookup(dkey, nakeys, (const char **)akey, offset, rec_size, - (void **)val, val_size, DAOS_TX_NONE, &req, false); - print_message("verifying transaction after container re-open\n"); - for (i = 0; i < nakeys; i++) { - rec_verify = calloc(i % 2 == 0 ? IO_SIZE_NVME : - IO_SIZE_SCM, 1); - assert_non_null(rec_verify); - if (i % 2 == 0) - memcpy(rec_verify, rec_nvme, IO_SIZE_NVME); - else - memcpy(rec_verify, rec_scm, IO_SIZE_SCM); - - rec_verify[0] = i + '0'; - rec_verify[1] = 2 + '0'; - assert_int_equal(req.iod[i].iod_size, - strlen(rec_verify) + 1); - print_message("\takey[%d], val(%d):'%c%c'\n", i, - (int)req.iod[i].iod_size, val[i][0], val[i][1]); - assert_memory_equal(val[i], rec_verify, - req.iod[i].iod_size); - D_FREE(rec_verify); - } - - for (i = 0; i < nakeys; i++) { - D_FREE(val[i]); - D_FREE(akey[i]); - D_FREE(rec[i]); - } - D_FREE(rec_nvme); - D_FREE(rec_scm); - - ioreq_fini(&req); - par_barrier(PAR_COMM_WORLD); -#endif -} - -/** - * Basic test to insert a few large and small records at different transactions, - * commit only the first few TXs, and verify that all TXs remain after - * container close and non-committed TXs were successfully discarded. - */ -static void -tx_commit(void **state) -{ - /* - * FIXME: This obsolete epoch model transaction API test have been - * broken by online aggregation, needs be removed or updated as per - * new transaction model. - */ - print_message("Skip obsolete test\n"); - skip(); -#if 0 - test_arg_t *arg = *state; - daos_obj_id_t oid; - struct ioreq req; - const int nakeys = 4; - const size_t nakeys_strlen = 4 /* "9999" */; - char dkey[] = "tx_commit dkey"; - const char *akey_fmt = "tx_commit akey%d"; - char *akey[nakeys]; - char *rec[nakeys]; - daos_size_t rec_size[nakeys]; - int rx_nr[nakeys]; - daos_off_t offset[nakeys]; - char *rec_nvme; - char *rec_scm; - char *val[nakeys]; - daos_size_t val_size[nakeys]; - char *rec_verify; - daos_handle_t th[3]; - int i, t; - int rc; - - par_barrier(PAR_COMM_WORLD); - - D_ALLOC(rec_nvme, IO_SIZE_NVME); - assert_non_null(rec_nvme); - dts_buf_render(rec_nvme, IO_SIZE_NVME); - D_ALLOC(rec_scm, IO_SIZE_SCM); - assert_non_null(rec_scm); - dts_buf_render(rec_scm, IO_SIZE_SCM); - - oid = daos_test_oid_gen(arg->coh, dts_obj_class, 0, 0, arg->myrank); - ioreq_init(&req, arg->coh, oid, DAOS_IOD_SINGLE, arg); - - /** Prepare buffers for a fixed set of d-keys and a-keys. */ - for (i = 0; i < nakeys; i++) { - D_ALLOC(akey[i], strlen(akey_fmt) + nakeys_strlen + 1); - assert_non_null(akey[i]); - sprintf(akey[i], akey_fmt, i); - rec[i] = calloc(i % 2 == 0 ? IO_SIZE_NVME : IO_SIZE_SCM, 1); - assert_non_null(rec[i]); - offset[i] = i * 20; - val[i] = calloc(i % 2 == 0 ? IO_SIZE_NVME : IO_SIZE_SCM, 1); - assert_non_null(val[i]); - if (i % 2 == 0) - val_size[i] = IO_SIZE_NVME; - else - val_size[i] = IO_SIZE_SCM; - } - - /** Write at 3 different txs to same set of d-key and a-keys. */ - for (t = 0; t < 3; t++) { - rc = daos_tx_open(arg->coh, &th[t], NULL); - assert_success(rc); - print_message("writing to transaction %d\n", t); - for (i = 0; i < nakeys; i++) { - if (i % 2 == 0) { - memcpy(rec[i], rec_nvme, IO_SIZE_NVME); - rec_size[i] = IO_SIZE_NVME; - } else { - memcpy(rec[i], rec_scm, IO_SIZE_SCM); - rec_size[i] = IO_SIZE_SCM; - } - rec[i][0] = i + '0'; /* akey */ - rec[i][1] = t + '0'; /* tx handle */ - rx_nr[i] = 1; - print_message("\takey[%d], val(%d):'%c%c'\n", i, - (int)rec_size[i], rec[i][0], rec[i][1]); - } - insert(dkey, nakeys, (const char **)akey, /*iod_size*/rec_size, - rx_nr, offset, (void **)rec, th[t], &req); - par_barrier(PAR_COMM_WORLD); - } - - /** Check the three transactions. */ - for (t = 0; t < 3; t++) { - print_message("verifying transaction %d\n", t); - lookup(dkey, nakeys, (const char **)akey, offset, rec_size, - (void **)val, val_size, th[t], &req, false); - for (i = 0; i < nakeys; i++) { - rec_verify = calloc(i % 2 == 0 ? IO_SIZE_NVME : - IO_SIZE_SCM, 1); - assert_non_null(rec_verify); - if (i % 2 == 0) - memcpy(rec_verify, rec_nvme, IO_SIZE_NVME); - else - memcpy(rec_verify, rec_scm, IO_SIZE_SCM); - - rec_verify[0] = i + '0'; /* akey */ - rec_verify[1] = t + '0'; /* tx handle*/ - assert_int_equal(req.iod[i].iod_size, - strlen(rec_verify) + 1); - assert_memory_equal(val[i], rec_verify, - req.iod[i].iod_size); - D_FREE(rec_verify); - } - } - - par_barrier(PAR_COMM_WORLD); - - /** Commit only the first 2 transactions */ - for (t = 0; t < 3; t++) { - if (t != 2) { - print_message("committing transaction %d\n", t); - rc = daos_tx_commit(th[t], NULL); - assert_success(rc); - } else { - print_message("aborting transaction %d\n", t); - rc = daos_tx_abort(th[t], NULL); - assert_success(rc); - } - rc = daos_tx_close(th[t], NULL); - assert_success(rc); - par_barrier(PAR_COMM_WORLD); - } - - /** Close and reopen the container and the obj */ - close_reopen_coh_oh(arg, &req, oid); - - /** enumerate. */ - { - daos_anchor_t anchor; - int found = 0; - - memset(&anchor, 0, sizeof(anchor)); - while (!daos_anchor_is_eof(&anchor)) { - uint32_t n = 1; - daos_key_desc_t kd; - char *buf[64]; - - rc = enumerate_akey(DAOS_TX_NONE, dkey, &n, &kd, - &anchor, buf, sizeof(buf), &req); - assert_success(rc); - found += n; - } - assert_int_equal(found, nakeys); - } - - /** - * Check data after container close. Last tx was not committed and - * should be discarded, therefore data should be from transaction 2. - */ - print_message("verifying transaction after container re-open\n"); - lookup(dkey, nakeys, (const char **)akey, offset, rec_size, - (void **)val, val_size, DAOS_TX_NONE, &req, false); - t = 1; - for (i = 0; i < nakeys; i++) { - rec_verify = calloc(i % 2 == 0 ? IO_SIZE_NVME : IO_SIZE_SCM, 1); - assert_non_null(rec_verify); - if (i % 2 == 0) - memcpy(rec_verify, rec_nvme, IO_SIZE_NVME); - else - memcpy(rec_verify, rec_scm, IO_SIZE_SCM); - - rec_verify[0] = i + '0'; - rec_verify[1] = t + '0'; - assert_int_equal(req.iod[i].iod_size, strlen(rec_verify) + 1); - print_message("\trank %d, akey[%d], val(%d):'%c%c'\n", - arg->myrank, i, (int)req.iod[i].iod_size, - val[i][0], val[i][1]); - assert_memory_equal(val[i], rec_verify, - req.iod[i].iod_size); - D_FREE(rec_verify); - } - - for (i = 0; i < nakeys; i++) { - D_FREE(val[i]); - D_FREE(akey[i]); - D_FREE(rec[i]); - } - D_FREE(rec_nvme); - D_FREE(rec_scm); - - ioreq_fini(&req); - par_barrier(PAR_COMM_WORLD); -#endif -} - static void io_nospace(void **state) { @@ -3518,112 +3146,6 @@ io_obj_key_query(void **state) print_message("all good\n"); } -/** - * Simple test to trigger the blob unmap callback. This is done by inserting - * a few NVMe records, deleting some of the NVMe records by discarding one of - * the transactions, waiting a long enough time for the free - * extents to expire, and then inserting another record to trigger the callback. - */ -static void -blob_unmap_trigger(void **state) -{ - /* - * FIXME: obsolete tx_abort can't be used for deleting committed data - * anymore, need to figure out a new way to trigger blob unmap. - */ - print_message("Skip obsolete test\n"); - skip(); -#if 0 - daos_obj_id_t oid; - test_arg_t *arg = *state; - struct ioreq req; - char *update_buf; - char *fetch_buf; - char *enum_buf; - char dkey[5] = "dkey"; - char akey[20]; - int nvme_recs = 1; - daos_handle_t th[3]; - int i, t; - int rc; - - par_barrier(PAR_COMM_WORLD); - - oid = daos_test_oid_gen(arg->coh, dts_obj_class, 0, 0, arg->myrank); - /* Tx discard only currently supports DAOS_IOD_SINGLE type */ - ioreq_init(&req, arg->coh, oid, DAOS_IOD_SINGLE, arg); - - D_ALLOC(fetch_buf, IO_SIZE_NVME); - assert_non_null(fetch_buf); - D_ALLOC(update_buf, IO_SIZE_NVME); - assert_non_null(update_buf); - dts_buf_render(update_buf, IO_SIZE_NVME); - D_ALLOC(enum_buf, 512); - assert_non_null(enum_buf); - - /** - * Insert a few NVMe records. Write all three transactions at different - * akeys and the same dkey. - */ - for (t = 0; t < 3; t++) { - rc = daos_tx_open(arg->coh, &th[t], NULL); - assert_success(rc); - - for (i = 0; i < nvme_recs; i++) { - sprintf(akey, "blob_unmap_akey%d", i); - print_message("insert dkey:'%s', akey:'%s', tx:%d\n", - dkey, akey, t); - insert_single(dkey, akey, 0, update_buf, IO_SIZE_NVME, - th[t], &req); - /* Verify record was inserted */ - memset(fetch_buf, 0, IO_SIZE_NVME); - lookup_single(dkey, akey, 0, fetch_buf, IO_SIZE_NVME, - th[t], &req); - assert_memory_equal(update_buf, fetch_buf, - IO_SIZE_NVME); - } - par_barrier(PAR_COMM_WORLD); - } - - /* Discard the NVMe records (Discard second tx) */ - print_message("Discarding second transaction\n"); - rc = daos_tx_abort(th[1], NULL); - assert_success(rc); - rc = daos_tx_close(th[1], NULL); - assert_success(rc); - - par_barrier(PAR_COMM_WORLD); - - /* Wait for >= VEA_MIGRATE_INTVL */ - print_message("Wait for free extents to expire (15 sec)\n"); - sleep(15); - - /* Insert another NVMe record, will trigger free extent migration */ - sprintf(akey, "blob_unmap akey%d", nvme_recs); - print_message("insert dkey:'%s', akey:'%s'\n", dkey, akey); - rc = daos_tx_open(arg->coh, &th[1], NULL); - assert_success(rc); - insert_single(dkey, akey, 0, update_buf, IO_SIZE_NVME, th[1], &req); - /* Verify record was inserted */ - memset(fetch_buf, 0, IO_SIZE_NVME); - lookup_single(dkey, akey, 0, fetch_buf, IO_SIZE_NVME, th[1], &req); - assert_memory_equal(update_buf, fetch_buf, IO_SIZE_NVME); - - print_message("Blob unmap callback triggered\n"); - - for (t = 0; t < 3; t++) { - rc = daos_tx_close(th[t], NULL); - assert_success(rc); - } - - D_FREE(enum_buf); - D_FREE(fetch_buf); - D_FREE(update_buf); - ioreq_fini(&req); - par_barrier(PAR_COMM_WORLD); -#endif -} - static void punch_then_lookup(void **state) { @@ -5356,120 +4878,88 @@ io_57(void **state) reintegrate_single_pool_rank(arg, 0, false); } +/* Historical --subtests indexes are permanent, including these retired slots. */ +enum { + IO_RETIRED_TX_DISCARD = 16, + IO_RETIRED_TX_COMMIT = 17, + IO_RETIRED_BLOB_UNMAP = 32, + IO_RETIRED_COUNT = 3, +}; + static const struct CMUnitTest io_tests[] = { - { "IO1: simple update/fetch/verify", - io_simple, async_disable, test_case_teardown}, - { "IO2: simple update/fetch/verify (async)", - io_simple, async_enable, test_case_teardown}, - { "IO3: i/o with variable rec size", - io_var_rec_size, async_disable, test_case_teardown}, - { "IO4: i/o with variable rec size(async)", - io_var_rec_size, async_enable, test_case_teardown}, - { "IO5: i/o with variable dkey size", - io_var_dkey_size, async_enable, test_case_teardown}, - { "IO6: i/o with variable akey size", - io_var_akey_size, async_disable, test_case_teardown}, - { "IO7: i/o with variable index", - io_var_idx_offset, async_enable, test_case_teardown}, - { "IO8: variable size record overwrite", - io_overwrite, async_enable, test_case_teardown}, - { "IO9: simple enumerate", - enumerate_simple, async_disable, test_case_teardown}, - { "IO10: simple punch", - punch_simple, async_disable, test_case_teardown}, - { "IO11: multiple record update/fetch/verify", - io_manyrec, async_disable, test_case_teardown}, - { "IO12: complex update/fetch/verify", - io_complex, async_disable, test_case_teardown}, - { "IO13: basic byte array with record size fetching", - basic_byte_array, async_disable, test_case_teardown}, - { "IO14: timeout simple update", - io_simple_update_timeout, async_disable, test_case_teardown}, - { "IO15: timeout simple fetch", - io_simple_fetch_timeout, async_disable, test_case_teardown}, - { "IO16: timeout on 1 shard simple update", - io_simple_update_timeout_single, async_disable, test_case_teardown}, - { "IO17: transaction discard", - tx_discard, async_disable, test_case_teardown}, - { "IO18: transaction commit", - tx_commit, async_disable, test_case_teardown}, - { "IO19: no space", io_nospace, async_disable, test_case_teardown}, - { "IO20: fetch size with NULL sgl", - fetch_size, async_disable, test_case_teardown}, - { "IO21: io crt error", - io_simple_update_crt_error, async_disable, test_case_teardown}, - { "IO22: io crt error (async)", - io_simple_update_crt_error, async_enable, test_case_teardown}, - { "IO23: io crt req create timeout (sync)", - io_simple_update_crt_req_error, async_disable, test_case_teardown}, - { "IO24: io crt req create timeout (async)", - io_simple_update_crt_req_error, async_enable, test_case_teardown}, - { "IO25: Read from unwritten records", - read_empty_records, async_disable, test_case_teardown}, - { "IO26: Read from large unwritten records", - read_large_empty_records, async_disable, test_case_teardown}, - { "IO27: written records repeatedly", - write_record_multiple_times, async_disable, test_case_teardown}, - { "IO28: echo fetch/update", - echo_fetch_update, async_disable, test_case_teardown}, - { "IO29: basic object key query testing", - io_obj_key_query, async_disable, test_case_teardown}, - { "IO30: shard target idx change cause retry", - tgt_idx_change_retry, async_enable, test_case_teardown}, - { "IO31: fetch when all replicas unavailable", - fetch_replica_unavail, async_enable, test_case_teardown}, - { "IO32: update with overlapped recxs", - update_overlapped_recxs, async_enable, test_case_teardown}, - { "IO33: trigger blob unmap", - blob_unmap_trigger, async_disable, test_case_teardown}, - { "IO34: punch then lookup", - punch_then_lookup, async_disable, test_case_teardown}, - { "IO35: split update fetch", - split_sgl_update_fetch, async_disable, test_case_teardown}, - { "IO36: trigger server pool map refresh", - io_pool_map_refresh_trigger, async_disable, test_case_teardown}, - { "IO37: Fetch existing and nonexistent akeys in single fetch call", - fetch_mixed_keys, async_disable, test_case_teardown}, - { "IO38: force capability IV fetch", - io_capa_iv_fetch, async_disable, test_case_teardown}, - { "IO39: Update with invalid sg and record", - io_invalid, async_disable, test_case_teardown}, - { "IO40: Record count after punch/enumeration", - punch_enum_then_verify_record_count, async_disable, - test_case_teardown}, - { "IO41: IO Rewritten data fetch and validate pool size", - io_rewritten_array_with_mixed_size, async_disable, - test_case_teardown}, - { "IO42: IO fetch from an alternative node after first try failed", - io_fetch_retry_another_replica, async_disable, - test_case_teardown}, - { "IO43: Object class selection", - oclass_auto_setting, async_disable, test_case_teardown}, - { "IO44: INT dkey/akey checks", - invalid_int_key_setting, async_disable, test_case_teardown}, - { "IO45: enum recxs with aggregation", - enum_recxs_with_aggregation, async_disable, test_case_teardown}, - { "IO46: tx convert", - io_tx_convert, async_disable, test_case_teardown}, - { "IO47: obj_open perf", obj_open_perf, async_disable, test_case_teardown}, - { "IO48: oit_list_filter", oit_list_filter, async_disable, test_case_teardown}, - { "IO49: oit_list_filter async", oit_list_filter, async_enable, test_case_teardown}, - { "IO50: collective punch object - OC_SX", - io_50, NULL, test_case_teardown}, - { "IO51: collective punch object - OC_EC_2P1G2", - io_51, NULL, test_case_teardown}, - { "IO52: collective punch object - OC_EC_4P1GX", - io_52, NULL, test_case_teardown}, - { "IO53: collective object query - OC_SX", - io_53, async_disable, test_case_teardown}, - { "IO54: collective object query - OC_EC_2P1G2", - io_54, async_disable, test_case_teardown}, - { "IO55: collective object query - OC_EC_4P1GX", - io_55, async_disable, test_case_teardown}, - { "IO56: collective object query with sparse ranks", - io_56, async_disable, test_case_teardown}, - { "IO57: collective object query with rank_0 excluded", - io_57, rebuild_sub_rf1_setup, test_teardown}, + {"IO1: simple update/fetch/verify", io_simple, async_disable, test_case_teardown}, + {"IO2: simple update/fetch/verify (async)", io_simple, async_enable, test_case_teardown}, + {"IO3: i/o with variable rec size", io_var_rec_size, async_disable, test_case_teardown}, + {"IO4: i/o with variable rec size(async)", io_var_rec_size, async_enable, test_case_teardown}, + {"IO5: i/o with variable dkey size", io_var_dkey_size, async_enable, test_case_teardown}, + {"IO6: i/o with variable akey size", io_var_akey_size, async_disable, test_case_teardown}, + {"IO7: i/o with variable index", io_var_idx_offset, async_enable, test_case_teardown}, + {"IO8: variable size record overwrite", io_overwrite, async_enable, test_case_teardown}, + {"IO9: simple enumerate", enumerate_simple, async_disable, test_case_teardown}, + {"IO10: simple punch", punch_simple, async_disable, test_case_teardown}, + {"IO11: multiple record update/fetch/verify", io_manyrec, async_disable, test_case_teardown}, + {"IO12: complex update/fetch/verify", io_complex, async_disable, test_case_teardown}, + {"IO13: basic byte array with record size fetching", basic_byte_array, async_disable, + test_case_teardown}, + {"IO14: timeout simple update", io_simple_update_timeout, async_disable, test_case_teardown}, + {"IO15: timeout simple fetch", io_simple_fetch_timeout, async_disable, test_case_teardown}, + {"IO16: timeout on 1 shard simple update", io_simple_update_timeout_single, async_disable, + test_case_teardown}, + /* IO17 (tx_discard), selector 16, retired; do not reuse. */ + /* IO18 (tx_commit), selector 17, retired; do not reuse. */ + {"IO19: no space", io_nospace, async_disable, test_case_teardown}, + {"IO20: fetch size with NULL sgl", fetch_size, async_disable, test_case_teardown}, + {"IO21: io crt error", io_simple_update_crt_error, async_disable, test_case_teardown}, + {"IO22: io crt error (async)", io_simple_update_crt_error, async_enable, test_case_teardown}, + {"IO23: io crt req create timeout (sync)", io_simple_update_crt_req_error, async_disable, + test_case_teardown}, + {"IO24: io crt req create timeout (async)", io_simple_update_crt_req_error, async_enable, + test_case_teardown}, + {"IO25: Read from unwritten records", read_empty_records, async_disable, test_case_teardown}, + {"IO26: Read from large unwritten records", read_large_empty_records, async_disable, + test_case_teardown}, + {"IO27: written records repeatedly", write_record_multiple_times, async_disable, + test_case_teardown}, + {"IO28: echo fetch/update", echo_fetch_update, async_disable, test_case_teardown}, + {"IO29: basic object key query testing", io_obj_key_query, async_disable, test_case_teardown}, + {"IO30: shard target idx change cause retry", tgt_idx_change_retry, async_enable, + test_case_teardown}, + {"IO31: fetch when all replicas unavailable", fetch_replica_unavail, async_enable, + test_case_teardown}, + {"IO32: update with overlapped recxs", update_overlapped_recxs, async_enable, + test_case_teardown}, + /* IO33 (blob_unmap_trigger), selector 32, retired; do not reuse. */ + {"IO34: punch then lookup", punch_then_lookup, async_disable, test_case_teardown}, + {"IO35: split update fetch", split_sgl_update_fetch, async_disable, test_case_teardown}, + {"IO36: trigger server pool map refresh", io_pool_map_refresh_trigger, async_disable, + test_case_teardown}, + {"IO37: Fetch existing and nonexistent akeys in single fetch call", fetch_mixed_keys, + async_disable, test_case_teardown}, + {"IO38: force capability IV fetch", io_capa_iv_fetch, async_disable, test_case_teardown}, + {"IO39: Update with invalid sg and record", io_invalid, async_disable, test_case_teardown}, + {"IO40: Record count after punch/enumeration", punch_enum_then_verify_record_count, + async_disable, test_case_teardown}, + {"IO41: IO Rewritten data fetch and validate pool size", io_rewritten_array_with_mixed_size, + async_disable, test_case_teardown}, + {"IO42: IO fetch from an alternative node after first try failed", + io_fetch_retry_another_replica, async_disable, test_case_teardown}, + {"IO43: Object class selection", oclass_auto_setting, async_disable, test_case_teardown}, + {"IO44: INT dkey/akey checks", invalid_int_key_setting, async_disable, test_case_teardown}, + {"IO45: enum recxs with aggregation", enum_recxs_with_aggregation, async_disable, + test_case_teardown}, + {"IO46: tx convert", io_tx_convert, async_disable, test_case_teardown}, + {"IO47: obj_open perf", obj_open_perf, async_disable, test_case_teardown}, + {"IO48: oit_list_filter", oit_list_filter, async_disable, test_case_teardown}, + {"IO49: oit_list_filter async", oit_list_filter, async_enable, test_case_teardown}, + {"IO50: collective punch object - OC_SX", io_50, NULL, test_case_teardown}, + {"IO51: collective punch object - OC_EC_2P1G2", io_51, NULL, test_case_teardown}, + {"IO52: collective punch object - OC_EC_4P1GX", io_52, NULL, test_case_teardown}, + {"IO53: collective object query - OC_SX", io_53, async_disable, test_case_teardown}, + {"IO54: collective object query - OC_EC_2P1G2", io_54, async_disable, test_case_teardown}, + {"IO55: collective object query - OC_EC_4P1GX", io_55, async_disable, test_case_teardown}, + {"IO56: collective object query with sparse ranks", io_56, async_disable, test_case_teardown}, + {"IO57: collective object query with rank_0 excluded", io_57, rebuild_sub_rf1_setup, + test_teardown}, }; int @@ -5504,14 +4994,78 @@ obj_setup(void **state) int run_daos_io_test(int rank, int size, int *sub_tests, int sub_tests_size) { - int rc = 0; char oclass[MAX_OBJ_CLASS_NAME_LEN + 1] = {0}; char buf[32]; + int *selected = NULL; + int selected_count = 0; + int alloc_rc = 0; + int rc = 0; + int rc_reduce; + int i; par_barrier(PAR_COMM_WORLD); if (sub_tests_size == 0) { sub_tests_size = ARRAY_SIZE(io_tests); - sub_tests = NULL; + sub_tests = NULL; + } else { + D_ALLOC_ARRAY(selected, sub_tests_size); + if (selected == NULL) + alloc_rc = -DER_NOMEM; + rc = par_allreduce(PAR_COMM_WORLD, &alloc_rc, &rc_reduce, 1, PAR_INT, PAR_MIN); + if (rc != 0) { + if (rank == 0) + print_message("Failed to synchronize I/O subtest selection: %d\n", + rc); + goto out; + } + if (rc_reduce != 0) { + if (rank == 0) + print_message("Failed allocating I/O subtest selection\n"); + rc = rc_reduce; + goto out; + } + + for (i = 0; i < sub_tests_size; i++) { + int index = sub_tests[i]; + int retired_delta = 0; + const char *retired = NULL; + + if (index == IO_RETIRED_TX_DISCARD) + retired = "IO17 (tx_discard)"; + else if (index == IO_RETIRED_TX_COMMIT) + retired = "IO18 (tx_commit)"; + else if (index == IO_RETIRED_BLOB_UNMAP) + retired = "IO33 (blob_unmap_trigger)"; + + if (retired != NULL) { + if (rank == 0) + print_message("Warning: I/O subtest %d, %s, is retired\n", + index, retired); + continue; + } + if (index < 0 || (size_t)index >= ARRAY_SIZE(io_tests) + IO_RETIRED_COUNT) { + if (rank == 0) + print_message("No subtest %d\n", index); + continue; + } + + /* Translate historical indexes to the compacted io_tests array. */ + if (index > IO_RETIRED_TX_DISCARD) + retired_delta++; + if (index > IO_RETIRED_TX_COMMIT) + retired_delta++; + if (index > IO_RETIRED_BLOB_UNMAP) + retired_delta++; + selected[selected_count++] = index - retired_delta; + } + + if (selected_count == 0) { + if (rank == 0) + print_message("No I/O subtests will run\n"); + goto out; + } + sub_tests = selected; + sub_tests_size = selected_count; } if (dt_obj_class != OC_UNKNOWN) { @@ -5521,10 +5075,11 @@ run_daos_io_test(int rank, int size, int *sub_tests, int sub_tests_size) snprintf(buf, sizeof(buf), "DAOS_IO%s", oclass); buf[sizeof(buf) - 1] = 0; - rc = run_daos_sub_tests(buf, io_tests, - ARRAY_SIZE(io_tests), sub_tests, sub_tests_size, + rc = run_daos_sub_tests(buf, io_tests, ARRAY_SIZE(io_tests), sub_tests, sub_tests_size, obj_setup, test_teardown); +out: + D_FREE(selected); par_barrier(PAR_COMM_WORLD); return rc; } From 5bc7ef1591d3910472cf9b8e159660f26f720945 Mon Sep 17 00:00:00 2001 From: Kenneth Cain Date: Wed, 2 Dec 2026 11:41:47 -0500 Subject: [PATCH 4/4] DAOS-19789 test: skip unmet prerequisites in newer tests Replace five silent prerequisite returns in four tests introduced by master with explicit cmocka skips, including the five-service-replica requirement. Skip-nlt: true Skip-fault-injection-test: true Test-tag: pr test_rebuild_31 test_rebuild_32 test_rebuild_33 test_rebuild_34 test_rebuild_35 test_rebuild_36 test_rebuild_37 test_rebuild_38 test_rebuild_weekly Signed-off-by: Kenneth Cain Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/tests/suite/daos_obj_ec.c | 3 +-- src/tests/suite/daos_rebuild.c | 3 +-- src/tests/suite/daos_rebuild_ec.c | 9 +++++---- src/tests/suite/daos_rebuild_weekly.c | 3 +-- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/tests/suite/daos_obj_ec.c b/src/tests/suite/daos_obj_ec.c index 2b1f963c26f..601f8baa0e1 100644 --- a/src/tests/suite/daos_obj_ec.c +++ b/src/tests/suite/daos_obj_ec.c @@ -1934,8 +1934,7 @@ ec_singv_stale_shard_fetch(void **state) FAULT_INJECTION_REQUIRED(); - if (!test_runnable(arg, 6)) - return; + test_runnable_or_skip(arg, 6); /* The checksum of the fetched data is only verified if checksum is enabled for the * container, do not depend on the default container properties for that. diff --git a/src/tests/suite/daos_rebuild.c b/src/tests/suite/daos_rebuild.c index 5a3b2cf560c..72ce15b54a2 100644 --- a/src/tests/suite/daos_rebuild.c +++ b/src/tests/suite/daos_rebuild.c @@ -1154,8 +1154,7 @@ rebuild_map_refresh_hint(void **state) bool refreshed; int i; - if (!test_runnable(arg, 4)) - return; + test_runnable_or_skip(arg, 4); for (i = 0; i < OBJ_NR; i++) { oids[i] = daos_test_oid_gen(arg->coh, DAOS_OC_R3S_SPEC_RANK, 0, 0, arg->myrank); diff --git a/src/tests/suite/daos_rebuild_ec.c b/src/tests/suite/daos_rebuild_ec.c index b566a919da3..e0a07978898 100644 --- a/src/tests/suite/daos_rebuild_ec.c +++ b/src/tests/suite/daos_rebuild_ec.c @@ -2242,10 +2242,11 @@ rebuild_ec_parity_below_newer(void **state) char stage[64]; print_message("BEGIN %s\n", __FUNCTION__); - if (!test_runnable(arg, 8)) - return; - if (svc_nreplicas < 5) - return; + test_runnable_or_skip(arg, 8); + if (svc_nreplicas < 5) { + print_message("need at least 5 svcs, -s5\n"); + skip(); + } D_ALLOC_PTR(ctxa); D_ALLOC_PTR(ctxb); diff --git a/src/tests/suite/daos_rebuild_weekly.c b/src/tests/suite/daos_rebuild_weekly.c index 611e0db1e71..42c518a66b0 100644 --- a/src/tests/suite/daos_rebuild_weekly.c +++ b/src/tests/suite/daos_rebuild_weekly.c @@ -136,8 +136,7 @@ rebuild_ec_agg_on_excluded_tgt(void **state) int s, c, rc, bad = 0; print_message("BEGIN %s\n", __FUNCTION__); - if (!test_runnable(arg, 8)) - return; + test_runnable_or_skip(arg, 8); oid = daos_test_oid_gen(arg->coh, OC_EC_2P2G1, 0, 0, arg->myrank); /* data cell @c of the stripe is EC shard (grp_start + c) % grp_size */