Skip to content

QLS: statically enable/disable fault injection depending on the SUT #534

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jorisdral
Copy link
Collaborator

@jorisdral jorisdral commented Jan 17, 2025

Faults can only be injected into a mocked HasFS, but not all the SUTs we test
use a mocked HasFS. If the SUT does not make use of a mocked HasFS then the
result of fault injection will always be InjectFaultAccidentalSuccess. This PR
adds some boilerplate for statically enabling/disabling fault injection
depending on the SUT.

Fault injection is then enabled for the following SUTs:

  • The "real" implementation in IO using a mocked HasFS
  • The "real" implementation in IOSim using a mocked HasFS

Fault injection is then disabled for the following SUTs:

  • The reference implementation: it does not use a HasFS
  • The "real" implementation in IO using the real HasFS: it uses the real file
    system

@jorisdral jorisdral self-assigned this Jan 17, 2025
@jorisdral jorisdral changed the title Jdral/configurable faults QLS: statically enable/disable fault injection depending on the SUT Jan 17, 2025
@dcoutts
Copy link
Collaborator

dcoutts commented Jan 20, 2025

Basic principle sounds fine.

Base automatically changed from jdral/qls-fault-handling-updates to main January 20, 2025 14:17
@jorisdral
Copy link
Collaborator Author

I'll probably update this PR only after #558 is done. #534 is not so urgent, and likely to conflict with #558

@jorisdral jorisdral force-pushed the jdral/configurable-faults branch from 17a7108 to 58deec5 Compare June 17, 2025 11:10
@jorisdral
Copy link
Collaborator Author

It's been a while, but I've updated this PR and it should be ready for a review again. The updated diff is now smaller, because there is no renaming of type parameters, and I decided not to include StaticMaybe.

@jorisdral jorisdral marked this pull request as ready for review June 17, 2025 11:12
Faults can only be injected into a mocked HasFS, but not all the SUTs we test
use a mocked HasFS. If the SUT does not make use of a mocked HasFS then the
result of fault injection will always be InjectFaultAccidentalSuccess. This PR
adds some boilerplate for statically enabling/disabling fault injection
depending on the SUT.

Fault injection is then enabled for the following SUTs:
* The "real" implementation in IO using a mocked HasFS
* The "real" implementation in IOSim using a mocked HasFS

Fault injection is then disabled for the following SUTs:
* The reference implementation: it does not use a HasFS
* The "real" implementation in IO using the real HasFS: it uses the real file
  system
@jorisdral jorisdral force-pushed the jdral/configurable-faults branch from 58deec5 to 06c7541 Compare June 30, 2025 15:50
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