I don't know how to do a pure software solution.
If you want coverage of the BBB Hardware all the way to the pin, I would do a simple loop-back test, where the pins are connected in pairs, and you wiggle one pin as an output, and see if its paired pin can see it as an input.
Then reverse and wiggle the second pin, and see if the first sees it.
Very simple hardware. Just a bunch of pins shorted to each other.
--- Graham
==