aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/rcutorture/bin/kvm-build.sh (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-05-10torture: Correctly fetch number of CPUs for non-English languagesFrederic Weisbecker1-1/+1
Grepping for "CPU" on lscpu output isn't always successful, depending on the local language setting. As a result, the build can be aborted early with: "make: the '-j' option requires a positive integer argument" This commit therefore uses the human-language-independent approach available via the getconf command, both in kvm-build.sh and in kvm-remote.sh. Signed-off-by: Frederic Weisbecker <frederic@kernel.org> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2021-05-10torture: Make the build machine control N in "make -jN"Paul E. McKenney1-2/+4
Given remote rcutorture runs, it is quite possible that the build system will have fewer CPUs than the system(s) running the actual test scenarios. In such cases, using the number of CPUs on the test systems can overload the build system, slowing down the build or, worse, OOMing the build system. This commit therefore uses the build system's CPU count to set N in "make -jN", and by tradition sets "N" to double the CPU count. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2020-06-29torture: Add a stop-run capabilityPaul E. McKenney1-0/+6
When bisecting RCU issues, it is often the case that the first error in an unsuccessful run will happen quickly, but that a successful run must go on for some time in order to obtain a sufficiently low false-negative error rate. In many cases, a bisection requires multiple concurrent runs, in which case the first failure in any run indicates failure, pure and simple. In such cases, it would speed things up greatly if the first failure terminated all runs. This commit therefore adds scripting that checks for a file named "STOP" in the top-level results directory, terminating the run when it appears. Note that in-progress builds will continue until completion, but future builds and all runs will be cut short. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2019-05-28torture: Run kernel build in source directoryPaul E. McKenney1-5/+4
For historical reasons, rcutorture places its build products in a tools/testing/selftests/rcutorture/b1 directory using the O= kbuild command-line argument. However, doing this requires that the source directory be pristine: Not just "make clean" pristine, but instead "make mrproper" (or, equivalently, "make distclean") pristine. Therefore, rcutorture executes a "make mrproper" before each build. Unfortunately, "make mrproper" has the side effect of removing pretty much everything, including tags files and cscope databases, which can be inconvenient to people whose workflow centers around a single source tree. This commit therefore makes rcutorture do the build directly in the source directory, removing the need for "make mrproper". This works because all needed build products are moved to their proper place in the "res" directory immediately after the build completes, so that multiple rcutorture kernels can still run concurrently. Reported-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com>
2019-03-26tools/.../rcutorture: Convert to SPDX license identifierPaul E. McKenney1-15/+2
Replace the license boiler plate with a SPDX license identifier. While in the area, update an email address and add copyright notices. Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com>
2018-06-25torture: Use a single build directory for torture scenariosPaul E. McKenney1-5/+6
The torture scripting currently builds each kernel from a set of parallel runs in its own build directory. This can waste quite a bit of space when running large numbers of concurrent scenarios, and pointlessly given that the builds are run sequentially (albeit with a largish -j number passed to "make"). This commit therefore places all build-command output in the results directory, then does all builds in a single "b1" build directory. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
2017-12-11rcutorture/kvm-build.sh: Skip build directory checkSeongJae Park1-5/+0
Check for build-directory existence and write permissions are provided in both 'kvm-test-1-run.sh' an 'kvm-build.sh'. Because the 'kvm-build.sh' is dependent on 'kvm-test-1-run.sh' ('kvm-build.sh' uses variables that defined from its caller.), these checks are unnecessarily duplicated. This commit therefore removes the check in from the 'kvm-build.sh' script. Signed-off-by: SeongJae Park <sj38.park@gmail.com> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
2017-10-09torture: Provide TMPDIR environment variable to specify tmpdirPaul E. McKenney1-1/+1
Both rcutorture and locktorture currently place temporary files in /tmp, in keeping with decades-long tradition. However, sometimes it is useful to specify an alternative temporary directory, for example, for space or performance reasons. This commit therefore causes the torture-test scripting to use the path specified in the TMPDIR environment variable, or to fall back to traditional /tmp if this variable is not set. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
2017-07-24torture: Add --kconfig argument to kvm.shPaul E. McKenney1-9/+2
Currently, testing a variant of an existing scenario requires editing that scenario's file or creating a new scenario file. This is messy and error prone with respect to changes to scenarios. This commit therefore adds a --kconfig argument to kvm.sh, so that '--kconfig "CONFIG_RCU_TRACE=y CONFIG_RCU_EQS_DEBUG=n" will override those two Kconfig options. In addition, there is now clear precedence: the config fragment overrides CFcommon, and the --kconfig argument overrides both. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
2017-06-08rcutorture: Correctly handle CONFIG_RCU_TORTURE_TEST_* optionsPaul E. McKenney1-1/+1
The rcutorture scripting handles the CONFIG_*_TORTURE_TEST Kconfig options specially, and therefore greps them out of the Kconfig-fragment files. Unfortunately, a poor choice of grep pattern means that the CONFIG_RCU_TORTURE_TEST_SLOW_CLEANUP, CONFIG_RCU_TORTURE_TEST_SLOW_INIT, and CONFIG_RCU_TORTURE_TEST_SLOW_PREINIT Kconfig options are also grepped out, preventing rcutorture from using them. This commit therefore fixes the offending grep pattern to focus only on the CONFIG_*_TORTURE_TEST Kconfig options. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
2014-09-07rcutorture: Set executable bit and drop bash from UsagePranith Kumar1-1/+1
This commit sets the executable bit on test scripts config2frag.sh and kvm.sh. Since #!/bin/bash is set in all the scripts, this commit also drops it from all usage lines because the scripts can now all be invoked directly. Signed-off-by: Pranith Kumar <bobby.prani@gmail.com> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
2014-09-07rcutorture: Use bash shell for all the test scriptsPranith Kumar1-1/+1
Some of the scripts encode a default /bin/sh shell. On systems which use dash as default shell, these scripts fail as they are bash scripts. I encountered this while testing the sprintf() changes on a Debian system where dash is the default shell. This commit changes all such uses to use bash explicitly. Signed-off-by: Pranith Kumar <bobby.prani@gmail.com> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
2014-05-14torture: Make config-fragment filtering RCU-independentPaul E. McKenney1-1/+1
The torture tests need to set specific values for their respective Kconfig options (e.g., CONFIG_LOCK_TORTURE_TEST), and must therefore filter any conflicting definitions from the Kconfig fragment file. Unfortunately, the code in kvm-build.sh was looking only for CONFIG_RCU_TORTURE_TEST. This commit therefore handles the general case of CONFIG_[A-Z]*_TORTURE_TEST. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2014-05-14torture: Rename RCU_KMAKE_ARG to TORTURE_KMAKE_ARGPaul E. McKenney1-1/+1
This commit makes the torture scripts a bit more RCU-independent by changing RCU_KMAKE_ARG to TORTURE_KMAKE_ARG. It also removes the unnecessary export command. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2014-05-13torture: Rename RCU_INITRD to TORTURE_INITRDPaul E. McKenney1-1/+1
This commit makes the torture scripts a bit more RCU-independent. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2013-12-03rcutorture: Stop tracking FSF's postal addressPaul E. McKenney1-2/+2
All of the rcutorture scripts has the usual GPL header, which contains a long-obsolete postal address for FSF. To avoid the need to track the FSF office's movements, this commit substitutes the URL where GPL may be found. Reported-by: Greg KH <gregkh@linuxfoundation.org> Reported-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
2013-12-03rcutorture: Add --kmake-arg argument to kvm.shPaul E. McKenney1-1/+1
This commit adds the --kmake-arg to kvm.sh, which allows passing in things like "V=1" to see the build commands, as well as enabling the CROSS_COMPILE= make macro used for cross-building. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Greg KH <gregkh@linuxfoundation.org>
2013-12-03rcutorture: Add --no-initrd argument to kvm.shPaul E. McKenney1-1/+1
This commit adds the --no-initrd argument to kvm.sh, which permits initrd to be contained in a root partition specified by the --bootargs argument. Without --no-initrd, the kernel build expects an initrd directory in the same rcutorture directory that contains bin and configs. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Greg KH <gregkh@linuxfoundation.org>
2013-12-03rcutorture: Add KVM-based test frameworkPaul E. McKenney1-0/+71
This commit adds the test framework that I used to test RCU under KVM. This consists of a group of scripts and Kconfig fragments. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Greg KH <gregkh@linuxfoundation.org>