Greetings Freaks -
I've been around a while, in the electronics business, and have done more than my share of testing. But, this one has me stumped. I have had to revisit 5 year old code that uses fatFS on microSD cards. And, I have had to make some architectural changes that I really don't want to, changes that effect error handling. fatFS provides a large number of error codes, many involving the internal working of SD cards.
My question is about testing error cases. We have no access to the internal workings of the cards, so there is no "natural" way to have the errors happen to verify proper handling. If we hack the fatFS code to create errors, then you can't tell if fatFS, it self, will behave in an appropriate way, consistent with the test error.
What do folks do in cases like this, where you have no practical way to create errors for which you are trying to test the handling?