mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-07 18:37:58 -04:00
torture: Add --trust-make to suppress "make clean"
The current rcutorture scripts unconditionally do "make clean", which is a good way of getting the needed testing done despite any imperfections in Makefile dependency tracking. However, this can be a bit irritating when repeatedly running a single scenario after small changes, for example, when debugging a problem that affects only a single scenario. This commit therefore adds a --trust-make argument that suppresses the "make clean". Even when using ccache, this speeds up kernel builds by up to almost an order of magnitude on my laptop. Reported-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com>
This commit is contained in:
@@ -28,7 +28,10 @@ sed -e 's/^\(CONFIG[0-9A-Z_]*\)=.*$/grep -v "^# \1" |/' < $c > $T/u.sh
|
||||
sed -e 's/^\(CONFIG[0-9A-Z_]*=\).*$/grep -v \1 |/' < $c >> $T/u.sh
|
||||
grep '^grep' < $T/u.sh > $T/upd.sh
|
||||
echo "cat - $c" >> $T/upd.sh
|
||||
make clean > $resdir/Make.clean 2>&1
|
||||
if test -z "$TORTURE_TRUST_MAKE"
|
||||
then
|
||||
make clean > $resdir/Make.clean 2>&1
|
||||
fi
|
||||
make $TORTURE_DEFCONFIG > $resdir/Make.defconfig.out 2>&1
|
||||
mv .config .config.sav
|
||||
sh $T/upd.sh < .config.sav > .config
|
||||
|
||||
@@ -33,6 +33,7 @@ TORTURE_KMAKE_ARG=""
|
||||
TORTURE_QEMU_MEM=512
|
||||
TORTURE_SHUTDOWN_GRACE=180
|
||||
TORTURE_SUITE=rcu
|
||||
TORTURE_TRUST_MAKE=""
|
||||
resdir=""
|
||||
configs=""
|
||||
cpus=0
|
||||
@@ -63,6 +64,7 @@ usage () {
|
||||
echo " --qemu-cmd qemu-system-..."
|
||||
echo " --results absolute-pathname"
|
||||
echo " --torture rcu"
|
||||
echo " --trust-make"
|
||||
exit 1
|
||||
}
|
||||
|
||||
@@ -175,6 +177,9 @@ do
|
||||
jitter=0
|
||||
fi
|
||||
;;
|
||||
--trust-make)
|
||||
TORTURE_TRUST_MAKE="y"
|
||||
;;
|
||||
*)
|
||||
echo Unknown argument $1
|
||||
usage
|
||||
@@ -300,6 +305,7 @@ TORTURE_QEMU_MAC="$TORTURE_QEMU_MAC"; export TORTURE_QEMU_MAC
|
||||
TORTURE_QEMU_MEM="$TORTURE_QEMU_MEM"; export TORTURE_QEMU_MEM
|
||||
TORTURE_SHUTDOWN_GRACE="$TORTURE_SHUTDOWN_GRACE"; export TORTURE_SHUTDOWN_GRACE
|
||||
TORTURE_SUITE="$TORTURE_SUITE"; export TORTURE_SUITE
|
||||
TORTURE_TRUST_MAKE="$TORTURE_TRUST_MAKE"; export TORTURE_TRUST_MAKE
|
||||
if ! test -e $resdir
|
||||
then
|
||||
mkdir -p "$resdir" || :
|
||||
|
||||
@@ -21,7 +21,7 @@ mkdir $T
|
||||
|
||||
. functions.sh
|
||||
|
||||
if grep -q CC < $F
|
||||
if grep -q CC < $F || test -n "$TORTURE_TRUST_MAKE"
|
||||
then
|
||||
:
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user