News for hackers. Stuff that matters.
Re:Fear makes you a worse programmer by yellowapple on Monday April 08, 2024 @09:45PM (#39975574)
I feel like if you're unable to get 99% coverage with that then there's probably some dead code that needs pruned.

As for hardware-related problems and race conditions, testing at a higher level of abstraction seems like it'd help more than it'd hurt - in the former case ensuring graceful handling as part of the tests, and in the latter case making the race conditions more likely to hit (and hopefully fix).

Re:Fear makes you a worse programmer by lll-o-lll on Tuesday April 09, 2024 @12:35AM (#39976220)
I see the OP as talking about “integration” style tests (say testing against an api) and not being able to capture all of the OS and similar edge case errors in the test. I do think this is a hard problem, particularly if you don’t design for it from the outset.

It’s a bit of the old classic “reading from the file never returns an ‘access denied’ error, until it does”. There’s ways and means, but let’s not pretend this is simple.