linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Frederic Weisbecker <frederic@kernel.org>
To: "Paul E . McKenney" <paulmck@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Frederic Weisbecker <frederic@kernel.org>
Subject: [PATCH 3/3] torture: Update bare metal advices to latest kvm.sh options
Date: Thu,  6 May 2021 15:15:10 +0200	[thread overview]
Message-ID: <20210506131510.51488-4-frederic@kernel.org> (raw)
In-Reply-To: <20210506131510.51488-1-frederic@kernel.org>

kvm.sh is perfectly able to build a new kernel config from an existing
one instead of using a defconfig. All we need to do is to pass:

	--defconfig oldconfig

This is much easier than manually modifying a .config from a
ConfigFragment file.

Then with the latest parameters that got added on kvm.sh, it's now
easy to build a bare metal .config for a cross target for example:

	./kvm.sh --configs "TREE01" --defconfig oldconfig --configonly
		--cmdline-to-config --kmake-arg ARCH=arm64 --no-initrd

After that all we need to do is to build the updated .config and run
the resulting image.

Update bare metal advices to propose that.

Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
---
 .../rcutorture/bin/kvm-test-1-run.sh          | 21 ++++++++++---------
 1 file changed, 11 insertions(+), 10 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 6df9efc77469..47d69668ab37 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh
@@ -190,27 +190,28 @@ echo To run this scenario on bare metal: >> $resdir/bare-metal
 echo >> $resdir/bare-metal
 echo " 1." Set your bare-metal build tree to the state shown in this file: >> $resdir/bare-metal
 echo "   " $testid_txt >> $resdir/bare-metal
-echo " 2." Update your bare-metal build tree"'"s .config based on this file: >> $resdir/bare-metal
-echo "   " $resdir/ConfigFragment >> $resdir/bare-metal
-echo " 3." Make the bare-metal kernel"'"s build system aware of your .config updates: >> $resdir/bare-metal
-echo "   " $ 'yes "" | make oldconfig' >> $resdir/bare-metal
-echo " 4." Build your bare-metal kernel. >> $resdir/bare-metal
+echo " 2." Prepare your bare-metal build tree"'"s .config on your root kernel directory >> $resdir/bare-metal
+echo " 3." Run this scenario with "'--defconfig oldconfig --configonly --no-initrd'" >> $resdir/bare-metal
+echo " 4." If you"'"re cross compiling then append the appropriate make arguments >> $resdir/bare-metal
+echo "   " eg: "'--kmake-arg ARCH=arm64'" >> $resdir/bare-metal
 echo " 5." Boot your bare-metal kernel with the following parameters: >> $resdir/bare-metal
 echo "   " $kboot_args >> $resdir/bare-metal
 echo " 6." Start the test with the following command: >> $resdir/bare-metal
 echo "   " $ modprobe $TORTURE_MOD $modprobe_args >> $resdir/bare-metal
 echo " 7." After some time, end the test with the following command: >> $resdir/bare-metal
 echo "   " $ rmmod $TORTURE_MOD >> $resdir/bare-metal
-echo " 8." Copy your bare-metal kernel"'"s .config file, overwriting this file: >> $resdir/bare-metal
+echo " 8." Alternatively if you run rcutorture in a built-in fashion and your kernel arguments are already >> $resdir/bare-metal
+echo "   " hardcoded in the kernel config, skip the previous 5/6/7 steps and append to kvm.sh arguments: >> $resdir/bare-metal
+echo "   " --cmdline-to-config >> $resdir/bare-metal
+echo "   " Then simply boot your kernel and wait for the end of the tests >> $resdir/bare-metal
+echo " 9." Copy your bare-metal kernel"'"s .config file, overwriting this file: >> $resdir/bare-metal
 echo "   " $resdir/.config >> $resdir/bare-metal
-echo " 9." Copy the console output from just before the modprobe to just after >> $resdir/bare-metal
+echo "10." Copy the console output from just before the modprobe to just after >> $resdir/bare-metal
 echo "   " the rmmod into this file: >> $resdir/bare-metal
 echo "   " $resdir/console.log >> $resdir/bare-metal
-echo "10." Check for runtime errors using the following command: >> $resdir/bare-metal
+echo "11." Check for runtime errors using the following command: >> $resdir/bare-metal
 echo "   " $ tools/testing/selftests/rcutorture/bin/kvm-recheck.sh `dirname $resdir` >> $resdir/bare-metal
 echo >> $resdir/bare-metal
-echo Some of the above steps may be skipped if you build your bare-metal >> $resdir/bare-metal
-echo kernel here: `head -n 1 $testid_txt | sed -e 's/^Build directory: //'`  >> $resdir/bare-metal
 
 echo $QEMU $qemu_args -m $TORTURE_QEMU_MEM -kernel $KERNEL -append \"$qemu_append $boot_args\" $TORTURE_QEMU_GDB_ARG > $resdir/qemu-cmd
 echo "# TORTURE_SHUTDOWN_GRACE=$TORTURE_SHUTDOWN_GRACE" >> $resdir/qemu-cmd
-- 
2.25.1


  parent reply	other threads:[~2021-05-06 13:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-06 13:15 [PATCH 0/3] torture: Update bare metal config generation Frederic Weisbecker
2021-05-06 13:15 ` [PATCH 1/3] torture: Add --cmdline-to-config parameter to kvm.sh Frederic Weisbecker
2021-05-07 19:20   ` Paul E. McKenney
2021-05-17 10:42     ` Frederic Weisbecker
2021-05-17 20:40       ` Paul E. McKenney
2021-05-06 13:15 ` [PATCH 2/3] torture: Add --configonly parameter for kvm.sh Frederic Weisbecker
2021-05-07 20:29   ` Paul E. McKenney
2021-05-17 10:55     ` Frederic Weisbecker
2021-05-06 13:15 ` Frederic Weisbecker [this message]
2021-05-07 20:37   ` [PATCH 3/3] torture: Update bare metal advices to latest kvm.sh options Paul E. McKenney

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=20210506131510.51488-4-frederic@kernel.org \
    --to=frederic@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).