Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

selftests: net: py: read ip link info about remote dev

We're already saving the info about the local dev in env.dev
for the tests, save remote dev as well. This is more symmetric,
env generally provides the same info for local and remote end.

While at it make sure that we reliably get the detailed info
about the local dev. nsim used to read the dev info without -d.

Reviewed-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Link: https://patch.msgid.link/20251120021024.2944527-8-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+3 -1
+2
tools/testing/selftests/drivers/net/lib/py/env.py
··· 168 168 169 169 # resolve remote interface name 170 170 self.remote_ifname = self.resolve_remote_ifc() 171 + self.remote_dev = ip("-d link show dev " + self.remote_ifname, 172 + host=self.remote, json=True)[0] 171 173 172 174 self._required_cmd = {} 173 175
+1 -1
tools/testing/selftests/net/lib/py/nsim.py
··· 27 27 self.port_index = port_index 28 28 self.ns = ns 29 29 self.dfs_dir = "%s/ports/%u/" % (nsimdev.dfs_dir, port_index) 30 - ret = ip("-j link show dev %s" % ifname, ns=ns) 30 + ret = ip("-d -j link show dev %s" % ifname, ns=ns) 31 31 self.dev = json.loads(ret.stdout)[0] 32 32 self.ifindex = self.dev["ifindex"] 33 33