mirror of
https://github.com/torvalds/linux.git
synced 2026-05-22 22:22:08 +02:00
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:
parent
fadd1e6231
commit
a339dd699a
|
|
@ -15,7 +15,7 @@ try:
|
|||
NlError, RtnlFamily, DevlinkFamily
|
||||
from net.lib.py import CmdExitFailure
|
||||
from net.lib.py import bkg, cmd, defer, ethtool, fd_read_timeout, ip, \
|
||||
rand_port, tool, wait_port_listen
|
||||
rand_port, tool, wait_port_listen, bpftool
|
||||
from net.lib.py import fd_read_timeout
|
||||
from net.lib.py import KsftSkipEx, KsftFailEx, KsftXfailEx
|
||||
from net.lib.py import ksft_disruptive, ksft_exit, ksft_pr, ksft_run, \
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user