From 9d3d211b6bd1bb4f6c872f9f938168303508568b Mon Sep 17 00:00:00 2001 From: Jacques de Laval Date: Mon, 22 Feb 2021 15:22:32 +0100 Subject: [PATCH] test: Fix waiting for Finit PID Signed-off-by: Jacques de Laval --- test/runtest.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/runtest.sh b/test/runtest.sh index 8715741d..47d60fc0 100755 --- a/test/runtest.sh +++ b/test/runtest.sh @@ -66,10 +66,8 @@ log "$color_reset" '--' '' finit_ppid=$! for _ in $(seq 1 50); do sleep 0.1 - finit_pid=$(pgrep -P "$finit_ppid") - if [ "$finit_pid" ]; then - break - fi + finit_pid=$(pgrep -P "$finit_ppid") || continue + break done tty=/dev/$(texec cat /sys/class/tty/console/active)