@@ -403,7 +403,11 @@ async def _run_scheduler(self, suites_obj: List[Suite], runtime: float) -> None:
403403 except asyncio .TimeoutError :
404404 await self ._scheduler .stop ()
405405
406- async def _apply_fault_injection (self , fault_prob : int ) -> None :
406+ async def _apply_fault_injection (
407+ self ,
408+ fault_prob : int ,
409+ fault_interval : int = 1 ,
410+ ) -> None :
407411 """
408412 Check if we can apply fault injection configuration
409413 and eventually does it.
@@ -415,7 +419,7 @@ async def _apply_fault_injection(self, fault_prob: int) -> None:
415419 warn_msg = "Run as root to use kernel fault injection"
416420 else :
417421 if await self ._sut .is_fault_injection_enabled ():
418- await self ._sut .setup_fault_injection (fault_prob )
422+ await self ._sut .setup_fault_injection (fault_prob , fault_interval )
419423 else :
420424 if fault_prob != 0 :
421425 warn_msg = "Fault injection is not enabled. Running tests normally"
@@ -436,6 +440,7 @@ async def run(
436440 randomize : bool = False ,
437441 runtime : float = 0 ,
438442 fault_prob : int = 0 ,
443+ fault_interval : int = 1 ,
439444 ) -> None :
440445 """
441446 Run a new session and store results inside a JSON file.
@@ -460,6 +465,8 @@ async def run(
460465 :type runtime: float
461466 :param fault_prob: Fault injection probability.
462467 :type fault_prob: int
468+ :param fault_interval: Fault injection interval.
469+ :type fault_interval: int
463470 """
464471 async with self ._run_lock :
465472 await libkirk .events .fire ("session_started" , suites , self ._tmpdir .abspath )
@@ -477,7 +484,7 @@ async def run(
477484 await self ._exec_command (command )
478485
479486 if fault_prob != 0 :
480- await self ._apply_fault_injection (fault_prob )
487+ await self ._apply_fault_injection (fault_prob , fault_interval )
481488
482489 if suites :
483490 suites_obj = await self ._read_suites (
0 commit comments