From 33ce95cad08d40aca84e254a26547aac5054e232 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Sun, 7 Feb 2021 12:52:35 +0100 Subject: [PATCH] debian: Make the autopkgtest more resilient (Closes: #980111) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Debian autopkgtest would fail with new PAM introduced in Debian bullseye. Add a little loop to wait a little longer for the changes to propagate. Signed-off-by: Ondřej Surý --- debian/tests/py-frr-reload | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/debian/tests/py-frr-reload b/debian/tests/py-frr-reload index e2c97e8744..6dfef33f08 100755 --- a/debian/tests/py-frr-reload +++ b/debian/tests/py-frr-reload @@ -22,7 +22,15 @@ sed -e '/^ip route 198.51.100.0\/28 127.0.0.1/ c ip route 198.51.100.64/28 127.0 service frr reload -vtysh -c 'show running-config' | grep -q 'ip route 198.51.100.64/28 127.0.0.1' +# wait for the new config to load +for __t in $(seq 1 10); do + if vtysh -c 'show running-config' | grep -q 'ip route 198.51.100.64/28 127.0.0.1'; then + break + fi + sleep "$__t" +done + +# fail if the old config is still loaded if vtysh -c 'show running-config' | grep -q 'ip route 198.51.100.0/28 127.0.0.1'; then exit 1 fi