in reply to Spoof /dev/ttyS0

Possibly you can supply a different device name to your drivers and trick them into opening a pipe to your Perl simulator. Also consider whether you really want to do such a low-level emulation and can't (for example) override the read_serial() function in your program.

Replies are listed 'Best First'.
Re^2: Spoof /dev/ttyS0
by akujbida (Acolyte) on Sep 25, 2008 at 05:45 UTC
    Indeed, this is what I had been doing, but I am not happy about modifying the driver code, then having to have config setting somewhere to flip between test mode and production mode. There's several drivers and it starts to get messy, and introduces uncertainty about what is being tested (I did have an instance of getting all okay then finding out in the field that it was only okay with the mockup).