From ab5fabf231284ab094187da9fabbe18b92a2d52b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= Date: Tue, 9 Sep 2025 09:03:42 +0000 Subject: [PATCH] ci: 057-mqttbroker.t: fix random issue in firewall check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We’re seeing following random test failures: --- .gitlab/tests/cram/generic/acceleration-plan-components/057-mqttbroker.t +++ .gitlab/tests/cram/generic/acceleration-plan-components/057-mqttbroker.t.err @@ -40,6 +40,7 @@ $ R "iptables -nvL | grep 1883 | grep -v '^Chain'" 0 0 ACCEPT 6 -- lo * 0.0.0.0/0 0.0.0.0/0 tcp dpt:1883 $ R "iptables -nvL | grep 8883 | grep -v '^Chain'" + 722 78883 ACCEPT 0 -- lo * 0.0.0.0/0 0.0.0.0/0 0 0 ACCEPT 6 -- br-lan * 0.0.0.0/0 0.0.0.0/0 tcp dpt:8883 which seems to be caused by a wrong grep pattern for generic number 8883, so lets fix it by adding dpt: prefix to the grep pattern to filter out proper iptables rules. Fixes: PPW-883 Link: https://gitlab.com/prpl-foundation/prplos/prplos/-/jobs/11266235778#L109 Signed-off-by: Petr Štetiar --- .../generic/acceleration-plan-components/057-mqttbroker.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab/tests/cram/generic/acceleration-plan-components/057-mqttbroker.t b/.gitlab/tests/cram/generic/acceleration-plan-components/057-mqttbroker.t index ca084141bb..d1de4aaffd 100644 --- a/.gitlab/tests/cram/generic/acceleration-plan-components/057-mqttbroker.t +++ b/.gitlab/tests/cram/generic/acceleration-plan-components/057-mqttbroker.t @@ -37,9 +37,9 @@ Check the root datamodel settings: Check that firewall is configured properly: - $ R "iptables -nvL | grep 1883 | grep -v '^Chain'" + $ R "iptables -nvL | grep dpt:1883 | grep -v '^Chain'" 0 0 ACCEPT 6 -- lo * 0.0.0.0/0 0.0.0.0/0 tcp dpt:1883 - $ R "iptables -nvL | grep 8883 | grep -v '^Chain'" + $ R "iptables -nvL | grep dpt:8883 | grep -v '^Chain'" 0 0 ACCEPT 6 -- br-lan * 0.0.0.0/0 0.0.0.0/0 tcp dpt:8883 Check if local connections work: