Skip to content

Commit

Permalink
DAOS-16052 test: Skip wal tests if fault injection feature is disabled
Browse files Browse the repository at this point in the history
some tests required fault injection, skip these tests if
this feature is not enabled.

Required-githooks: true
Signed-off-by: Wang Shilong <shilong.wang@intel.com>
  • Loading branch information
wangshilong committed Jun 18, 2024
1 parent f825add commit 54ae391
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/vos/tests/vts_wal.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright 2022-2023 Intel Corporation.
* (C) Copyright 2022-2024 Intel Corporation.
*
* SPDX-License-Identifier: BSD-2-Clause-Patent
*/
Expand Down Expand Up @@ -280,6 +280,9 @@ wal_tst_pool_cont(void **state)
vos_pool_info_t pool_info1 = { 0 }, pool_info2 = { 0 };
int rc;

if (arg->wta_no_replay)
FAULT_INJECTION_REQUIRED();

uuid_generate(pool_id);
uuid_generate(cont_id);

Expand Down Expand Up @@ -457,6 +460,9 @@ wal_kv_basic(void **state)
unsigned int small_sz = 16, large_sz = 8192;
int i;

if (arg->no_replay)
FAULT_INJECTION_REQUIRED();

oid = dts_unit_oid_gen(0, 0);

dts_key_gen(dkey, UPDATE_DKEY_SIZE, UPDATE_DKEY);
Expand Down Expand Up @@ -799,6 +805,9 @@ wal_io_multiple_updates(void **state)
char *up, *f, *ak, *dk;
int i, j, rc = 0;

if (arg->fail_checkpoint || arg->no_replay || arg->fail_replay)
FAULT_INJECTION_REQUIRED();

num_keys = WAL_IO_MULTI_KEYS;
if (arg->fail_checkpoint)
num_keys = WAL_IO_MULTI_KEYS * 4;
Expand Down

0 comments on commit 54ae391

Please sign in to comment.