Devicetree
 help / color / mirror / Atom feed
From: Nicolas Schier <nsc@kernel.org>
To: Daniel Golle <daniel@makrotopia.org>
Cc: "Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Nathan Chancellor" <nathan@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>,
	"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: Re: [PATCH v5 2/4] scripts/jobserver-exec: propagate child exit status
Date: Sat, 13 Jun 2026 19:39:04 +0200	[thread overview]
Message-ID: <ai2VuFWUxVRGjGKR@levanger> (raw)
In-Reply-To: <660368ca16e2d3845577a9fd157d2f37f0e09e85.1779908995.git.daniel@makrotopia.org>

On Wed, May 27, 2026 at 08:32:18PM +0100, Daniel Golle wrote:
> 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

Good catch, thanks!

For kbuild:
Reviewed-by: Nicolas Schier <nsc@kernel.org>

-- 
Nicolas

  parent reply	other threads:[~2026-06-13 17:41 UTC|newest]

Thread overview: 11+ 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-05-27 19:46   ` sashiko-bot
2026-06-09 16:19   ` Krzysztof Kozlowski
2026-05-27 19:32 ` [PATCH v5 2/4] scripts/jobserver-exec: propagate child exit status Daniel Golle
2026-06-09 17:08   ` Krzysztof Kozlowski
2026-06-13 17:39   ` Nicolas Schier [this message]
2026-05-27 19:32 ` [PATCH v5 3/4] dt-bindings: wire style checker into dt_binding_check Daniel Golle
2026-05-27 20:28   ` sashiko-bot
2026-06-13  9:58   ` Nicolas Schier
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=ai2VuFWUxVRGjGKR@levanger \
    --to=nsc@kernel.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=daniel@makrotopia.org \
    --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=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