Skip to content

main: add configurable fault injection interval#98

Merged
acerv merged 1 commit into
linux-test-project:masterfrom
nhitar:fault_injection_interval
May 13, 2026
Merged

main: add configurable fault injection interval#98
acerv merged 1 commit into
linux-test-project:masterfrom
nhitar:fault_injection_interval

Conversation

@nhitar
Copy link
Copy Markdown
Contributor

@nhitar nhitar commented May 2, 2026

Adds a parameter to configure the fault injection interval, which is locked at default 100.

Can be used to make the fault injection probability checks more frequent. This would lead to a more thorough test of system stability.

@nhitar
Copy link
Copy Markdown
Contributor Author

nhitar commented May 10, 2026

@acerv hello, can you review these changes please?

@acerv
Copy link
Copy Markdown
Collaborator

acerv commented May 11, 2026

Hi, what's the point of having a probability bigger than 100 if the kernel threats any value above 100 as 100 ?

@nhitar
Copy link
Copy Markdown
Contributor Author

nhitar commented May 11, 2026

Can be used to make the fault injection probability checks more frequent.

Hi, what's the point of having a probability bigger than 100 if the kernel threats any value above 100 as 100 ?

The idea is to modify the interval between probability checks, rather than the probability itself. I haven't really changed the probability in code.

Right now 100% probability of failure grants that every 100th call will fail (interval=100). So, with different intervals, it is possible, for example, to have fails (or probability checks if below 100%) every 10th call (interval=10). Or, with an interval set to 1 and a probability to 10%, each call may fail with that probability.

docs:

/sys/kernel/debug/fail*/interval:

specifies the interval between failures, for calls to should_fail() that pass all the other tests.

Note that if you enable this, by setting interval>1, you will probably want to set probability=100.

@acerv
Copy link
Copy Markdown
Collaborator

acerv commented May 12, 2026

Of course, I was switching between reviews and messed up this one. Now it's clear thanks

Comment thread libkirk/main.py Outdated
Comment thread libkirk/tests/test_main.py Outdated
Comment thread libkirk/tests/test_main.py Outdated
Comment thread libkirk/main.py Outdated
Comment thread libkirk/main.py Outdated
Comment thread libkirk/main.py Outdated
Comment thread libkirk/session.py Outdated
Comment thread libkirk/session.py Outdated
Comment thread libkirk/sut.py Outdated
Comment thread libkirk/tests/test_main.py Outdated
@nhitar nhitar force-pushed the fault_injection_interval branch from ad4b111 to 6c3b3bd Compare May 12, 2026 13:24
Comment thread libkirk/sut.py Outdated
@nhitar nhitar force-pushed the fault_injection_interval branch from 6c3b3bd to 86ed6b6 Compare May 13, 2026 10:11
@acerv acerv merged commit 07964a1 into linux-test-project:master May 13, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants