Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp5917628rwp; Mon, 17 Jul 2023 11:30:35 -0700 (PDT) X-Google-Smtp-Source: APBJJlE0XJGwlHj6xQAHsKoPQVpgIoReYOQ4TZwCC89CyQ2vc/HghWYR0TkP0Fyk2Boy+GzbrHDX X-Received: by 2002:a05:6402:270a:b0:51d:b184:efd with SMTP id y10-20020a056402270a00b0051db1840efdmr10131298edd.20.1689618634930; Mon, 17 Jul 2023 11:30:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689618634; cv=none; d=google.com; s=arc-20160816; b=ih/GuWrXlvNDxjawSIlZ+p0FT4wwSxUfSJAyp9XOcIfRzEIecJ8h4gCGDwkEnwXXF9 IVgoMneiYvSL+xq97oRbZXRfJepMTDACzOz306tlhFWc4BQmNI190NzDdDSJ/RXsAfjF 6JXdiap1Q648NF48u83ZaBh0GPLtR57jKJVVeuo/d7PZQ83TNV/Qxti+0heBWVwJEneM pSGF93jKLUz+4+ifCiGxpX/zTuIF/1OrQDhMnMC8Qatb6dFfsjUjs3ul5cW19Kl//g9I wl+x2G3cz3DziskddrImfprjLZaiPEfzByrIfxk/NpKga3MASqpZ0Q6csvlEuPsS5wln K/LQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=kijbSYMgL2AGOKMTzrfGkGzCCYuATb9eD0stDZ41JzQ=; fh=Ag0RbRk3LxdpQ9OdMLAf8hbnmFe6FOAHRGAvgVTwgEc=; b=m3BC4IoNj14pqi7/7f3Rjx3TDohVd4l5FJb5jQQyFyJ7LMwigf2gTRCkjciHMyKHJu o8qMMTDDviULJJ8W2syYK7Kk1XyxA5Yd2tT1YIvQb+uC2vNvQc17Fxt/RHkjoLq/TGQh hkrrc2fF5mR+QOW2Ldqmi++MSLyOZzy8SBJZNHpOwbfSgTsvdyPZO1YOUw8ygzpNJtmT Y0K0HgbZhwoG49y8+s+fYQAIO8Ed8ZAq6rDNzmdMtEiDpJJTYpOT5iScpi5niaCbsi0Z 92BxyaOfPNvUIJQdxLnuLN+7MX5Qvirh/1bwozDQvyx+BZ4ZsZyfztcv3NXxywASOrxj KwaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=n5Y9SiTa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z22-20020aa7cf96000000b0051e0d3bb44fsi14890875edx.21.2023.07.17.11.30.10; Mon, 17 Jul 2023 11:30:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=n5Y9SiTa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231824AbjGQSY4 (ORCPT + 99 others); Mon, 17 Jul 2023 14:24:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229863AbjGQSYQ (ORCPT ); Mon, 17 Jul 2023 14:24:16 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E48F9FC; Mon, 17 Jul 2023 11:23:57 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id DAD0961210; Mon, 17 Jul 2023 18:23:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2E18EC611A2; Mon, 17 Jul 2023 18:23:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689618220; bh=jmrnz++/EcvgINfY2j7V/y9cLT5lrTwNhewPXob4+Wc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=n5Y9SiTaypxxAts2TNaDhaQQ0eXIVHQ0mytcm67ENSvL1F939yw7h9p1bFLO0N4qM oYxr+x2Uc1ehtuMXmBna5LdlU+8d355OW5x+VZYsTcvt70Qju15Gs4LyfKyMWbmpGG jYsWiRqz6Yvcu9hTstfYUPtACLRbdK0GyJxKV+gdhKSMoEVt650cr1GgJ1CwzU3O42 +sFa554VipYJya6f6RWdEziQ8h5efKxHIamShftwajR+xsYo0AiqRZB3uS97Fn34Ku f42pfRKRyClGALtM2eelwXhNQr0ERoklRBypnHZI02fPg60npJHL9uCwaoXMLePMb3 BtwwMxRKWsxzQ== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 45531CE0AD7; Mon, 17 Jul 2023 11:23:39 -0700 (PDT) From: "Paul E. McKenney" To: rcu@vger.kernel.org Cc: linux-kernel@vger.kernel.org, kernel-team@meta.com, rostedt@goodmis.org, "Paul E. McKenney" Subject: [PATCH rcu 18/18] torture: Cause mkinitrd.sh to indicate failure on compile errors Date: Mon, 17 Jul 2023 11:23:37 -0700 Message-Id: <20230717182337.1098991-18-paulmck@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently, if the C program created by mkinitrd.sh has compile errors, the errors are printed, but kvm.sh soldiers on, building kernels that have init-less initrd setups. The kernels then fail on boot when they attempt to mount non-existent root filesystems. This commit therefore improves user friendliness by making mkinitrd.sh return non-zero exit status on compile errors, which in turn causes kvm.sh to take an early exit, with the compile errors still clearly visible. Signed-off-by: Paul E. McKenney --- tools/testing/selftests/rcutorture/bin/mkinitrd.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/testing/selftests/rcutorture/bin/mkinitrd.sh b/tools/testing/selftests/rcutorture/bin/mkinitrd.sh index a5a483efa5ba..3e2d4ac9f338 100755 --- a/tools/testing/selftests/rcutorture/bin/mkinitrd.sh +++ b/tools/testing/selftests/rcutorture/bin/mkinitrd.sh @@ -75,8 +75,16 @@ if echo -e "#if __x86_64__||__i386__||__i486__||__i586__||__i686__" \ ${CROSS_COMPILE}gcc -fno-asynchronous-unwind-tables -fno-ident \ -nostdlib -include ../../../../include/nolibc/nolibc.h \ -s -static -Os -o init init.c -lgcc + ret=$? else ${CROSS_COMPILE}gcc -s -static -Os -o init init.c + ret=$? +fi + +if [ "$ret" -ne 0 ] +then + echo "Failed to create a statically linked C-language initrd" + exit "$ret" fi rm init.c -- 2.40.1