From 13189cd9e82f4c4cf8ce90bfdef327a59e2e5716 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Sat, 19 Sep 2026 07:42:32 +0200 Subject: smoketest: T9316: match VRF process names by prefix, not equality test_08_dyndns_vrf started failing after the conversion to get_vrf_pids(): AssertionError: 'ddclient' not found in ['ddclient - slee'] "ip vrf pids" prints the kernel comm, which is capped at 15 characters and follows a process rewriting its own title - ddclient advertises its poll state as "ddclient - sleeping for 300 seconds". Comparing the name column for equality is therefore too strict. Add verify_process_in_vrf() to the test shim, matching the name column by prefix and reporting the VRF's process list on failure, and use it for all the name based probes. Matching stays confined to the name column, so a process name still cannot be satisfied by the PID column. The PID based checks in base_interfaces_test.py are unaffected - they compare integers, which a process title does not change. --- smoketest/scripts/cli/test_service_https.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'smoketest/scripts/cli/test_service_https.py') diff --git a/smoketest/scripts/cli/test_service_https.py b/smoketest/scripts/cli/test_service_https.py index 93a4dff3d..e7a2ba60a 100755 --- a/smoketest/scripts/cli/test_service_https.py +++ b/smoketest/scripts/cli/test_service_https.py @@ -29,7 +29,6 @@ from vyos.utils.file import read_file from vyos.utils.file import write_file from vyos.utils.process import call from vyos.utils.process import process_named_running -from vyos.utils.network import get_vrf_pids from vyos.pki import CERT_BEGIN from vyos.pki import encode_certificate from vyos.pki import load_certificate @@ -248,8 +247,7 @@ class TestHTTPSService(VyOSUnitTestSHIM.TestCase): self.cli_commit() # Verify nginx is running inside the VRF - vrf_procs = [name for _, name in get_vrf_pids(vrf)] - self.assertIn(PROCESS_NAME, vrf_procs) + self.verify_process_in_vrf(PROCESS_NAME, vrf) self.cli_delete(['interfaces', 'dummy', interface]) self.cli_delete(['vrf', 'name', vrf]) -- cgit v1.2.3