test.cmds_exec() takes a list of lists with commands to be sent to a
console, returns None on success and an error message on failure.
The list can consist of up to three entries, 2 + 3 are optional:
[ cmd, expect-regex, timeout]
Signed-off-by: Jan Lindemann <jan@janware.com>
cmd_exec() sometimes returned the command in the output albeit
echo_cmd=False was specified, notably if the command contained a
newline.
Signed-off-by: Jan Lindemann <jan@janware.com>
It's wrong to use line buffering in fdopen(..., ".b"), there's no
such thing as a line in binary data, also see
https://bugs.python.org/issue32236
Signed-off-by: Jan Lindemann <jan@janware.com>