2

(First question here ...)

I'm a software engineer, and in my team I'm also in charge of checking all logged errors that our servers or "fat clients" produce. When I see something new, I'm meant to fill-in a bug report, which, if at all possible, should include steps to reproduce the bug.

My question is: how can I try to reproduce bugs that arise from IO errors while reading/writing files (most likely due to either defect drives (USB sticks?), or unreliable network drives)?

It must be so that some drive/directory is visible and accessible from the "fat client" (Java), and only when trying to read or write from it do we get an error.

3

What you are asking for is a fault injection. Unfortunatelly, you are not enough specific in what kind of error you want to reach and there is a lot of different states from bad blocks causing read-write errors to no rights or disconnected devices during the process, etc.

This answer on another project will make you happy under Linux: https://unix.stackexchange.com/a/144200/34745

I do not know anything like this under Windows. Surely something like this exist (with a side effects), so if there is enough for you to simulate network drive errors, you can use the Linux with Samba.

Update: There is a lot of professional tools described on Wikipedia article about fault injection. https://en.wikipedia.org/wiki/Fault_injection

Or you can search Internet on "fault injection" which suits you needs.

  • 1
    This does not specifically answer my question, but since our application "should be" cross-platform, I could request access to some Linux VM, and use that to reproduce IO errors. Also, it should help me to know what terms to use to search in the Internet. – Sebastien Diot Apr 19 '16 at 8:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.