civodul pushed a commit to branch main
in repository shepherd.

commit e658ec2d2616a48c21da4667cdf262cc1015c4e5
Author: Ludovic Courtès <[email protected]>
AuthorDate: Sun Mar 2 23:21:24 2025 +0100

    tests: Fix race condition in ‘respawn.sh’.
    
    * tests/respawn.sh: Loop on ‘$herd status test3’.
---
 tests/respawn.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/respawn.sh b/tests/respawn.sh
index 63a98fe..f9444ff 100644
--- a/tests/respawn.sh
+++ b/tests/respawn.sh
@@ -1,5 +1,5 @@
 # GNU Shepherd --- Test respawnable services.
-# Copyright © 2013-2014, 2016, 2023-2024 Ludovic Courtès <[email protected]>
+# Copyright © 2013-2014, 2016, 2023-2025 Ludovic Courtès <[email protected]>
 #
 # This file is part of the GNU Shepherd.
 #
@@ -165,7 +165,7 @@ EOF
 
 $herd load root "$conf"
 until grep "Respawning test3" "$log"; do sleep 0.2; done
-$herd status test3 | grep "running"
+until $herd status test3 | grep "running"; do sleep 0.2; done
 grep "test3 v1" "$log"
 
 # Load a replacement.  This should break the respawn loop by starting the

Reply via email to