def do_oob_test(io1, io2): rb = gensio.get_random_bytes(512) print(" testing io1 to io2") utils.test_dataxfer_oob(io1, io2, rb) print(" testing io2 to io1") utils.test_dataxfer_oob(io2, io1, rb) print(" Success!")
def do_stream_test(io1, io2): rb = gensio.get_random_bytes(10) print(" testing io1 to io2") utils.test_dataxfer_stream(io1, io2, rb, 2) print(" testing io2 to io1") utils.test_dataxfer_stream(io2, io1, rb, 1) print(" Success!")
def test_stdio_small(): print("Test stdio small echo") rb = gensio.get_random_bytes(512) io = utils.alloc_io(o, "stdio,cat", chunksize=64) utils.test_dataxfer(io, io, rb) utils.io_close(io) print(" Success!")
def test_ipmisol_large(): print("Test ipmisol large") isim = ipmisimdaemon.IPMISimDaemon(o) io1 = utils.alloc_io(o, "serialdev,/dev/ttyPipeA0,115200") io2 = utils.alloc_io( o, "ipmisol,lan -U ipmiusr -P test -p 9001 localhost,115200") rb = gensio.get_random_bytes(104857) utils.test_dataxfer(io1, io2, rb, timeout=10000) utils.io_close(io1) utils.io_close(io2) print(" Success!")
#!/usr/bin/python import gensio from dataxfer import test_transfer rb = gensio.get_random_bytes(512) test_transfer("telnet small random", rb, "3023:telnet:100:/dev/ttyPipeA0:9600N81\n", "telnet,tcp,localhost,3023", "serialdev,/dev/ttyPipeB0,9600N81", timeout=5000)
#!/usr/bin/python import gensio from dataxfer import test_transfer rb = gensio.get_random_bytes(1048576) test_transfer("stdio large random", rb, "0:raw:100:/dev/ttyPipeA0:115200N81\n", None, "serialdev,/dev/ttyPipeB0,115200N81", timeout=100000)