Skip to content

Commit 1e5f6fa

Browse files
committed
DAOS-19103 test: call FI macro in rebuild tests
This change covers DAOS-19103 and DAOS-19104 fixes needed for the relevant interactive and simple rebuild test cases. Add FAULT_INJECTION_REQUIRED() in tests requiring fault injection enabled, to skip cleanly (instead of hange) when run with a daos release build. faults-enabled: false Test-tag: test_daos_rebuild_simple test_daos_rebuild_interactive Skip-unit-tests: true Skip-fault-injection-test: true Skip-test-rpms: true Signed-off-by: Kenneth Cain <kenneth.cain@hpe.com>
1 parent 54a7558 commit 1e5f6fa

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

src/tests/suite/daos_rebuild_interactive.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,8 @@ int_rebuild_many_objects_with_failure(void **state)
224224
int rc;
225225
int i;
226226

227+
FAULT_INJECTION_REQUIRED();
228+
227229
if (!test_runable(arg, 6))
228230
return;
229231

src/tests/suite/daos_rebuild_simple.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1373,6 +1373,8 @@ rebuild_many_objects_with_failure(void **state)
13731373
int rc;
13741374
int i;
13751375

1376+
FAULT_INJECTION_REQUIRED();
1377+
13761378
if (!test_runable(arg, 6))
13771379
return;
13781380

@@ -1464,6 +1466,8 @@ rebuild_object_with_csum_error(void **state)
14641466
daos_size_t io_count = block_size / transfer_size;
14651467
uint32_t iterations = 2;
14661468

1469+
FAULT_INJECTION_REQUIRED();
1470+
14671471
if (!test_runable(arg, 3)) {
14681472
skip();
14691473
}
@@ -1749,6 +1753,8 @@ rebuild_with_dfs_inflight_append(void **state)
17491753
daos_obj_id_t oid;
17501754
struct rebuild_cb_arg cb_arg;
17511755

1756+
FAULT_INJECTION_REQUIRED();
1757+
17521758
if (!test_runable(arg, 6))
17531759
return;
17541760

@@ -1810,6 +1816,8 @@ rebuild_with_dfs_inflight_punch(void **state)
18101816
struct stat st;
18111817
int rc;
18121818

1819+
FAULT_INJECTION_REQUIRED();
1820+
18131821
if (!test_runable(arg, 6))
18141822
return;
18151823

@@ -1894,6 +1902,8 @@ rebuild_with_dfs_inflight_append_punch(void **state)
18941902
struct stat st;
18951903
int rc;
18961904

1905+
FAULT_INJECTION_REQUIRED();
1906+
18971907
if (!test_runable(arg, 6))
18981908
return;
18991909

0 commit comments

Comments
 (0)