On Tue, May 6, 2025 at 10:39 PM Andrii Nakryiko andrii.nakryiko@gmail.com wrote:
raw_data = mmap(NULL, end, PROT_READ, MAP_PRIVATE, fd, 0);
if (!ASSERT_NEQ(raw_data, MAP_FAILED, "mmap_btf"))
ASSERT_OK_PTR()?
Don't think that mmap follows libbpf_get_error conventions? I'd keep it as it is.
btf = btf__new_split(raw_data, btf_size, base);
if (!ASSERT_NEQ(btf, NULL, "parse_btf"))
ASSERT_OK_PTR()
Ack.
Do you intend to add more subtests? if not, why even using a subtest structure
The original intention was to add kmod support, but that didn't pan out, see my discussion with Alexei. I can drop the subtest if you want, but I'd probably keep the helper as it is.