rcu: Fix various typos in comments
[linux-2.6-microblaze.git] / tools / testing / selftests / rcutorture / bin / kvm-build.sh
1 #!/bin/bash
2 # SPDX-License-Identifier: GPL-2.0+
3 #
4 # Build a kvm-ready Linux kernel from the tree in the current directory.
5 #
6 # Usage: kvm-build.sh config-template resdir
7 #
8 # Copyright (C) IBM Corporation, 2011
9 #
10 # Authors: Paul E. McKenney <paulmck@linux.ibm.com>
11
12 if test -f "$TORTURE_STOPFILE"
13 then
14         echo "kvm-build.sh early exit due to run STOP request"
15         exit 1
16 fi
17
18 config_template=${1}
19 if test -z "$config_template" -o ! -f "$config_template" -o ! -r "$config_template"
20 then
21         echo "kvm-build.sh :$config_template: Not a readable file"
22         exit 1
23 fi
24 resdir=${2}
25
26 T=${TMPDIR-/tmp}/test-linux.sh.$$
27 trap 'rm -rf $T' 0
28 mkdir $T
29
30 cp ${config_template} $T/config
31 cat << ___EOF___ >> $T/config
32 CONFIG_INITRAMFS_SOURCE="$TORTURE_INITRD"
33 CONFIG_VIRTIO_PCI=y
34 CONFIG_VIRTIO_CONSOLE=y
35 ___EOF___
36
37 configinit.sh $T/config $resdir
38 retval=$?
39 if test $retval -gt 1
40 then
41         exit 2
42 fi
43 ncpus=`cpus2use.sh`
44 make -j$ncpus $TORTURE_KMAKE_ARG > $resdir/Make.out 2>&1
45 retval=$?
46 if test $retval -ne 0 || grep "rcu[^/]*": < $resdir/Make.out | egrep -q "Stop|Error|error:|warning:" || egrep -q "Stop|Error|error:" < $resdir/Make.out
47 then
48         echo Kernel build error
49         egrep "Stop|Error|error:|warning:" < $resdir/Make.out
50         echo Run aborted.
51         exit 3
52 fi