Skip to content

Commit fe211f1

Browse files
committed
DAOS-19104 tests: Add some FAULT_INJECTION_REQUIREDs
Add some missing FAULT_INJECTION_REQUIREDs to daos_container.c and daos_pool.c. faults-enabled: false Test-tag: test_daos_pool test_daos_container Skip-unit-tests: true Skip-unit-test: true Skip-nlt: true Skip-fault-injection-test: true Signed-off-by: Li Wei <liwei@hpe.com>
1 parent 05984ff commit fe211f1

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

src/tests/suite/daos_container.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,8 @@ co_properties(void **state)
392392
char *exp_owner_grp;
393393
char str[37];
394394

395+
FAULT_INJECTION_REQUIRED();
396+
395397
print_message("create container with properties, and query/verify.\n");
396398
rc = test_setup((void **)&arg, SETUP_POOL_CONNECT, arg0->multi_rank,
397399
SMALL_POOL_SIZE, 0, NULL);
@@ -1042,6 +1044,8 @@ co_acl(void **state)
10421044
d_string_t name_to_remove = "friendlyuser@";
10431045
uint8_t type_to_remove = DAOS_ACL_USER;
10441046

1047+
FAULT_INJECTION_REQUIRED();
1048+
10451049
print_message("create container with access props, and verify.\n");
10461050
rc = test_setup((void **)&arg, SETUP_POOL_CONNECT, arg0->multi_rank,
10471051
SMALL_POOL_SIZE, 0, NULL);
@@ -2613,6 +2617,8 @@ co_rf_simple(void **state)
26132617
daos_recx_t recx;
26142618
int rc;
26152619

2620+
FAULT_INJECTION_REQUIRED();
2621+
26162622
/* needs 3 alive nodes after excluding 3 */
26172623
if (!test_runable(arg0, 6))
26182624
skip();
@@ -2845,6 +2851,8 @@ delet_container_during_aggregation(void **state)
28452851
int i;
28462852
int rc;
28472853

2854+
FAULT_INJECTION_REQUIRED();
2855+
28482856
/* Prepare records */
28492857
oid = daos_test_oid_gen(arg->coh, OC_SX, 0, 0, arg->myrank);
28502858

@@ -3025,6 +3033,8 @@ co_redun_lvl(void **state)
30253033
d_rank_t ranks[3];
30263034
int i, rc;
30273035

3036+
FAULT_INJECTION_REQUIRED();
3037+
30283038
if (!test_runable(arg0, 8))
30293039
skip();
30303040

@@ -3848,6 +3858,8 @@ co_op_dup_timing(void **state)
38483858
double t_fp_loop[NUM_FP];
38493859
int rc;
38503860

3861+
FAULT_INJECTION_REQUIRED();
3862+
38513863
/* Create a separate pool with svc_ops_entry_age property (dummy workload duration). */
38523864
prop = daos_prop_alloc(3);
38533865
/* label - set arg->pool_label to use daos_pool_connect() */
@@ -4049,6 +4061,8 @@ co_open_destroying(void **state)
40494061
daos_handle_t coh;
40504062
int rc;
40514063

4064+
FAULT_INJECTION_REQUIRED();
4065+
40524066
par_barrier(PAR_COMM_WORLD);
40534067

40544068
if (arg->myrank != 0)

src/tests/suite/daos_pool.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,8 @@ pool_properties(void **state)
505505
char *expected_owner;
506506
char *expected_group;
507507

508+
FAULT_INJECTION_REQUIRED();
509+
508510
par_barrier(PAR_COMM_WORLD);
509511

510512
print_message("create pool with properties, and query it to verify.\n");
@@ -2298,12 +2300,16 @@ pool_map_refreshes_setup(void **state)
22982300
static void
22992301
pool_map_refreshes(void **state)
23002302
{
2303+
FAULT_INJECTION_REQUIRED();
2304+
23012305
pool_map_refreshes_common(state, false /* fall_back */);
23022306
}
23032307

23042308
static void
23052309
pool_map_refreshes_fallback(void **state)
23062310
{
2311+
FAULT_INJECTION_REQUIRED();
2312+
23072313
pool_map_refreshes_common(state, true /* fall_back */);
23082314
}
23092315

0 commit comments

Comments
 (0)