Skip to content

Commit 3d17ded

Browse files
committed
torture: Allow --kconfig options to override --kcsan defaults
Currently, attempting to override a --kcsan default with a --kconfig option might or might not work. However, it would be good to allow the user to adjust the --kcsan defaults, for example, to specify a different time for CONFIG_KCSAN_REPORT_ONCE_IN_MS. This commit therefore uses the new config_override_param() bash function to apply the --kcsan defaults and then apply the --kconfig options, which allows this overriding to occur. Signed-off-by: Paul E. McKenney <[email protected]>
1 parent 6be63d7 commit 3d17ded

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,9 @@ else
7373
fi
7474
echo " --- $config_template" >> $resdir/ConfigFragment.input
7575
cat $config_template >> $resdir/ConfigFragment.input
76-
config_override_param "--kconfig argument" Kc1 Kc2 "$TORTURE_KCONFIG_ARG"
77-
cp $T/Kc2 $resdir/ConfigFragment
76+
config_override_param "--kcsan options" Kc1 Kc2 "$TORTURE_KCONFIG_KCSAN_ARG"
77+
config_override_param "--kconfig argument" Kc2 Kc3 "$TORTURE_KCONFIG_ARG"
78+
cp $T/Kc3 $resdir/ConfigFragment
7879

7980
base_resdir=`echo $resdir | sed -e 's/\.[0-9]\+$//'`
8081
if test "$base_resdir" != "$resdir" -a -f $base_resdir/bzImage -a -f $base_resdir/vmlinux
@@ -87,7 +88,7 @@ then
8788
ln -s $base_resdir/.config $resdir # for kvm-recheck.sh
8889
# Arch-independent indicator
8990
touch $resdir/builtkernel
90-
elif kvm-build.sh $T/Kc2 $resdir
91+
elif kvm-build.sh $T/Kc3 $resdir
9192
then
9293
# Had to build a kernel for this test.
9394
QEMU="`identify_qemu vmlinux`"

tools/testing/selftests/rcutorture/bin/kvm.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,6 @@ else
205205
exit 1
206206
fi
207207

208-
TORTURE_KCONFIG_ARG="${TORTURE_KCONFIG_ARG} ${TORTURE_KCONFIG_KCSAN_ARG}"
209-
TORTURE_KCONFIG_ARG="`echo ${TORTURE_KCONFIG_ARG} | sed -e 's/^ *//' -e 's/ *$//'`"
210-
211208
CONFIGFRAG=${KVM}/configs/${TORTURE_SUITE}; export CONFIGFRAG
212209

213210
defaultconfigs="`tr '\012' ' ' < $CONFIGFRAG/CFLIST`"

0 commit comments

Comments
 (0)