From 9d9f3bf5aa29a7bdd7dd1abfa879eab1647b751a Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Wed, 16 Sep 2026 23:50:12 +0200 Subject: smoketest: T9316: use get_vrf_pids() for the remaining VRF process probes The other smoketests checking that a service runs inside a VRF matched the process name against the raw output of "ip vrf pids ", where it can also hit the PID column. Use get_vrf_pids() and match the name column exactly - it is the kernel comm (ip/ipvrf.c prints the "Name:" field of /proc//status), so it is always a bare short name. --- smoketest/scripts/cli/test_service_https.py | 6 +++--- 1 file changed, 3 insertions(+), 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 0f4330153..93a4dff3d 100755 --- a/smoketest/scripts/cli/test_service_https.py +++ b/smoketest/scripts/cli/test_service_https.py @@ -28,8 +28,8 @@ from base_vyostest_shim import ignore_warning 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 cmdl 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 +248,8 @@ class TestHTTPSService(VyOSUnitTestSHIM.TestCase): self.cli_commit() # Verify nginx is running inside the VRF - tmp = cmdl(['ip', 'vrf', 'pids', vrf]) - self.assertIn(PROCESS_NAME, tmp) + vrf_procs = [name for _, name in get_vrf_pids(vrf)] + self.assertIn(PROCESS_NAME, vrf_procs) self.cli_delete(['interfaces', 'dummy', interface]) self.cli_delete(['vrf', 'name', vrf]) -- cgit v1.2.3