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(a)gibson.dropbear.id.au> --- test/pasta_options/log_to_file | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/test/pasta_options/log_to_file b/test/pasta_options/log_to_file index fcdd5538..f1002167 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 -- 2.44.0