Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp811400rdb; Thu, 30 Nov 2023 21:35:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IETjvIANjuscOT/OniIDWKDUCabjXoLrl4jtH1kexcuPhNQ5zO/TqolCZPlFrvHf1lwN8SG X-Received: by 2002:a17:902:b205:b0:1cf:fc91:e4d0 with SMTP id t5-20020a170902b20500b001cffc91e4d0mr13138114plr.16.1701408919569; Thu, 30 Nov 2023 21:35:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701408919; cv=none; d=google.com; s=arc-20160816; b=fVQgTlJV1eR+XSH+8Spdt1B5wb+ArGM2Jm7JA/QJr/qAT1B/PGBWd2dKhsFG78SWd2 f7FlN+6FdPtKn99/qmjnzg8/BpSmx14CIPddpRMV9rnfPikNYk9/DjzrFqgAzibgH2ko 1Gls1BoQKTH2DOsS0EQSFG+9Rtw5am/jDse2Wks3wYJW2DwKJxM7HQh60bmWgkkBulBX hedi46Ie6pzjM4aYZuRFgfH099NQNx/Q89WEmeyKIJAexdLyOSxtQRaS344RuPZ7gAVS iykNfG2eku7+j7iQftyB2Y+gab2G04hoGlCRodleEvB8f1/dJrD6aiAG9Oa1pXTO7DsQ giDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:feedback-id :dkim-signature:dkim-signature; bh=GFbRhbSjB9oLO+LwKHE9kfWx3hJNKnD7jw8ytn4NBfc=; fh=gchVU1I5vGzalazuyM1sniQLk+Ai7DLVKJKZL80F+yk=; b=NesqcWq8AGK+Ax+hY2eo/IMKQM8iYQ99mUM0wM9stIm0fAqgRMbrA9H5LaUlcv9iUN zvhO79DapE74YR/IENBwE4p7qs8/wnlV07iCHhHt3Mqt9vH1O90vqSPxyx0wPX4Gjp/S GpmnsH6Oqsc81aqeBDqZ5Xuu02yHOEWFFTp7kRLz3qW1aJ1oGZSdC7sV4swBDGNKdJsb ODKNXkJP2KEGNrguvO3zca0PsPQ/ikOA0ivmSDcpGlpjMyhpxbXGk0wjL3D28fIKi3WH pMexoPGlxdPfj9iCi/asbctA1LK8Oo2ScbSVG7BZFIW0OKirUQJoElqAYkdempXrDEVq x5sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@who-t.net header.s=fm3 header.b=EvycvNBF; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=OnulShBV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id d9-20020a170902aa8900b001cf57827c7asi2525072plr.147.2023.11.30.21.35.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 21:35:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@who-t.net header.s=fm3 header.b=EvycvNBF; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=OnulShBV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 4378383294D5; Thu, 30 Nov 2023 21:35:15 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377402AbjLAFfA (ORCPT + 99 others); Fri, 1 Dec 2023 00:35:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229808AbjLAFe6 (ORCPT ); Fri, 1 Dec 2023 00:34:58 -0500 Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C63191703; Thu, 30 Nov 2023 21:35:04 -0800 (PST) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 4ADB95C01EE; Fri, 1 Dec 2023 00:35:01 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Fri, 01 Dec 2023 00:35:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=who-t.net; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm3; t=1701408901; x=1701495301; bh=GF bRhbSjB9oLO+LwKHE9kfWx3hJNKnD7jw8ytn4NBfc=; b=EvycvNBF7h8MZ6ztIM N1Yw39AfbJCGyaHfRtQ0veDNHIG/xx6lD3NYOexhB57vSyED6ehfQPo6f575fQIi cbFwa1Zho3FR2gIBaI/7qlf+7TybxpsFRBqk2eRLBrMykydGfrSF/wlmOTm9Lz3/ ph0w1UlFz/Qq1yCKlRDdfYp2Jjk+2c+279sbr/vaBxU3mI9Iel+9B7sIgTB1+f/D 4wclfbtzxBclbTy6sBBErBQydzdYKGRrZnzhaq1LuMqqIC9jkNVN999UHAtLhLUk X2GyMKEXJVlcQgaLCGDU51E2O4ojElNjOvYM0xpSnPlrkIqh3x90AuoBk4ZqdNKy m+KA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1701408901; x=1701495301; bh=GFbRhbSjB9oLO +LwKHE9kfWx3hJNKnD7jw8ytn4NBfc=; b=OnulShBVdt4nTEhF0acVUc1GBaps6 XUmxAV6jfI5bDBbJ6RWpCWVob1mNNNwCAsD/DCst2pcogoKIXqqzsgtfiSC2rBD3 Cqg/XYb5M5MnGzegr/xP9ywz8WyMCkLUuTSYiFkHkDGo3TJRiyfM9+R1HfSDffTl 56onQbPYSTaFGeD+fF2zlHepE/nsVrjXeHystVR4LEKTnL7RTbCkaXfOo3YeVgk9 7MhdQ4W4JwOIIRYg6Gx5UheX3adrObhvdfBUZ+/oTb1EnK3CMK7H48sQrcuz4+Q6 Dt2SN5g3OUeP//THcWVZs1T1RAT77Of0ah8ym3T/oQ5y/+cGGppObAM1Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudeikedgkeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesthdtredttddtvdenucfhrhhomheprfgvthgv rhcujfhuthhtvghrvghruceophgvthgvrhdrhhhuthhtvghrvghrseifhhhoqdhtrdhnvg htqeenucggtffrrghtthgvrhhnpeekvdekgeehfeejgfdvudffhfevheejffevgfeigfek hfduieefudfgtedugfetgfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpehpvghtvghrrdhhuhhtthgvrhgvrhesfihhohdqthdrnhgvth X-ME-Proxy: Feedback-ID: i7ce144cd:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 1 Dec 2023 00:34:57 -0500 (EST) Date: Fri, 1 Dec 2023 15:34:52 +1000 From: Peter Hutterer To: Benjamin Tissoires Cc: Jiri Kosina , Benjamin Tissoires , Shuah Khan , linux-input@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 02/12] selftests/hid: vmtest.sh: allow finer control on the build steps Message-ID: <20231201053452.GA625212@quokka> References: <20231129-wip-selftests-v1-0-ba15a1fe1b0d@kernel.org> <20231129-wip-selftests-v1-2-ba15a1fe1b0d@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231129-wip-selftests-v1-2-ba15a1fe1b0d@kernel.org> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Thu, 30 Nov 2023 21:35:15 -0800 (PST) On Wed, Nov 29, 2023 at 04:24:27PM +0100, Benjamin Tissoires wrote: > vmtest.sh works great for a one shot test, but not so much for CI where > I want to build (with different configs) the bzImage in a separate > job than the one I am running it. > > Add a "build_only" option to specify whether we need to boot the currently > built kernel in the vm. > > Signed-off-by: Benjamin Tissoires > --- > tools/testing/selftests/hid/vmtest.sh | 42 ++++++++++++++++++++--------------- > 1 file changed, 24 insertions(+), 18 deletions(-) > > diff --git a/tools/testing/selftests/hid/vmtest.sh b/tools/testing/selftests/hid/vmtest.sh > index 301b4e162336..52ada972833b 100755 > --- a/tools/testing/selftests/hid/vmtest.sh > +++ b/tools/testing/selftests/hid/vmtest.sh > @@ -32,7 +32,7 @@ DEFAULT_COMMAND="pip3 install hid-tools; make -C tools/testing/selftests TARGETS > usage() > { > cat < -Usage: $0 [-i] [-s] [-d ] -- [] > +Usage: $0 [-j N] [-s] [-b] [-d ] -- [] > > is the command you would normally run when you are in > the source kernel direcory. e.g: > @@ -55,6 +55,7 @@ Options: > > -u) Update the boot2container script to a newer version. > -d) Update the output directory (default: ${OUTPUT_DIR}) > + -b) Run the only build steps for the kernel and the selftests typo: "run only the" Cheers, Peter > -j) Number of jobs for compilation, similar to -j in make > (default: ${NUM_COMPILE_JOBS}) > -s) Instead of powering off the VM, start an interactive > @@ -191,8 +192,9 @@ main() > local command="${DEFAULT_COMMAND}" > local update_b2c="no" > local debug_shell="no" > + local build_only="no" > > - while getopts ':hsud:j:' opt; do > + while getopts ':hsud:j:b' opt; do > case ${opt} in > u) > update_b2c="yes" > @@ -207,6 +209,9 @@ main() > command="/bin/sh" > debug_shell="yes" > ;; > + b) > + build_only="yes" > + ;; > h) > usage > exit 0 > @@ -226,8 +231,7 @@ main() > shift $((OPTIND -1)) > > # trap 'catch "$?"' EXIT > - > - if [[ "${debug_shell}" == "no" ]]; then > + if [[ "${build_only}" == "no" && "${debug_shell}" == "no" ]]; then > if [[ $# -eq 0 ]]; then > echo "No command specified, will run ${DEFAULT_COMMAND} in the vm" > else > @@ -267,24 +271,26 @@ main() > update_kconfig "${kernel_checkout}" "${kconfig_file}" > > recompile_kernel "${kernel_checkout}" "${make_command}" > + update_selftests "${kernel_checkout}" "${make_command}" > > - if [[ "${update_b2c}" == "no" && ! -f "${b2c}" ]]; then > - echo "vm2c script not found in ${b2c}" > - update_b2c="yes" > - fi > + if [[ "${build_only}" == "no" ]]; then > + if [[ "${update_b2c}" == "no" && ! -f "${b2c}" ]]; then > + echo "vm2c script not found in ${b2c}" > + update_b2c="yes" > + fi > > - if [[ "${update_b2c}" == "yes" ]]; then > - download $B2C_URL $b2c > - chmod +x $b2c > - fi > + if [[ "${update_b2c}" == "yes" ]]; then > + download $B2C_URL $b2c > + chmod +x $b2c > + fi > > - update_selftests "${kernel_checkout}" "${make_command}" > - run_vm "${kernel_checkout}" $b2c "${kernel_bzimage}" "${command}" > - if [[ "${debug_shell}" != "yes" ]]; then > - echo "Logs saved in ${OUTPUT_DIR}/${LOG_FILE}" > - fi > + run_vm "${kernel_checkout}" $b2c "${kernel_bzimage}" "${command}" > + if [[ "${debug_shell}" != "yes" ]]; then > + echo "Logs saved in ${OUTPUT_DIR}/${LOG_FILE}" > + fi > > - exit $(cat ${OUTPUT_DIR}/${EXIT_STATUS_FILE}) > + exit $(cat ${OUTPUT_DIR}/${EXIT_STATUS_FILE}) > + fi > } > > main "$@" > > -- > 2.41.0 >