aboutgitcodebugslistschat
path: root/test/pasta_options/log_to_file
diff options
context:
space:
mode:
Diffstat (limited to 'test/pasta_options/log_to_file')
-rw-r--r--test/pasta_options/log_to_file11
1 files changed, 4 insertions, 7 deletions
diff --git a/test/pasta_options/log_to_file b/test/pasta_options/log_to_file
index fcdd553..fe50e50 100644
--- a/test/pasta_options/log_to_file
+++ b/test/pasta_options/log_to_file
@@ -33,16 +33,13 @@ 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
-check [ $(cat __LOG_FILE__ | wc -l) -eq 1 ]
+passt ./pasta -l __LOG_FILE__ -- /bin/true & wait
+pout PID2 echo $!
+check head -1 __LOG_FILE__ | grep '^pasta .* [(]__PID2__[)]$'
test Maximum log size
passtb ./pasta --config-net -d -f -l __LOG_FILE__ --log-size $((100 * 1024)) -- sh -c 'while true; do tcp_crr --nolog -P 10001 -C 10002 -6; done'