On Sun, Feb 17, 2013 at 10:25:18AM -0700, Tom Christiansen wrote: > Andreas Koenig <andreas.koenig.7os6VVqR@franz.ak.mind.de> wrote > on Sun, 17 Feb 2013 11:39:50 +0100: > > >> I used a USB FOB for my full filesystem test. Easiest thing to fill > >> up. > > ># date > /dev/full > >date: write error: No space left on device > > I tried that, but it exists on neither OpenBSD nor Darwin. > > It would also be nice to have a /dev/eieio that gives random > I/O errors. :) > > Actually, it would be cool to have a > > /dev/errno/ENOSPC > /dev/errno/EIO > /dev/errno/EAGAIN > /dev/errno/ETIMEDOUT > > etc. You get the idea. > > I don't know how to create a pseudo-device that produces a > certain errno for certain operations. I'm not even sure > what sort of interface I want for it. I just know that it > would make testing much easier. You might be interested in libfiu - Fault injection in userspace. See http://blitiri.com.ar/p/libfiu/ I've not used it, and I have no idea whether it works on either OpenBSD or Darwin, but I like the idea. I wonder how useful it would be to run against the perl test suite. Probably not very. We would need specific tests for error conditions, I expect. But running against those tests would be useful. -- Paul Johnson - paul@pjcj.net http://www.pjcj.netThread Previous | Thread Next