From c5824479fcf024a5eb030cc492e64f02bda7dfaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= Date: Tue, 12 May 2026 09:50:22 +0200 Subject: [PATCH] ci: cram: 110-prplmesh-dataelements: assert agent count per testbed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit testbed-02 grew a HomePlug-backhauled TL-WPA7817 (PCF-2504), so prplmesh_cli now reports 2 connected agents on that runner while testbed-01 still has only the DUT. Loosen the agent-count line in the operational-state block to a regex and add a separate assertion that gates the expected count on $CI_RUNNER_DESCRIPTION, matching the existing testbed-02 idiom in .gitlab/testbed.yml and .gitlab/cdrouter.yml. Fixes: PCF-2578 References: PCF-2504 Assisted-by: claude:opus-4-7:1m-context Signed-off-by: Petr Štetiar --- .../tests/cram/wnc-freedom/110-prplmesh-dataelements.t | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.gitlab/tests/cram/wnc-freedom/110-prplmesh-dataelements.t b/.gitlab/tests/cram/wnc-freedom/110-prplmesh-dataelements.t index c415d71abb..d1cdacee7b 100644 --- a/.gitlab/tests/cram/wnc-freedom/110-prplmesh-dataelements.t +++ b/.gitlab/tests/cram/wnc-freedom/110-prplmesh-dataelements.t @@ -189,7 +189,7 @@ Check that prplmesh is operational: Mode: Agent+Controller Controller: bridge MAC: (AC:91:9B|58:E4:03):[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2} (re) - 1 agent(s) connected + [1-9]+ agent\(s\) connected (re) Agent: MAC address: [0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2} (re) management mode: Multi-AP-Controller-and-Agent @@ -209,6 +209,13 @@ Check that prplmesh is operational: current state: OPERATIONAL best state: OPERATIONAL +Assert agent count matches testbed topology (testbed-01: 1, testbed-02: 2 with HomePlug-backhauled TL-WPA7817, see PCF-2504): + + $ ACT=$(R "/opt/prplmesh/bin/prplmesh_cli -c status -o pretty" \ + > | sed -nE 's/.* ([0-9]+) agent\(s\) connected.*/\1/p') + $ if echo "$CI_RUNNER_DESCRIPTION" | grep -q testbed-02; then EXP=2; else EXP=1; fi + $ test "$ACT" = "$EXP" || echo "agent count mismatch: actual=$ACT expected=$EXP" + Check that controller received correct info about wifi subsystem: $ R logger -t cram "Check controller info about network"