Linux Trace Development
 help / color / mirror / Atom feed
From: Cao Ruichuang <create0818@163.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-trace-devel@vger.kernel.org,
	Tzvetomir Stoyanov <tz.stoyanov@gmail.com>,
	Emil Thorsoe <ethorsoe@tuxera.com>,
	Cao Ruichuang <create0818@163.com>
Subject: [PATCH 0/2] libtraceevent: Fix BTF utest host dependencies
Date: Mon,  1 Jun 2026 18:37:48 +0800	[thread overview]
Message-ID: <20260601103750.68805-1-create0818@163.com> (raw)

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)


             reply	other threads:[~2026-06-01 10:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-01 10:37 Cao Ruichuang [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260601103750.68805-1-create0818@163.com \
    --to=create0818@163.com \
    --cc=ethorsoe@tuxera.com \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=tz.stoyanov@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox