From: Breno Leitao Date: Mon, 14 Jul 2025 09:56:49 +0000 (-0700) Subject: selftests: drv-net: Strip '@' prefix from bpftrace map keys X-Git-Tag: io_uring-6.17-20250815~128^2~95^2~1 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=fd2aadcefbacb4425f54c252ec9cfb8218548eb9;p=linux-block.git selftests: drv-net: Strip '@' prefix from bpftrace map keys The '@' prefix in bpftrace map keys is specific to bpftrace and can be safely removed when processing results. This patch modifies the bpftrace utility to strip the '@' from map keys before storing them in the result dictionary, making the keys more consistent with Python conventions. Signed-off-by: Breno Leitao Link: https://patch.msgid.link/20250714-netpoll_test-v7-2-c0220cfaa63e@debian.org Signed-off-by: Jakub Kicinski --- diff --git a/tools/testing/selftests/net/lib/py/utils.py b/tools/testing/selftests/net/lib/py/utils.py index 5950a643a533..f395c90fb0f1 100644 --- a/tools/testing/selftests/net/lib/py/utils.py +++ b/tools/testing/selftests/net/lib/py/utils.py @@ -217,6 +217,8 @@ def bpftrace(expr, json=None, ns=None, host=None, timeout=None): if one.get('type') != 'map': continue for k, v in one["data"].items(): + if k.startswith('@'): + k = k.lstrip('@') ret[k] = v return ret return cmd_obj