From: Andrea Cervesato via ltp <ltp@lists.linux.it>
To: lufei <lufei@uniontech.com>
Cc: lufei <lufei@uniontech.com>, ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 1/2] Rewrite ftrace_regression01.sh with new C API
Date: Fri, 27 Mar 2026 10:34:54 +0000 [thread overview]
Message-ID: <69c65d4e.050a0220.3d4e82.a39c@mx.google.com> (raw)
In-Reply-To: <20260304080538.1793-1-lufei@uniontech.com>
Hi lufei,
A few issues need fixing before this can be merged.
[PATCH 1/2]
> +/*\
> + * [Description]
> + *
> + * Regression test for panic while using userstacktrace.
Drop the [Description] tag, it's deprecated.
> +#define FTRACE_FILE_CONTAINS_BUF_SIZE (1024 * 1024)
[...]
> +static inline int file_contains(const char *path, const char *str)
> +{
> + char buf[FTRACE_FILE_CONTAINS_BUF_SIZE];
This puts 1 MiB on the stack. Use SAFE_MALLOC/free or a static buffer
instead.
> + if (!file_contains(TRACE_OPTIONS, "userstacktrace"))
> + tst_brk(TBROK, "Failed to set userstacktrace");
strstr("nouserstacktrace", "userstacktrace") is true, so this check
always passes even when the option is disabled. The original shell
version used grep -q "^userstacktrace" which anchored to line start.
[PATCH 2/2]
> --- /dev/null
> +++ b/testcases/kernel/tracing/ftrace_test/ftrace_regression02.c
The old ftrace_regression02.sh is not deleted by this patch. You need
to remove it, same as you did for ftrace_regression01.sh in patch 1/2.
> + .save_restore = (const struct tst_path_val[]) {
> + {"/proc/sys/kernel/stack_tracer_enabled", NULL, TST_SR_TCONF},
> + {}
> + },
This test doesn't use stack_tracer_enabled. Looks like copy-paste from
ftrace_regression01. Remove it.
The original shell test gated on kernel >= 3.2. Add .min_kver = "3.2"
to preserve that check.
[Both patches]
The runtest/tracing entries still reference the .sh files:
ftrace_regression01 ftrace_regression01.sh
ftrace_regression02 ftrace_regression02.sh
Update them to point to the C binaries.
The Makefile has INSTALL_TARGETS := *.sh ftrace_stress/* which won't
install the new C binaries. It needs updating as well.
Regards,
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2026-03-27 10:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-04 8:05 [LTP] [PATCH 1/2] Rewrite ftrace_regression01.sh with new C API lufei
2026-03-04 8:05 ` [LTP] [PATCH 2/2] Rewrite ftrace_regression02.sh " lufei
2026-03-27 10:34 ` Andrea Cervesato via ltp [this message]
2026-03-30 7:15 ` [LTP] [PATCH v2] Rewrite ftrace_regression tests " lufei
2026-03-30 8:39 ` Andrea Cervesato via ltp
2026-03-31 1:55 ` [LTP] [PATCH v3] " lufei
2026-03-31 7:53 ` Petr Vorel
2026-03-31 7:56 ` Petr Vorel
2026-03-31 18:28 ` Cyril Hrubis
2026-03-31 10:01 ` [LTP] [PATCH v4] " lufei
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=69c65d4e.050a0220.3d4e82.a39c@mx.google.com \
--to=ltp@lists.linux.it \
--cc=andrea.cervesato@suse.com \
--cc=lufei@uniontech.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