Skip to content

Commit ceceb8b

Browse files
vigneshramannuclearcat
authored andcommitted
fault-injection: update fault injection parameters
Set the default probability for fault-injection tests to a random value between 1 and 100. This ensures each job run uses a different probability value. Set times default to -1 for unlimited failures and add interval to limit how often failures are injected. interval=1 allows every eligible allocation to fail. Signed-off-by: Vignesh Raman <[email protected]>
1 parent 3d9f823 commit ceceb8b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

config/runtime/tests/fault-injection.jinja2

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@
2323
echo "Iteration $i: {{ test_name }}"
2424
FAILCMD_TYPE={{ fail_type|default('failslab') }} \
2525
/usr/local/bin/failcmd \
26-
--probability={{ probability|default(100) }} \
27-
--times={{ times|default(100) }} \
26+
--interval={{ interval|default(1) }} \
27+
--probability={{ probability|default(range(1, 101)|random) }} \
28+
--times={{ times|default(-1) }} \
2829
--verbose=2 \
2930
"{{ test_command }}"
3031
sleep {{ sleep_time|default(10) }}

0 commit comments

Comments
 (0)