libtraceevent: Fix BTF utest host dependencies
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest2 patches 0 repliesNew
- v12 patches 1 replySuperseded
Changes in v2 from the cover letter
- In patch 1, fold the read_full() call into CU_TEST() so that future CUnit failure output reports the actual failing expression instead of only "ret == 0", as suggested by Steven.
- No code changes in patch 2.
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | libtraceevent utest: Handle short reads when reading BTFutest/ | +31 | 0 replies | |
| 2/2 | libtraceevent utest: Avoid host-specific getname_flags outpututest/ | +19 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 0/2] libtraceevent: Fix BTF utest host dependencies
Fix two independent host-dependent failures in the BTF utest.
The first patch handles short reads from /sys/kernel/btf/vmlinux after mmap() fails. On a Rocky Linux 9.7 system, mmap() fails with ENODEV and a single read() returns 4096 bytes from a 5150407-byte BTF file, while a read loop returns the full file.
The second patch avoids failing the exact getname_flags() output check when the host kernel BTF has extra arguments appended after the expected arguments. On the same system, getname_flags() has a third parameter named "empty", so tep_btf_print_args() correctly prints:
getname_flags(filename=0x7ffe7d33f3d0, flags=0, empty=0x0)
Validation was done on x86_64 Rocky Linux 9.7, kernel 5.14.0-570.42.2.el9_6.x86_64:
make -j$(nproc) make test ./utest/trace-utest -r traceevent
All commands completed successfully after this series.
Changes since v1:
- In patch 1, fold the read_full() call into CU_TEST() so that future CUnit failure output reports the actual failing expression instead of only "ret == 0", as suggested by Steven.
- No code changes in patch 2.
Cao Ruichuang (2):
libtraceevent utest: Handle short reads when reading BTF libtraceevent utest: Avoid host-specific getname_flags output
utest/traceevent-utest.c | 52 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 50 insertions(+), 2 deletions(-)
Signature · 1 line
2.39.5 (Apple Git-154)