in reply to Re: Testing for read() failures on different platforms
in thread Testing for read() failures on different platforms
Very true, we've been discussing that here - more like, well, if it 'very rarely' happens, should we try to catch a failure.
But seeing as we have code that tries to deal intelligently with this scenario, we really should try and test it, just to confirm the code really does what we think it does.
So yes one solution is to not cater for read failures on successfully opened files - then you dont need a test case !-)
But we are (currently) catering for it, and we want to test that accomodation on different platforms - but with the above mentioned difficulty.
FWIW, we are getting a consistent (as in, the same error message) on Linux and Solaris if we replace the dummy directory handle (made with IO::File) with one created by IO::Dir - we get
on both platforms - so that would work for now, but come the day we go to another platform I dont hold much hope that will be robust enough'usage: $dh->seek(POS) at ...'
+++++++++++++++++
#!/usr/bin/perl
use warnings;use strict;use brain;
|
|---|