diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2024-04-24 14:29:59 +1000 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2024-04-25 00:00:34 +0200 |
commit | 2681366966e3158ccdcd4a13ecc3978b6ba06459 (patch) | |
tree | a38fdfe801326599e1e67535a13e7dbefc80492f /test/pasta_options | |
parent | 0804fdbc28418883f479fde1beb24c620087fe17 (diff) | |
download | passt-2681366966e3158ccdcd4a13ecc3978b6ba06459.tar passt-2681366966e3158ccdcd4a13ecc3978b6ba06459.tar.gz passt-2681366966e3158ccdcd4a13ecc3978b6ba06459.tar.bz2 passt-2681366966e3158ccdcd4a13ecc3978b6ba06459.tar.lz passt-2681366966e3158ccdcd4a13ecc3978b6ba06459.tar.xz passt-2681366966e3158ccdcd4a13ecc3978b6ba06459.tar.zst passt-2681366966e3158ccdcd4a13ecc3978b6ba06459.zip |
test: Slight simplification to pasta log tests
test/pasta_options/log_to_file contains a couple of rudimentary tests
where we start pasta with an interactive shell, then immediately exit it.
We can achieve the same thing by using /bin/true as the command to pasta.
This also means that waiting for pasta to start, waiting for the executed
command to complete and for pasta to clean up are all handled by simply
waiting for pasta to complete in the foreground, so there's no need for an
additional sleep.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'test/pasta_options')
-rw-r--r-- | test/pasta_options/log_to_file | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/test/pasta_options/log_to_file b/test/pasta_options/log_to_file index fcdd553..f100216 100644 --- a/test/pasta_options/log_to_file +++ b/test/pasta_options/log_to_file @@ -33,15 +33,11 @@ test Log creation set PORTS -t 10001,10002 -u 10001,10002 set LOG_FILE __STATEDIR__/pasta.log -passt ./pasta -l __LOG_FILE__ -passtb exit -sleep 1 +passt ./pasta -l __LOG_FILE__ -- /bin/true check [ -s __LOG_FILE__ ] test Log truncated on creation -passt ./pasta -l __LOG_FILE__ -passtb exit -sleep 1 +passt ./pasta -l __LOG_FILE__ -- /bin/true check [ $(cat __LOG_FILE__ | wc -l) -eq 1 ] test Maximum log size |