overhaul test case completely and make sure we reset errno as pointed out by Riaz Rahaman
1 file changed