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
#14600)

Some tests required fault injection, skip these tests if
this feature is not enabled.

Adding Valgrind suppressions.

Signed-off-by: Wang Shilong <shilong.wang@intel.com>
Signed-off-by: Phil Henderson <phillip.henderson@intel.com>
Co-authored-by: Phil Henderson <phillip.henderson@intel.com>
  • Loading branch information
wangshilong and phender authored Jun 18, 2024
1 parent ea1d2e5 commit 5566bde
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
10 changes: 10 additions & 0 deletions src/cart/utils/memcheck-cart.supp
Original file line number Diff line number Diff line change
Expand Up @@ -594,3 +594,13 @@
fun:__tsan_go_atomic64_compare_exchange
fun:racecall
}
{
DAOS-16052
Memcheck:Leak
match-leak-kinds: reachable
fun:malloc
fun:_cgo_b68ed06c1ed7_Cfunc__Cmalloc
fun:runtime.asmcgocall.abi0
...
fun:runtime.persistentalloc
}
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
10 changes: 10 additions & 0 deletions utils/test_memcheck.supp
Original file line number Diff line number Diff line change
Expand Up @@ -408,3 +408,13 @@
fun:_ZN6__tsan9ShadowSetEPNS_9RawShadowES1_S0_
fun:racecall
}
{
DAOS-16052
Memcheck:Leak
match-leak-kinds: reachable
fun:malloc
fun:_cgo_b68ed06c1ed7_Cfunc__Cmalloc
fun:runtime.asmcgocall.abi0
...
fun:runtime.persistentalloc
}

0 comments on commit 5566bde

Please sign in to comment.