Skip to content
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

Feature Request: FailFS #8

Open
0xDEC0DE opened this issue Mar 11, 2024 · 1 comment
Open

Feature Request: FailFS #8

0xDEC0DE opened this issue Mar 11, 2024 · 1 comment

Comments

@0xDEC0DE
Copy link

0xDEC0DE commented Mar 11, 2024

The MemFS is great for unit tests, and I absolutely adore your implementation. But it does present challenges when attempting to test failure modes, since it, you know, works really well.

I was able to achieve limited success testing failure-to-write scenarios by loading an RoFS view over the MemFS and running tests, and I thought perhaps there would be utility in taking that idea further.

So I came up with this for my tests:

retr0h/gilt@6293c13

...and some snippets of how it is implemented/used:

retr0h/gilt@52f0dda

It's fidgety, cantankerous, and prone to panics if you don't set it up right, but there might be the precursor to something useful if left in more capable hands.

Would this be worth developing further?

@psadac
Copy link
Member

psadac commented May 9, 2024

Your idea and your implementation is very clever, but it's too panicky for my taste. So I have implemented a much dumber one, probably less panic friendly, which only necessitates only one function to generate failures. However I am not sure it will work for you.

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

No branches or pull requests

2 participants