All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] libtraceevent: Fix BTF utest host dependencies
@ 2026-06-01 10:37 Cao Ruichuang
  2026-06-01 10:37 ` [PATCH 1/2] libtraceevent utest: Handle short reads when reading BTF Cao Ruichuang
  2026-06-01 10:37 ` [PATCH 2/2] libtraceevent utest: Avoid host-specific getname_flags output Cao Ruichuang
  0 siblings, 2 replies; 4+ messages in thread
From: Cao Ruichuang @ 2026-06-01 10:37 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: linux-trace-devel, Tzvetomir Stoyanov, Emil Thorsoe,
	Cao Ruichuang

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.

Cao Ruichuang (2):
  libtraceevent utest: Handle short reads when reading BTF
  libtraceevent utest: Avoid host-specific getname_flags output

 utest/traceevent-utest.c | 53 ++++++++++++++++++++++++++++++++++++++--
 1 file changed, 51 insertions(+), 2 deletions(-)

-- 
2.39.5 (Apple Git-154)


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-06-01 14:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-01 10:37 [PATCH 0/2] libtraceevent: Fix BTF utest host dependencies Cao Ruichuang
2026-06-01 10:37 ` [PATCH 1/2] libtraceevent utest: Handle short reads when reading BTF Cao Ruichuang
2026-06-01 14:11   ` Steven Rostedt
2026-06-01 10:37 ` [PATCH 2/2] libtraceevent utest: Avoid host-specific getname_flags output Cao Ruichuang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.