From 176b975c80bee80b4a0c764130f8b35fd748d880 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= Date: Wed, 19 Nov 2025 16:49:32 +0000 Subject: [PATCH] ci: cram: fix operational prplmesh_utils.sh status tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently the prplMesh test pipes the prplmesh_utils.sh status output (including PIDs) into LC_ALL=C sort and then matches the full lines, which makes the check sensitive to ASCII PID ordering once PIDs cross digit boundaries and results in random false negatives as seen in PPW-881. So lets strip the leading PIDs before sorting and only assert on the sorted list of beerocks process names to make the agent operational check deterministic and CI-stable. Fixes: PPW-881 Debugged-by: Lu Dai Signed-off-by: Petr Štetiar --- .../arcadyan-mozart/110-prplmesh-dataelements.t | 15 ++++++++------- .../mxl25641-hdk-6/110-prplmesh-dataelements.t | 15 ++++++++------- .gitlab/tests/cram/prpl-haze/100-prplmesh.t | 15 ++++++++------- .../cram/urx851-b0-dk/110-prplmesh-dataelements.t | 15 ++++++++------- .../cram/wnc-freedom/110-prplmesh-dataelements.t | 15 ++++++++------- 5 files changed, 40 insertions(+), 35 deletions(-) diff --git a/.gitlab/tests/cram/arcadyan-mozart/110-prplmesh-dataelements.t b/.gitlab/tests/cram/arcadyan-mozart/110-prplmesh-dataelements.t index e8bb5236bf..b092453368 100644 --- a/.gitlab/tests/cram/arcadyan-mozart/110-prplmesh-dataelements.t +++ b/.gitlab/tests/cram/arcadyan-mozart/110-prplmesh-dataelements.t @@ -176,21 +176,22 @@ Check that prplmesh is operational: $ R logger -t cram "Check that prplmesh is operational" - $ R "/opt/prplmesh/scripts/prplmesh_utils.sh status" | LC_ALL=C sort + $ R "/opt/prplmesh/scripts/prplmesh_utils.sh status" | sed 's/^[0-9]\+ //' | LC_ALL=C sort \x1b[0m (esc) \x1b[0m\x1b[1;32mOK Main radio agent operational (esc) \x1b[1;32moperational test success! (esc) /opt/prplmesh/scripts/prplmesh_utils.sh: status - [0-9]+ beerocks_contro (re) - [0-9]+ beerocks_agent (re) - [0-9]+ beerocks_vendor (re) - [0-9]+ beerocks_fronth (re) - [0-9]+ beerocks_fronth (re) - [0-9]+ beerocks_fronth (re) OK wlan0 radio agent operational OK wlan1 radio agent operational OK wlan2 radio agent operational + beerocks_agent + beerocks_contro + beerocks_fronth + beerocks_fronth + beerocks_fronth + beerocks_vendor executing operational test using bml + ieee1905_transp Check that controller received correct info about wifi subsystem: diff --git a/.gitlab/tests/cram/mxl25641-hdk-6/110-prplmesh-dataelements.t b/.gitlab/tests/cram/mxl25641-hdk-6/110-prplmesh-dataelements.t index 1c0e9d2b2b..6b6cd05c27 100644 --- a/.gitlab/tests/cram/mxl25641-hdk-6/110-prplmesh-dataelements.t +++ b/.gitlab/tests/cram/mxl25641-hdk-6/110-prplmesh-dataelements.t @@ -188,21 +188,22 @@ Check that prplmesh is operational: $ R logger -t cram "Check that prplmesh is operational" - $ R "/opt/prplmesh/scripts/prplmesh_utils.sh status" | LC_ALL=C sort + $ R "/opt/prplmesh/scripts/prplmesh_utils.sh status" | sed 's/^[0-9]\+ //' | LC_ALL=C sort \x1b[0m (esc) \x1b[0m\x1b[1;32mOK Main radio agent operational (esc) \x1b[1;32moperational test success! (esc) /opt/prplmesh/scripts/prplmesh_utils.sh: status - [0-9]+ beerocks_contro (re) - [0-9]+ beerocks_agent (re) - [0-9]+ beerocks_vendor (re) - [0-9]+ beerocks_fronth (re) - [0-9]+ beerocks_fronth (re) - [0-9]+ beerocks_fronth (re) OK wlan0 radio agent operational OK wlan2 radio agent operational OK wlan4 radio agent operational + beerocks_agent + beerocks_contro + beerocks_fronth + beerocks_fronth + beerocks_fronth + beerocks_vendor executing operational test using bml + ieee1905_transp Check that controller received correct info about wifi subsystem: diff --git a/.gitlab/tests/cram/prpl-haze/100-prplmesh.t b/.gitlab/tests/cram/prpl-haze/100-prplmesh.t index 708be79899..68b7186981 100644 --- a/.gitlab/tests/cram/prpl-haze/100-prplmesh.t +++ b/.gitlab/tests/cram/prpl-haze/100-prplmesh.t @@ -191,21 +191,22 @@ Check that prplmesh processes are running: Check that prplmesh is operational: $ R logger -t cram "Check that prplmesh is operational" - $ R "/opt/prplmesh/scripts/prplmesh_utils.sh status" | LC_ALL=C sort + $ R "/opt/prplmesh/scripts/prplmesh_utils.sh status" | sed 's/^[0-9]\+ //' | LC_ALL=C sort \x1b[0m (esc) \x1b[0m\x1b[1;32mOK Main radio agent operational (esc) \x1b[1;32moperational test success! (esc) /opt/prplmesh/scripts/prplmesh_utils.sh: status - [0-9]+ beerocks_contro (re) - [0-9]+ beerocks_agent (re) - [0-9]+ beerocks_vendor (re) - [0-9]+ beerocks_fronth (re) - [0-9]+ beerocks_fronth (re) - [0-9]+ beerocks_fronth (re) OK wlan0 radio agent operational OK wlan1 radio agent operational OK wlan2 radio agent operational + beerocks_agent + beerocks_contro + beerocks_fronth + beerocks_fronth + beerocks_fronth + beerocks_vendor executing operational test using bml + ieee1905_transp Check that prplmesh is in operational state: diff --git a/.gitlab/tests/cram/urx851-b0-dk/110-prplmesh-dataelements.t b/.gitlab/tests/cram/urx851-b0-dk/110-prplmesh-dataelements.t index 4d03a9ae43..f8674a7f4a 100644 --- a/.gitlab/tests/cram/urx851-b0-dk/110-prplmesh-dataelements.t +++ b/.gitlab/tests/cram/urx851-b0-dk/110-prplmesh-dataelements.t @@ -176,21 +176,22 @@ Check that prplmesh is operational: $ R logger -t cram "Check that prplmesh is operational" - $ R "/opt/prplmesh/scripts/prplmesh_utils.sh status" | LC_ALL=C sort + $ R "/opt/prplmesh/scripts/prplmesh_utils.sh status" | sed 's/^[0-9]\+ //' | LC_ALL=C sort \x1b[0m (esc) \x1b[0m\x1b[1;32mOK Main radio agent operational (esc) \x1b[1;32moperational test success! (esc) /opt/prplmesh/scripts/prplmesh_utils.sh: status - [0-9]+ beerocks_contro (re) - [0-9]+ beerocks_agent (re) - [0-9]+ beerocks_vendor (re) - [0-9]+ beerocks_fronth (re) - [0-9]+ beerocks_fronth (re) - [0-9]+ beerocks_fronth (re) OK wlan0 radio agent operational OK wlan2 radio agent operational OK wlan4 radio agent operational + beerocks_agent + beerocks_contro + beerocks_fronth + beerocks_fronth + beerocks_fronth + beerocks_vendor executing operational test using bml + ieee1905_transp Check that controller received correct info about wifi subsystem: diff --git a/.gitlab/tests/cram/wnc-freedom/110-prplmesh-dataelements.t b/.gitlab/tests/cram/wnc-freedom/110-prplmesh-dataelements.t index e503c12b57..cbee803bda 100644 --- a/.gitlab/tests/cram/wnc-freedom/110-prplmesh-dataelements.t +++ b/.gitlab/tests/cram/wnc-freedom/110-prplmesh-dataelements.t @@ -188,21 +188,22 @@ Check that prplmesh is operational: $ R logger -t cram "Check that prplmesh is operational" - $ R "/opt/prplmesh/scripts/prplmesh_utils.sh status" | LC_ALL=C sort + $ R "/opt/prplmesh/scripts/prplmesh_utils.sh status" | sed 's/^[0-9]\+ //' | LC_ALL=C sort \x1b[0m (esc) \x1b[0m\x1b[1;32mOK Main radio agent operational (esc) \x1b[1;32moperational test success! (esc) /opt/prplmesh/scripts/prplmesh_utils.sh: status - [0-9]+ beerocks_contro (re) - [0-9]+ beerocks_agent (re) - [0-9]+ beerocks_vendor (re) - [0-9]+ beerocks_fronth (re) - [0-9]+ beerocks_fronth (re) - [0-9]+ beerocks_fronth (re) OK wlan0 radio agent operational OK wlan1 radio agent operational OK wlan2 radio agent operational + beerocks_agent + beerocks_contro + beerocks_fronth + beerocks_fronth + beerocks_fronth + beerocks_vendor executing operational test using bml + ieee1905_transp Check that controller received correct info about wifi subsystem: