ci: cram: fix operational prplmesh_utils.sh status tests

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 <lu.dai@mind.be>
Signed-off-by: Petr Štetiar <petr.stetiar@prplfoundation.org>
This commit is contained in:
Petr Štetiar 2025-11-19 16:49:32 +00:00
parent 616b99d01f
commit 176b975c80
No known key found for this signature in database
GPG Key ID: 58EE120F30CC02D3
5 changed files with 40 additions and 35 deletions

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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: