<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">I use libbpf to write demo </div><div dir="ltr">demo github link: <a href="https://github.com/ANOLASC/RetriveBTFDemo">https://github.com/ANOLASC/RetriveBTFDemo</a><br></div><div dir="ltr"><br></div><div>I read bpf.c and commit <a href="https://gitlab.com/strace/strace/-/commit/e921913e" rel="noreferrer" target="_blank">e921913e</a> to learn the reimplementation of some functions in libbpf.</div><div><br></div><div>I'm trying to write a unit test for it. But I am confused about the unit test. I think my target is eBPF loader programs, which load the eBPF program into the kernel. And in the process of decoding the loader program, I can get the BTF ID. With the BTF ID, I can finally get and print the BTF information.</div><div><br></div><div>These are my thoughts. Please correct me if I am incorrect. </div></div></div></div>