Re: [PATCH bpf-next v6 6/9] selftests/bpf: derive the bench object list from the sources
| Newsgroups | org.kernel.vger.bpf |
|---|---|
| Message-ID | <ab63b8577423403775e07530032955abc050cb491b93173dcf56c25d10c8b340@mail.kernel.org> |
> The bench binary links every benchs/bench_*.c object, but the link > rule names them one by one in a hand-maintained list - adding a > benchmark means writing its name three times (source file, skeleton > dependency line, link list). Derive the list with a wildcard, as the > per-object skeleton dependency lines already imply: any bench_*.c > placed in benchs/ is compiled and linked in. > > The derived list is sorted, which changes the link order of the bench > objects (previously roughly chronological) and with it the symbol > layout of the binary; no benchmark behaves differently. The trailing > '#' terminator goes away: the list now ends in a variable, so the > append-friendliness it provided no longer applies. > > Signed-off-by: Mykola Lysenko <[email protected]> This isn't a bug, but could this last paragraph be trimmed or corrected? The list still ends in $(OUTPUT)/usdt_2.o rather than a variable, and the '#' could have stayed. Similarly, is it the pattern rule rather than the skeleton dependency lines that already makes any benchs/bench_*.c buildable? The statement that "adding a benchmark means writing its name three times" also doesn't hold for benchmarks without a skeleton like benchs/bench_count.c, which has no dependency line at all. --- AI reviewed your patch. Please fix the bug or email reply why it's not a bug. See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md CI run summary: https://github.com/kernel-patches/bpf/actions/runs/32610372822