selftests: drv-net: Add bpftool util

Add bpf utility to simplify the use of bpftool for XDP tests included in
this series.

Signed-off-by: Mohsin Bashir <mohsin.bashr@gmail.com>
Link: https://patch.msgid.link/20250710184351.63797-2-mohsin.bashr@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Mohsin Bashir
2025-07-10 11:43:47 -07:00
committed by Jakub Kicinski
parent fadd1e6231
commit a339dd699a
2 changed files with 5 additions and 1 deletions

View File

@@ -175,6 +175,10 @@ def tool(name, args, json=None, ns=None, host=None):
return cmd_obj
def bpftool(args, json=None, ns=None, host=None):
return tool('bpftool', args, json=json, ns=ns, host=host)
def ip(args, json=None, ns=None, host=None):
if ns:
args = f'-netns {ns} ' + args