From f1e05de0092e36926429b25a4fe98c55f41c790a Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 23 May 2021 11:46:04 +0200 Subject: smoketest: ethernet: bugfix RPS CPU validation We always read back the RPS value from eth1 which worked on the CI smoketests, but not when running a smoketest with only one interface e.g. by: $ TEST_ETH="eth2" /usr/libexec/vyos/tests/smoke/cli/test_interfaces_ethernet.py (cherry picked from commit a431adf8676ea377175b91776082eb37d4773e80) --- smoketest/scripts/cli/test_interfaces_ethernet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'smoketest/scripts') diff --git a/smoketest/scripts/cli/test_interfaces_ethernet.py b/smoketest/scripts/cli/test_interfaces_ethernet.py index 772ff248f..bbc5478dc 100755 --- a/smoketest/scripts/cli/test_interfaces_ethernet.py +++ b/smoketest/scripts/cli/test_interfaces_ethernet.py @@ -116,7 +116,7 @@ class EthernetInterfaceTest(BasicInterfaceTest.BaseTest): self.session.commit() for interface in self._interfaces: - cpus = read_file('/sys/class/net/eth1/queues/rx-0/rps_cpus') + cpus = read_file(f'/sys/class/net/{interface}/queues/rx-0/rps_cpus') # remove the nasty ',' separation on larger strings cpus = cpus.replace(',','') cpus = int(cpus, 16) -- cgit v1.2.3