add optional device parameter to read tests

This should make it possible to test manually, even if the default
device detection fails.