From d7ad1a5a9e697b3df7f299f10349801b110bce56 Mon Sep 17 00:00:00 2001 From: Vladyslav Tupikin Date: Mon, 23 Mar 2026 18:01:48 +0200 Subject: [PATCH] ci: cram: 125-process-manager: wifi sensing has two instances running Currently process manager CRAM tests using simple pgrep on exact application name, that leads to race condition between rc.d startup and wifi-sensing. It happens because init.d script has the same name as an actual application. As a result, pgrep shows 2 applciations with same name launched. Proposed solution is to use full path to the executables in Process Manager CRAM tests that shows proper number of launched proccesses in the system. Closes: PPW-1633 Signed-off-by: Vladyslav Tupikin --- .gitlab/tests/cram/wifi/process-manager-full.t | 12 ++++++------ .gitlab/tests/cram/wifi/process-manager-smoke.t | 16 ++++++++-------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.gitlab/tests/cram/wifi/process-manager-full.t b/.gitlab/tests/cram/wifi/process-manager-full.t index 7d0d714505..22a84c7d8f 100644 --- a/.gitlab/tests/cram/wifi/process-manager-full.t +++ b/.gitlab/tests/cram/wifi/process-manager-full.t @@ -34,7 +34,7 @@ Check that managing WiFi Sensing works: $ R "ba-cli -l X_PRPLWARE-COM_ProcessManager.Sensing.Enable=0" | tr -d '\n' 0 (no-eol) $ sleep 10 - $ R " pgrep -cf 'wifi-sensing'" + $ R " pgrep -cf '/usr/bin/wifi-sensing'" 0 [1] $ R "ba-cli -l X_PRPLWARE-COM_ProcessManager.Sensing.Status?" | tr -d '\n' @@ -43,7 +43,7 @@ Check that managing WiFi Sensing works: 1 (no-eol) $ R "amx_wait_for "X_PRPLWARE-COM_WiFiSensing." " - $ R "pgrep -cf 'wifi-sensing'" + $ R "pgrep -cf '/usr/bin/wifi-sensing'" 1 $ R "ba-cli -l X_PRPLWARE-COM_ProcessManager.Sensing.Status?" | tr -d '\n' Active (no-eol) @@ -58,7 +58,7 @@ Check that managing pWHM and prplMesh works: $ R "ba-cli -l X_PRPLWARE-COM_ProcessManager.PrplMesh.Status?" | tr -d '\n' Idle (no-eol) - $ R "pgrep -cf beerocks_agent" + $ R "pgrep -cf /opt/prplmesh/bin/beerocks_agent" 0 [1] @@ -70,7 +70,7 @@ Check that managing pWHM and prplMesh works: $ R "ba-cli -l X_PRPLWARE-COM_ProcessManager.PWHM.Status?" | tr -d '\n' Idle (no-eol) - $ R "pgrep -cf 'wld'" + $ R "pgrep -cf '/usr/bin/wld'" 0 [1] @@ -82,7 +82,7 @@ Check that managing pWHM and prplMesh works: $ R "ba-cli -l X_PRPLWARE-COM_ProcessManager.PWHM.Status?" | tr -d '\n' Active (no-eol) - $ R "pgrep -cf 'wld'" + $ R "pgrep -cf '/usr/bin/wld'" 1 $ R "ba-cli -l X_PRPLWARE-COM_ProcessManager.PrplMesh.Enable=1" | tr -d '\n' @@ -94,7 +94,7 @@ Check that managing pWHM and prplMesh works: $ R "ba-cli -l X_PRPLWARE-COM_ProcessManager.PrplMesh.Status?" | tr -d '\n' Active (no-eol) - $ R "pgrep -cf beerocks_agent" + $ R "pgrep -cf /opt/prplmesh/bin/beerocks_agent" 1 # Blocked by PPM-3590. May be not needed because requere additional ~1 min delays diff --git a/.gitlab/tests/cram/wifi/process-manager-smoke.t b/.gitlab/tests/cram/wifi/process-manager-smoke.t index eb10289cf8..f826bb9dad 100644 --- a/.gitlab/tests/cram/wifi/process-manager-smoke.t +++ b/.gitlab/tests/cram/wifi/process-manager-smoke.t @@ -9,14 +9,14 @@ Check the services are enabled by default: Check the processes are actually running: - $ R "pgrep -afc wifi-sensing" - 1 + $ R "pgrep -af /usr/bin/wifi-sensing" + \d+ /usr/bin/wifi-sensing (re) - $ R "pgrep -afc wld" - 1 + $ R "pgrep -af /usr/bin/wld" + \d+ /usr/bin/wld (re) - $ R "pgrep -afc beerocks_agent" - 1 + $ R "pgrep -af /opt/prplmesh/bin/beerocks_agent" + \d+ /opt/prplmesh/bin/beerocks_agent (re) Check that this is reflected in the DM: @@ -34,7 +34,7 @@ Check that managing WiFi Sensing works: $ R "ba-cli -l X_PRPLWARE-COM_ProcessManager.Sensing.Enable=0" | tr -d '\n' 0 (no-eol) $ sleep 10 - $ R "pgrep -cf 'wifi-sensing'" + $ R "pgrep -cf '/usr/bin/wifi-sensing'" 0 [1] $ R "ba-cli -l X_PRPLWARE-COM_ProcessManager.Sensing.Status?" | tr -d '\n' @@ -43,7 +43,7 @@ Check that managing WiFi Sensing works: 1 (no-eol) $ R "amx_wait_for "X_PRPLWARE-COM_WiFiSensing." " - $ R "pgrep -cf 'wifi-sensing'" + $ R "pgrep -cf '/usr/bin/wifi-sensing'" 1 $ R "ba-cli -l X_PRPLWARE-COM_ProcessManager.Sensing.Status?" | tr -d '\n' Active (no-eol)