From 37745826eb7d7ae674a61d370afda8fc7d560198 Mon Sep 17 00:00:00 2001 From: Shreeya Patel Date: Mon, 21 Apr 2025 18:16:02 +0530 Subject: [PATCH] WIP Add fault injection template Add a basic template for fault injection which lets us override various default parameters if needed for the test. Signed-off-by: Shreeya Patel --- config/runtime/fault-injection.jinja2 | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 config/runtime/fault-injection.jinja2 diff --git a/config/runtime/fault-injection.jinja2 b/config/runtime/fault-injection.jinja2 new file mode 100644 index 000000000..e3829006d --- /dev/null +++ b/config/runtime/fault-injection.jinja2 @@ -0,0 +1,20 @@ +{% set test_method = 'fault-injection' %} +{% set base_template = 'base/' + runtime + '.jinja2' %} +{%- extends base_template %} + +{# Default parameters that can be overridden in job definitions #} +{% set failcmd_url = failcmd_url|default('https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/testing/fault-injection/failcmd.sh') %} +{% set iterations = iterations|default(5) %} +{% set fail_type = fail_type|default('failslab') %} + +{% block test_parameters %} + test_name: "{{ test_name }}", + test_command: "{{ test_command }}", + failcmd_url: "{{ failcmd_url }}", + fail_type: "{{ fail_type }}", + probability: {{ probability|default(100) }}, + times: {{ times|default(100) }}, + interval: {{ interval|default(100) }}, + sleep_time: {{ sleep_time|default(10) }}, + iterations: {{ iterations }} +{% endblock %}