From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D5A41C43381 for ; Thu, 4 Mar 2021 01:01:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BA6A664F37 for ; Thu, 4 Mar 2021 01:01:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235748AbhCDBBj (ORCPT ); Wed, 3 Mar 2021 20:01:39 -0500 Received: from mail.kernel.org ([198.145.29.99]:39050 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1452928AbhCDAji (ORCPT ); Wed, 3 Mar 2021 19:39:38 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id B8BAC64F14; Thu, 4 Mar 2021 00:38:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1614818294; bh=rGDDVLzCbxzPdA2qmL/laf4kYOwXqmZtYHmMk3gT8EE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iVnmZhlOrvBLidUMsa6my6e1DiKYDDXs+XRFXAbbZyPRrcg6WQGdBBYV7q7HxIyxk tAEUV7Y2wk5E1hqbf2waB1eKokOq3h5qrNDtiVwjkH1IY4fujkA/06IN9QwttsFAqC T3YMA5JaT0CGEd8MhbqoXr188DCUjHw+t4ekZNneWiHH8ZFV3ToInIcu9QCah3D3/m ox8J9ebbhKZ8sqRh3vH4+BDatm5r66ezC9uY0KPAZ0jNRwGPapnWKdIsCjBMFSPOWE Ci8LES5MK3YR50BR+q/higq+GG6s5QUYrOhQ1L8b2c/62k3CyY4rHlArkjhs4lbo38 0z2/0dpe+xpLg== From: paulmck@kernel.org To: rcu@vger.kernel.org Cc: linux-kernel@vger.kernel.org, kernel-team@fb.com, mingo@kernel.org, jiangshanlai@gmail.com, akpm@linux-foundation.org, mathieu.desnoyers@efficios.com, josh@joshtriplett.org, tglx@linutronix.de, peterz@infradead.org, rostedt@goodmis.org, dhowells@redhat.com, edumazet@google.com, fweisbec@gmail.com, oleg@redhat.com, joel@joelfernandes.org, "Paul E. McKenney" Subject: [PATCH tip/core/rcu 08/28] torture: Use file-based protocol to mark batch's runs complete Date: Wed, 3 Mar 2021 16:37:52 -0800 Message-Id: <20210304003812.24833-8-paulmck@kernel.org> X-Mailer: git-send-email 2.9.5 In-Reply-To: <20210304003750.GA24696@paulmck-ThinkPad-P72> References: <20210304003750.GA24696@paulmck-ThinkPad-P72> Precedence: bulk List-ID: X-Mailing-List: rcu@vger.kernel.org From: "Paul E. McKenney" Currently, the script generated by kvm.sh does a "wait" to wait on both the current batch's guest OSes and any jitter.sh scripts. This works, but makes it hard to abstract the jittering so that common code can be used for both local and distributed runs. This commit therefore uses "build.run" files in scenario directories, and these files are removed after the corresponding scenario's guest OS has completed. Note that --build-only runs do not create build.run files because they also do not create guest OSes and do not run any jitter.sh scripts. Signed-off-by: Paul E. McKenney --- tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh | 3 +++ tools/testing/selftests/rcutorture/bin/kvm.sh | 13 +++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh b/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh index 91578d3..fed6f10 100755 --- a/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh @@ -345,4 +345,7 @@ then echo Unknown PID, cannot kill qemu command fi +# Tell the script that this run is done. +rm -f $resdir/build.run + parse-console.sh $resdir/console.log $title diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh index 7944510..1f5f872 100755 --- a/tools/testing/selftests/rcutorture/bin/kvm.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm.sh @@ -469,9 +469,15 @@ function dump(first, pastlast, batchnum) print "echo ", cfr[jn], cpusr[jn] ovf ": Build complete. `date` | tee -a " rd "log"; jn++; } + print "runfiles=" for (j = 1; j < jn; j++) { builddir=rd cfr[j] "/build"; - print "rm -f " builddir ".ready" + if (TORTURE_BUILDONLY) + print "rm -f " builddir ".ready" + else + print "mv " builddir ".ready " builddir ".run" + print "runfiles=\"$runfiles " builddir ".run\"" + fi print "if test -f \"" rd cfr[j] "/builtkernel\"" print "then" print "\techo ----", cfr[j], cpusr[j] ovf ": Kernel present. `date` | tee -a " rd "log"; @@ -501,7 +507,10 @@ function dump(first, pastlast, batchnum) print "\tjitter.sh " j " " dur " " ja[2] " " ja[3] "&" print "\techo $! >> " rd "jitter_pids" } - print "\twait" + print "\twhile ls $runfiles > /dev/null 2>&1" + print "\tdo" + print "\t\t:" + print "\tdone" print "\techo ---- All kernel runs complete. `date` | tee -a " rd "log"; print "else" print "\twait" -- 2.9.5