mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Golle <daniel@makrotopia.org>
To: "Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Nathan Chancellor" <nathan@kernel.org>,
	"Nicolas Schier" <nsc@kernel.org>,
	"Saravana Kannan" <saravanak@kernel.org>,
	"Ping-Ke Shih" <pkshih@realtek.com>,
	"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
	"David Sterba" <dsterba@suse.com>,
	"Bryan O'Donoghue" <bryan.odonoghue@linaro.org>,
	"Hariharan Basuthkar" <quic_hbasuthk@quicinc.com>,
	"Jeff Hugo" <jeff.hugo@oss.qualcomm.com>,
	"Filipe Manana" <fdmanana@suse.com>,
	"Bitterblue Smith" <rtl8821cerfe2@gmail.com>,
	"Wei Yang" <richard.weiyang@gmail.com>,
	"Takashi Iwai" <tiwai@suse.de>,
	"Aurabindo Pillai" <aurabindo.pillai@amd.com>,
	"Chih-Kang Chang" <gary.chang@realtek.com>,
	"David Lechner" <dlechner@baylibre.com>,
	"Daniel Golle" <daniel@makrotopia.org>,
	"Miguel Ojeda" <ojeda@kernel.org>, "Gary Guo" <gary@garyguo.net>,
	"Tamir Duberstein" <tamird@kernel.org>,
	"Thomas Weißschuh" <linux@weissschuh.net>,
	"Pagadala Yesu Anjaneyulu" <pagadala.yesu.anjaneyulu@intel.com>,
	"Bartosz Golaszewski" <brgl@kernel.org>,
	"Jorge Ramirez-Ortiz" <jorge.ramirez@oss.qualcomm.com>,
	"Masahiro Yamada" <masahiroy@kernel.org>,
	"Guenter Roeck" <linux@roeck-us.net>,
	"Aleksander Jan Bajkowski" <olek2@wp.pl>,
	"Boris Burkov" <boris@bur.io>,
	"Blake Jones" <blakejones@google.com>,
	"Jonathan Corbet" <corbet@lwn.net>,
	"Mauro Carvalho Chehab" <mchehab+huawei@kernel.org>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-kbuild@vger.kernel.org
Subject: [PATCH v5 2/4] scripts/jobserver-exec: propagate child exit status
Date: Wed, 27 May 2026 20:32:18 +0100	[thread overview]
Message-ID: <660368ca16e2d3845577a9fd157d2f37f0e09e85.1779908995.git.daniel@makrotopia.org> (raw)
In-Reply-To: <cover.1779908995.git.daniel@makrotopia.org>

main() called JobserverExec().run() and discarded its return value,
then the script exited with the implicit status 0. As a result, any
Makefile that wired a build step through jobserver-exec saw the step
silently succeed even when the wrapped command had failed.

Two in-tree callers were affected:

  Documentation/devicetree/bindings/Makefile
    cmd_chk_style runs a python checker via jobserver-exec and uses
    "&& touch $@ || true" so failures leave the stamp file untouched
    and the next make rerun reports them again. The swallowed exit
    code made the stamp file get created even on failure, caching the
    failed run and hiding the reported issues until the inputs change.

  scripts/Makefile.vmlinux_o
    cmd_gen_initcalls_lds runs scripts/generate_initcall_order.pl via
    jobserver-exec; a perl failure was masked by the wrapper.

Return the subprocess exit code from main() and pass it to sys.exit()
so the wrapped command's status reaches make.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
v5: new patch; prereq for chk_style in 3/4 so style failures
    leave the stamp file untouched instead of being cached

 scripts/jobserver-exec | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/jobserver-exec b/scripts/jobserver-exec
index 758e947a6fb9..21b319e6c9a5 100755
--- a/scripts/jobserver-exec
+++ b/scripts/jobserver-exec
@@ -28,8 +28,8 @@ def main():
         sys.exit("usage: " + name +" command [args ...]\n" + __doc__)
 
     with JobserverExec() as jobserver:
-        jobserver.run(sys.argv[1:])
+        return jobserver.run(sys.argv[1:])
 
 
 if __name__ == "__main__":
-    main()
+    sys.exit(main())
-- 
2.54.0

  parent reply	other threads:[~2026-05-27 19:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-27 19:31 [PATCH v5 0/4] dt-bindings: automated coding style check for DTS examples Daniel Golle
2026-05-27 19:32 ` [PATCH v5 1/4] dt-bindings: add DTS style checker Daniel Golle
2026-06-09 16:19   ` Krzysztof Kozlowski
2026-05-27 19:32 ` Daniel Golle [this message]
2026-06-09 17:08   ` [PATCH v5 2/4] scripts/jobserver-exec: propagate child exit status Krzysztof Kozlowski
2026-06-13 17:39   ` Nicolas Schier
2026-05-27 19:32 ` [PATCH v5 3/4] dt-bindings: wire style checker into dt_binding_check Daniel Golle
2026-06-13  9:58   ` Nicolas Schier
2026-05-27 19:32 ` [PATCH v5 4/4] dt-bindings: add self-test fixtures for style checker Daniel Golle
2026-06-10 18:38 ` [PATCH v5 0/4] dt-bindings: automated coding style check for DTS examples Rob Herring

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=660368ca16e2d3845577a9fd157d2f37f0e09e85.1779908995.git.daniel@makrotopia.org \
    --to=daniel@makrotopia.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=aurabindo.pillai@amd.com \
    --cc=blakejones@google.com \
    --cc=boris@bur.io \
    --cc=brgl@kernel.org \
    --cc=bryan.odonoghue@linaro.org \
    --cc=conor+dt@kernel.org \
    --cc=corbet@lwn.net \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=dsterba@suse.com \
    --cc=fdmanana@suse.com \
    --cc=gary.chang@realtek.com \
    --cc=gary@garyguo.net \
    --cc=jeff.hugo@oss.qualcomm.com \
    --cc=jorge.ramirez@oss.qualcomm.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=linux@weissschuh.net \
    --cc=masahiroy@kernel.org \
    --cc=mchehab+huawei@kernel.org \
    --cc=nathan@kernel.org \
    --cc=nsc@kernel.org \
    --cc=ojeda@kernel.org \
    --cc=olek2@wp.pl \
    --cc=pagadala.yesu.anjaneyulu@intel.com \
    --cc=pkshih@realtek.com \
    --cc=quic_hbasuthk@quicinc.com \
    --cc=richard.weiyang@gmail.com \
    --cc=robh@kernel.org \
    --cc=rtl8821cerfe2@gmail.com \
    --cc=saravanak@kernel.org \
    --cc=tamird@kernel.org \
    --cc=tiwai@suse.de \
    /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

all inboxes | Powered by JetHome®