Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: Marcos Paulo de Souza <mpdesouza@suse.com>
To: Miroslav Benes <mbenes@suse.cz>
Cc: Joe Lawrence <joe.lawrence@redhat.com>,
	Josh Poimboeuf <jpoimboe@kernel.org>,
	 Jiri Kosina <jikos@kernel.org>, 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: Fri, 27 Feb 2026 11:28:37 -0300	[thread overview]
Message-ID: <42ab207746352197bc11fc9c2eafcb8663cd1362.camel@suse.com> (raw)
In-Reply-To: <3a4a2d27c241bda76a0b5cf812f7921088d5cbd8.camel@suse.com>

On Thu, 2026-02-26 at 11:34 -0300, Marcos Paulo de Souza wrote:
> On Thu, 2026-02-26 at 13:40 +0100, Miroslav Benes wrote:
> > Hi,
> > 
> > On Mon, 23 Feb 2026, Marcos Paulo de Souza wrote:
> > 
> > > 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
> > 
> > I cannot reproduce it locally on SLE12-SP5. The patched test-
> > ftrace.sh 
> > runs smoothly without 2/2.
> > 
> > linux:~/linux/tools/testing/selftests/livepatch # ./test-ftrace.sh 
> > TEST: livepatch interaction with ftrace_enabled sysctl ... ok
> > TEST: trace livepatched function and check that the live patch
> > remains in effect ... ok
> > TEST: livepatch a traced function and check that the live patch
> > remains in effect ... ok
> > 
> > GNU bash, version 4.3.48(1)-release (x86_64-suse-linux-gnu)
> > 
> > Does "set -x" in the script give you anything interesting?
> 
> Nope:
> 
> boot_livepatch:/mnt/tools/testing/selftests/livepatch # ./test-
> trace.sh
> + cat     
> cat: -: No such file or directory            
> + set_ftrace_enabled 1                                     
> + local can_fail=0
> 
> 
> Same version here:
> GNU bash, version 4.3.48(1)-release (x86_64-suse-linux-gnu)
> 
> I'm using virtme-ng, so I'm not sure if this is related. At the same
> time it works on SLE15-SP4, using the same virtme-ng, but with a
> different bash:
> GNU bash, version 4.4.23(1)-release (x86_64-suse-linux-gnu)
> 
> So I was blaming bash for this issue...

This patch can be skipped. For the record, I discovered that it only
happens when vng is called using --rw, making it to fail on older bash
since it doesn't create overlays for /tmp. If the overlay is added the
issue is gone.

So, this patch can be skipped. Thanks Miroslav for testing!

> 
> > 
> > Miroslav

  reply	other threads:[~2026-02-27 14:28 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
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 [this message]
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=42ab207746352197bc11fc9c2eafcb8663cd1362.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