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

Test running out of disk space #121

Open
adamgundry opened this issue Feb 5, 2019 · 1 comment
Open

Test running out of disk space #121

adamgundry opened this issue Feb 5, 2019 · 1 comment
Labels
enhancement re: testsuite Conerning the test suite

Comments

@adamgundry
Copy link
Contributor

We ought to have a test for what happens when the disk is full. This can be modelled as in #58 using tmpfs, but doing so requires root privileges. Perhaps that's okay though.

Are there any other good options? I wondered about creating a mock file handle implementation that simulates disk full behaviour after a certain number of bytes have been written...

@stepcut
Copy link
Member

stepcut commented Apr 30, 2019

Using tmpfs would make that particular test Linux-only. Obviously that is still better than no test at all. It is certainly the most accurate test since the file system really does run out of space.

I like the idea of a mock file handle implementation. Conveniently we already abstract out the key FHandle, open, and write in FileIO so that we can have different implementations for win32 vs everybody else.

It seems like we would add src-test/win32, src-test/linux, where the FHandle has a quota value we can set dynamically. When the quota is hit we can throw whatever error was actually be thrown?

It would be neat to generalize this for use with other applications, but this would be sufficient for us I think.

@andreasabel andreasabel added re: testsuite Conerning the test suite enhancement labels Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement re: testsuite Conerning the test suite
Projects
None yet
Development

No branches or pull requests

3 participants