1
0
mirror of https://passt.top/passt synced 2024-10-02 03:55:48 +00:00
passt/test/lib
David Gibson 13ad716f30 tests: Add pane_status command to check for success of issued commands
When we use pane_wait to wait for a command issued to a tmux pane to finish
we have no idea whether the command succeeded or not.  This means that the
test scripts can keep running long after the point something vital has
failed, making it difficult to work out what went wrong.

Add a new pane_status command that checks for success of the issued command
and use it in most places instead of pane_wait.  We still need explicit
pane_wait where we're gathering explicit output with pane_parse, because
the way we check the status with 'echo $?' means we lose track of that
output.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
[sbrivio:
 - instead of quitting the script, make a test fail if a command
    issued in a pane fails during a test, and loop until the status code is
    numeric in pane_status() as a hack to make it a bit more robust
 - retain usage of pane_wait() in iperf3 and teardown functions as we
   interrupt iperf3, passt, and pasta, so a non-zero exit code is expected
 - drop bogus ns_{1,2}_wait() calls in teardown_two_guests(), those
   functions were never implemented
 - use pane_status() for "guest" test directives too
]
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
2022-05-19 15:24:15 +02:00
..
layout test: Add demo for Podman with pasta 2022-02-22 18:34:44 +01:00
perf_report test/lib: Consistent cols, rows, poster attributes for asciinema player 2022-04-07 11:44:35 +02:00
setup tests: Add pane_status command to check for success of issued commands 2022-05-19 15:24:15 +02:00
term tests: Add pane_status command to check for success of issued commands 2022-05-19 15:24:15 +02:00
test tests: Add pane_status command to check for success of issued commands 2022-05-19 15:24:15 +02:00
util test: Drop debugging left-overs in lib/util 2021-10-14 13:15:12 +02:00
video test/lib: Consistent cols, rows, poster attributes for asciinema player 2022-04-07 11:44:35 +02:00