From: Hamdy Abou El Anein <info@daylightlinux.ch>
To: nathan@kernel.org, nsc@kernel.org
Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
corentincj@iksaif.net, mmarek@suse.cz
Subject: [PATCH] scripts: extract-vmlinux: return failure when extraction fails
Date: Tue, 1 Dec 2026 23:10:13 +0100 [thread overview]
Message-ID: <20261201221013.16216-1-info@daylightlinux.ch> (raw)
When none of the supported decompression methods yields a kernel
image, extract-vmlinux prints an error but returns the exit status
of echo, which is normally zero. Callers checking the exit status
can therefore mistake an unsuccessful extraction for success.
Explicitly exit with status 1 after the error message, matching
extract-ikconfig's failure convention. Preserve status 2 for invalid
invocations and status 0 for successful extraction.
Tested invalid raw and gzip-compressed input, missing and empty
input, and byte-for-byte extraction of raw, gzip and xz ELF fixtures.
AI assistance: ChatGPT identified the issue, prepared the fix and
commit message, and ran local regression tests.
Fixes: 09d481270d44 ("scripts: add extract-vmlinux")
Signed-off-by: Hamdy Abou El Anein <info@daylightlinux.ch>
---
| 1 +
1 file changed, 1 insertion(+)
--git a/scripts/extract-vmlinux b/scripts/extract-vmlinux
index 266df9bc7a48..947182fff26d 100755
--- a/scripts/extract-vmlinux
+++ b/scripts/extract-vmlinux
@@ -63,3 +63,4 @@ check_vmlinux "$img" cat 0
# Bail out:
echo "$me: Cannot find vmlinux." >&2
+exit 1
--
2.56.1
reply other threads:[~2026-12-01 22:10 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20261201221013.16216-1-info@daylightlinux.ch \
--to=info@daylightlinux.ch \
--cc=corentincj@iksaif.net \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mmarek@suse.cz \
--cc=nathan@kernel.org \
--cc=nsc@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