Skip to content

Commit cab15c0

Browse files
committed
DAOS-18478 tests: Fix daos_test POOL13 (#17401)
daos_test POOL13 should restore the original value of pool property self_heal, or later tests may be affected. Signed-off-by: Li Wei <[email protected]>
1 parent b45d1f0 commit cab15c0

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

src/tests/suite/daos_pool.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -734,11 +734,17 @@ pool_op_retry(void **state)
734734
print_message("success\n");
735735

736736
/* pool set prop success committed, "lost" reply - duplicate RPC retry */
737+
char *orig_self_heal = NULL;
738+
rc = daos_pool_get_prop(arg->pool.pool_uuid, "self_heal", &orig_self_heal);
739+
assert_rc_equal(rc, 0);
737740
test_set_engine_fail_loc(arg, leader_rank, DAOS_MD_OP_PASS_NOREPLY | DAOS_FAIL_ONCE);
738741
print_message("set pool prop (retry / dup rpc detection)... ");
739742
rc = daos_pool_set_prop(arg->pool.pool_uuid, "self_heal", "none");
740743
assert_rc_equal(rc, 0);
741744
print_message("success\n");
745+
rc = daos_pool_set_prop(arg->pool.pool_uuid, "self_heal", orig_self_heal);
746+
assert_rc_equal(rc, 0);
747+
free(orig_self_heal);
742748

743749
/* pool evict success committed, "lost" reply - duplicate RPC retry */
744750
test_set_engine_fail_loc(arg, leader_rank, DAOS_MD_OP_PASS_NOREPLY | DAOS_FAIL_ONCE);

src/tests/suite/daos_test.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* (C) Copyright 2016-2023 Intel Corporation.
3-
* (C) Copyright 2025 Hewlett Packard Enterprise Development LP
3+
* (C) Copyright 2025-2026 Hewlett Packard Enterprise Development LP
44
*
55
* SPDX-License-Identifier: BSD-2-Clause-Patent
66
*/
@@ -395,6 +395,8 @@ bool test_rebuild_query(test_arg_t **args, int args_cnt);
395395
void test_rebuild_wait(test_arg_t **args, int args_cnt);
396396
int daos_pool_set_prop(const uuid_t pool_uuid, const char *name,
397397
const char *value);
398+
int
399+
daos_pool_get_prop(const uuid_t pool_uuid, const char *name, char **value_out);
398400

399401
int daos_pool_upgrade(const uuid_t pool_uuid);
400402
int ec_data_nr_get(daos_obj_id_t oid);

src/tests/suite/daos_test_common.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/**
22
* (C) Copyright 2018-2023 Intel Corporation.
3+
* (C) Copyright 2026 Hewlett Packard Enterprise Development LP
34
*
45
* SPDX-License-Identifier: BSD-2-Clause-Patent
56
*/
@@ -923,6 +924,12 @@ daos_pool_set_prop(const uuid_t pool_uuid, const char *name,
923924
return dmg_pool_set_prop(dmg_config_file, name, value, pool_uuid);
924925
}
925926

927+
int
928+
daos_pool_get_prop(const uuid_t pool_uuid, const char *name, char **value_out)
929+
{
930+
return dmg_pool_get_prop(dmg_config_file, NULL, pool_uuid, name, value_out);
931+
}
932+
926933
void
927934
daos_start_server(test_arg_t *arg, const uuid_t pool_uuid,
928935
const char *grp, d_rank_list_t *svc, d_rank_t rank)

0 commit comments

Comments
 (0)