~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/tools/testing/selftests/rcutorture/bin/kvm-build.sh

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /tools/testing/selftests/rcutorture/bin/kvm-build.sh (Architecture i386) and /tools/testing/selftests/rcutorture/bin/kvm-build.sh (Architecture sparc)


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

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php