On Wed, 2024-07-24 at 21:55 -0700, Alexei Starovoitov wrote: [...] > So we can enable such feature in selftests, > but it would have to skip the tests if bpftool is not built > with the right disasm library, hence the value of such > tests will be small. > > It's probably better to make test_progs use > LLVMDisasm* directly and converge on that disasm style > assuming distros have this lib easily available. I agree that the differences in the disassembly are too big. As Yonghong suggested, I checked why bpftool has two disassemblers, this is explained in the commit [0]: > ... To disassemble instructions for JIT-ed programs, bpftool has > relied on the libbfd library. This has been problematic in the past: > libbfd's interface is not meant to be stable and has changed several > times ... I'll update the disassembly patch to use LLVM library (or skip the test if library is not available). [0] eb9d1acf634b ("bpftool: Add LLVM as default library for disassembling JIT-ed programs")