From: "tip-bot2 for Paul E. McKenney" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: "Paul E. McKenney" <paulmck@kernel.org>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: core/rcu] torture: Add --kcsan-kmake-arg to torture.sh for KCSAN
Date: Fri, 12 Feb 2021 12:37:11 -0000 [thread overview]
Message-ID: <161313343136.23325.5039120435350311417.tip-bot2@tip-bot2> (raw)
The following commit has been merged into the core/rcu branch of tip:
Commit-ID: c54e413822701a18e7cf6bada2028ea9a9ecdaf9
Gitweb: https://git.kernel.org/tip/c54e413822701a18e7cf6bada2028ea9a9ecdaf9
Author: Paul E. McKenney <paulmck@kernel.org>
AuthorDate: Fri, 27 Nov 2020 18:06:57 -08:00
Committer: Paul E. McKenney <paulmck@kernel.org>
CommitterDate: Wed, 06 Jan 2021 17:03:46 -08:00
torture: Add --kcsan-kmake-arg to torture.sh for KCSAN
In 2020, running KCSAN often requires careful choice of compiler.
This commit therefore adds a --kcsan-kmake-arg parameter to torture.sh
to allow specifying (for example) "CC=clang" to the kernel build process
to correctly build a KCSAN-enabled kernel.
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
tools/testing/selftests/rcutorture/bin/torture.sh | 21 ++++++++++----
1 file changed, 15 insertions(+), 6 deletions(-)
diff --git a/tools/testing/selftests/rcutorture/bin/torture.sh b/tools/testing/selftests/rcutorture/bin/torture.sh
index 90ca736..0867f30 100755
--- a/tools/testing/selftests/rcutorture/bin/torture.sh
+++ b/tools/testing/selftests/rcutorture/bin/torture.sh
@@ -34,6 +34,7 @@ fi
configs_rcutorture=
configs_locktorture=
configs_scftorture=
+kcsan_kmake_args=
# Default duration and apportionment.
duration_base=10
@@ -79,6 +80,7 @@ usage () {
echo " --do-refscale / --do-no-refscale"
echo " --do-scftorture / --do-no-scftorture"
echo " --duration [ <minutes> | <hours>h | <days>d ]"
+ echo " --kcsan-kmake-arg kernel-make-arguments"
exit 1
}
@@ -166,6 +168,11 @@ do
duration_base=$(($ts*mult))
shift
;;
+ --kcsan-kmake-arg|--kcsan-kmake-args)
+ checkarg --kcsan-kmake-arg "(kernel make arguments)" $# "$2" '.*' '^error$'
+ kcsan_kmake_args="`echo "$kcsan_kmake_args $2" | sed -e 's/^ *//' -e 's/ *$//'`"
+ shift
+ ;;
*)
echo Unknown argument $1
usage
@@ -269,6 +276,8 @@ function torture_one {
# Note that quoting is problematic. So on the command line, pass multiple
# values with multiple kvm.sh argument instances.
function torture_set {
+ local cur_kcsan_kmake_args=
+ local kcsan_kmake_tag=
local flavor=$1
shift
curflavor=$flavor
@@ -281,7 +290,12 @@ function torture_set {
if test "$do_kcsan" = "yes"
then
curflavor=${flavor}-kcsan
- torture_one $* --kconfig "CONFIG_DEBUG_LOCK_ALLOC=y CONFIG_PROVE_LOCKING=y" --kmake-arg "CC=clang" --kcsan
+ if test -n "$kcsan_kmake_args"
+ then
+ kcsan_kmake_tag="--kmake-args"
+ cur_kcsan_kmake_args="$kcsan_kmake_args"
+ fi
+ torture_one $* --kconfig "CONFIG_DEBUG_LOCK_ALLOC=y CONFIG_PROVE_LOCKING=y" $kcsan_kmake_tag $cur_kcsan_kmake_args --kcsan
fi
}
@@ -382,8 +396,3 @@ then
cp $T/log $tdir
fi
exit $ret
-
-# @@@
-# Need a way for the invoker to specify clang. Maybe --kcsan-kmake or some such.
-# --kconfig as with --bootargs (Both have overrides.)
-# Command line parameters for --bootargs, --config, --kconfig, --kmake-arg, and --qemu-arg
reply other threads:[~2021-02-12 12:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=161313343136.23325.5039120435350311417.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=paulmck@kernel.org \
--cc=x86@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.