From: Marcos Paulo de Souza <mpdesouza@suse.com>
To: Joe Lawrence <joe.lawrence@redhat.com>
Cc: Josh Poimboeuf <jpoimboe@kernel.org>,
Jiri Kosina <jikos@kernel.org>, Miroslav Benes <mbenes@suse.cz>,
Petr Mladek <pmladek@suse.com>, Shuah Khan <shuah@kernel.org>,
live-patching@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] selftests: livepatch: functions.sh: Workaround heredoc on older bash
Date: Mon, 23 Feb 2026 13:21:43 -0300 [thread overview]
Message-ID: <5ca16692b304185df695e517434b16e59cb15a42.camel@suse.com> (raw)
In-Reply-To: <aZx1ViTc7NJws-rf@redhat.com>
On Mon, 2026-02-23 at 10:42 -0500, Joe Lawrence wrote:
> On Fri, Feb 20, 2026 at 11:12:34AM -0300, Marcos Paulo de Souza
> wrote:
> > When running current selftests on older distributions like SLE12-
> > SP5 that
> > contains an older bash trips over heredoc. Convert it to plain echo
> > calls, which ends up with the same result.
> >
>
> Acked-by: Joe Lawrence <joe.lawrence@redhat.com>
Thanks for the review Joe!
>
> Just curious, what's the bash/heredoc issue? All I could find via
> google search was perhaps something to do with the temporary file
> implementation under the hood.
# ./test-ftrace.sh
cat: -: No such file or directory
TEST: livepatch interaction with ftrace_enabled sysctl ... ^CQEMU:
Terminated
Somehow it doesn't understand the heredoc, but maybe I'm wrong...
either way, the change has the same outcome, so I believe that it
wasn't bad if we could change the cat for two echoes :)
Either way, if Petr or you think that this should be left as it is,
it's fine by me as well, I was just testing the change with an older
rootfs/kernels.
>
> --
> Joe
>
> > Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com>
> > ---
> > tools/testing/selftests/livepatch/functions.sh | 6 ++----
> > 1 file changed, 2 insertions(+), 4 deletions(-)
> >
> > diff --git a/tools/testing/selftests/livepatch/functions.sh
> > b/tools/testing/selftests/livepatch/functions.sh
> > index 8ec0cb64ad94..45ed04c6296e 100644
> > --- a/tools/testing/selftests/livepatch/functions.sh
> > +++ b/tools/testing/selftests/livepatch/functions.sh
> > @@ -96,10 +96,8 @@ function pop_config() {
> > }
> >
> > function set_dynamic_debug() {
> > - cat <<-EOF > "$SYSFS_DEBUG_DIR/dynamic_debug/control"
> > - file kernel/livepatch/* +p
> > - func klp_try_switch_task -p
> > - EOF
> > + echo "file kernel/livepatch/* +p" >
> > "$SYSFS_DEBUG_DIR/dynamic_debug/control"
> > + echo "func klp_try_switch_task -p" >
> > "$SYSFS_DEBUG_DIR/dynamic_debug/control"
> > }
> >
> > function set_ftrace_enabled() {
> >
> > --
> > 2.52.0
> >
next prev parent reply other threads:[~2026-02-23 16:21 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-20 14:12 [PATCH 0/2] kselftests: livepatch: One new test and one fix for older bash Marcos Paulo de Souza
2026-02-20 14:12 ` [PATCH 1/2] selftests: livepatch: test-ftrace: livepatch a traced function Marcos Paulo de Souza
2026-02-23 15:39 ` Joe Lawrence
2026-02-26 12:14 ` Miroslav Benes
2026-03-06 13:45 ` Petr Mladek
2026-02-20 14:12 ` [PATCH 2/2] selftests: livepatch: functions.sh: Workaround heredoc on older bash Marcos Paulo de Souza
2026-02-23 15:42 ` Joe Lawrence
2026-02-23 16:21 ` Marcos Paulo de Souza [this message]
2026-02-26 12:40 ` Miroslav Benes
2026-02-26 14:34 ` Marcos Paulo de Souza
2026-02-27 14:28 ` Marcos Paulo de Souza
2026-02-23 16:37 ` David Laight
2026-03-06 14:30 ` Petr Mladek
2026-03-06 14:38 ` Petr Mladek
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=5ca16692b304185df695e517434b16e59cb15a42.camel@suse.com \
--to=mpdesouza@suse.com \
--cc=jikos@kernel.org \
--cc=joe.lawrence@redhat.com \
--cc=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=live-patching@vger.kernel.org \
--cc=mbenes@suse.cz \
--cc=pmladek@suse.com \
--cc=shuah@kernel.org \
/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