aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/rcutorture (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-07-09Merge branches 'doc.2014.07.08a', 'fixes.2014.07.09a', 'maintainers.2014.07.08b', 'nocbs.2014.07.07a' and 'torture.2014.07.07a' into HEADPaul E. McKenney19-28/+26
doc.2014.07.08a: Documentation updates. fixes.2014.07.09a: Miscellaneous fixes. maintainers.2014.07.08b: Maintainership updates. nocbs.2014.07.07a: Callback-offloading fixes. torture.2014.07.07a: Torture-test updates.
2014-07-09rcu: Remove CONFIG_PROVE_RCU_DELAYPaul E. McKenney16-16/+0
The CONFIG_PROVE_RCU_DELAY Kconfig parameter doesn't appear to be very effective at finding race conditions, so this commit removes it. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Andi Kleen <ak@linux.intel.com> [ paulmck: Remove definition and uses as noted by Paul Bolle. ]
2014-06-26torture: Clean up diagnostics from --buildonly runsPaul E. McKenney3-12/+25
Currently the post-processing complains about the lack of rcutorture output when --buildonly is set and also emits misleading messages about kernels being started and finishing. This commit suppresses these complaints and messages. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
2014-06-26torture: Enable versions without CFcommon to function correctlyPaul E. McKenney1-0/+1
The CFcommon file must now be present, which makes using the current scripts against old kernel versions cumbersome. This commit therefore makes the CFcommon file be optional, so that old kernel versions can be used with current torture scripts. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
2014-05-14rcutorture: Note diffs from git commitsPaul E. McKenney1-0/+4
The current scripting only keeps track of the git SHA-1 of the current HEAD. This can cause confusion in cases where testing ran in a git tree where changes had not yet been checked in. This commit therefore also records the output of "git diff HEAD" to provide the information needed to reconstruct the source tree that was tested. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2014-05-14rcutorture: Test RCU-sched primitives in TREE_PREEMPT_RCU kernelsPaul E. McKenney1-0/+1
This commit ensures that RCU-sched primitives are tested in TREE_PREEMPT_RCU kernels, a combination that was previously omitted. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2014-05-14torture: Use elapsed time to detect hangsPaul E. McKenney1-6/+12
The kvm-test-1-run.sh currently counts "sleep 1" commands to detect hangs. This can fail spectacularly on busy systems, where "sleep 1" might take far longer than one second to complete. This commit therefore changes hang detection to use elapsed time measurements. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2014-05-14torture: Better summary diagnostics for build failuresPaul E. McKenney4-8/+21
The reaction of kvm-recheck.sh is obscure at best, and easy to miss completely. This commit therefore prints "BUG: Build failed" in the summary at the end of a run. This commit also adds the line of dashes in cases where performance info is not available, and also avoids printing nonsense diagnostics in cases where some of the normal test output is not available. In addition, this commit saves off the .config file even when the build fails. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
2014-05-14torture: Add tracing-enabled variant of TREE02Paul E. McKenney1-0/+25
This commit adds a CONFIG_RCU_TRACE=y version of TREE02 for debugging purposes. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2014-05-14torture: Choose bzImage location based on architecturePaul E. McKenney3-6/+43
Currently, the scripts hard-code arch/x86/boot/bzImage, which does not work well for other architectures. This commit therefore provides a identify_boot_image function that selects the correct bzImage location relative to the top of the Linux source tree. This commit also adds a --bootimage argument that allows selecting some other file, for example, "vmlinux". This change requires that the definition of the QEMU variable be computed earlier in order to identify where to look for the boot image when it comes time to copy it to the results directory. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2014-05-14torture: Permit multi-word qemu and boot argumentsPaul E. McKenney1-2/+2
This commit applies quotes to permit multi-word --qemu-args and --bootargs arguments. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2014-05-14torture: Report diagnostics from qemuPaul E. McKenney1-1/+8
The current script does record qemu diagnostics, but the user has to know where to look for them. This commit therefore puts them into the Warnings file so that kvm-recheck.sh will display them. This change is especially useful if you are in the habit of killing the qemu process when you realize that you messed something up, but then later on wonder why the process terminated early. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
2014-05-14torture: Make "--dryrun script" use same environment as normal runPaul E. McKenney1-15/+11
In a normal torture-test run, the script inherits its environment variables, but this does not work when producing a script that is to run later. Therefore, definitions and exports are prepended to a dryrun script but not to a script that is run immediately. This commit reconciles this by placing definitions and exports at the beginning of the script in both cases. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Conflicts: tools/testing/selftests/rcutorture/bin/kvm.sh
2014-05-14torture: Make "--dryrun script" output self-sufficientPaul E. McKenney1-33/+27
The scripts produced by kvm.sh's "--dryrun script" argument were intended for debugging rather than to run, but it is easier to debug if the script output matches exactly what is run. This commit therefore makes this script runnable. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
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_QEMU_CMD to TORTURE_QEMU_CMDPaul E. McKenney2-6/+6
This commit makes the torture scripts a bit more RCU-independent. It also removes a redundant export of this same shell variable. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2014-05-14torture: Rename RCU_QEMU_ARG to TORTURE_QEMU_ARGPaul E. McKenney1-3/+3
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>
2014-05-14torture: Rename RCU_QEMU_MAC to TORTURE_QEMU_MACPaul E. McKenney2-5/+5
This commit makes the torture scripts a bit more RCU-independent. It also drops an redundant "export" statement. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2014-05-14torture: Rename RCU_QEMU_INTERACTIVE to TORTURE_QEMU_INTERACTIVEPaul E. McKenney2-8/+8
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>
2014-05-14torture: Rename RCU_BUILDONLY to TORTURE_BUILDONLYPaul E. McKenney2-4/+7
This commit makes the torture scripts a bit more RCU-independent by changing RCU_BUILDONLY to TORTURE_BUILDONLY. It also removes an unnecessary export command. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2014-05-14torture: Rename RCU_BOOTARGS to TORTURE_BOOTARGSPaul E. McKenney1-3/+3
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>
2014-05-14torture: Rename RCU_KMAKE_ARG to TORTURE_KMAKE_ARGPaul E. McKenney2-4/+4
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-14torture: Allow variations of "defconfig" to be specifiedPaul E. McKenney2-1/+9
Some environments require some variation on "make defconfig" to initialize the .config file. This commit therefore adds a --defconfig argument to allow this to be specified. The default value is of course "defconfig". 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. McKenney2-4/+4
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>
2014-05-13torture: Make parse-rcutorture.sh less RCU-specificPaul E. McKenney3-13/+13
It can be a bit jarring to see a locking test complain about RCU, so this commit renames parse-rcutorture.sh to parse-torture.sh and makes the messages it emits more generic. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2014-05-13torture: Add batch headers "--dryrun sched"Paul E. McKenney1-1/+2
This commit makes the output of "--dryrun sched" more user-friendly, clearly indicating the batch starts. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2014-05-13torture: Remove obsolete builddir optionsPaul E. McKenney1-16/+0
The --builddir and --relbuilddir options were initially intended to handle parallel tests. However, since commit 43e38ab3d518 (Enable concurrent rcutorture runs), the script manages multiple build directories as needed for parallel testing. This commit therefore removes these two obsolete options. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2014-02-23rcutorture: Save kvm.sh output to logPaul E. McKenney1-7/+15
This commit logs the progress text that kvm.sh outputs, improving after-the-fact troubleshooting. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2014-02-23rcutorture: Place kvm-test-1-run.sh output into res directoryPaul E. McKenney1-2/+2
The output of each kvm-test-1-run.sh script is placed into a file whose name parallels that of the build directory. This means that the kvm-test-1-run.sh output is overwritten by later run. This commit therefore places the kvm-test-1-run.sh output into the per-test-case directory in the "res" hierarchy. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2014-02-23rcutorture: Rename TREE_RCU-Kconfig.txtPaul Bolle1-0/+0
It used to be that: git ls-files "*Kconfig*" would find all Kconfig files and would only find Kconfig files. This commit renames TREE_RCU-Kconfig.txt to TREE_RCU-kconfig.txt so that this is once again true. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2014-02-23locktorture: Add kvm-recheck.sh plug-in for locktorturePaul E. McKenney2-2/+54
This commit adds the kvm-recheck-lock.sh plug-in for locktorture to print out lock-specific progress statistics. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2014-02-23locktorture: Add vestigial locktorture configurationPaul E. McKenney7-1/+60
This commit adds a trivial set of configuration files for lock torturing. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2014-02-23rcutorture: Introduce "rcu" directory level underneath configsPaul E. McKenney97-5/+16
This commit uses the standard software ploy of introducing another level of indirection below the configs directory. This allows each torture-test suite to have its own set of Kconfig files, boot parameters, and version-specific scripts. Initially, we have only rcu, but lock will follow soonish. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2014-02-23rcutorture: Rename kvm-test-1-rcu.shPaul E. McKenney2-10/+10
The kvm-test-1-rcu.sh is not specific to RCU, so this commit renames it to kvm-test-1-run.sh. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2014-02-23rcutorture: Remove RCU dependencies from ver_functions.sh APIPaul E. McKenney5-40/+59
The current set of functions in ver_functions.sh have APIs that are specific to RCU. This commit therefore makes an RCU-independent function that outputs version-specific boot arguments. This has the benefit that a test-type-independent call in kvm-test-1-rcu.sh can now handle any type of test, given a test-type-specific set of files in a configs directory. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2014-02-23rcutorture: Create CFcommon file for common Kconfig parametersPaul E. McKenney17-18/+7
Currently, CONFIG_RCU_TORTURE_TEST=y is hardcoded into the kvm-test-1-rcu.sh script and CONFIG_PRINTK_TIME=y is mentioned in each and every configs file. This commit creates a CFcommon file for these two Kconfig parameters, and modifies kvm-test-1-rcu.sh to copy this new file into the .config file during the build. This change will allow these scripts to operate on torture types other than just rcutorture. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2014-02-23rcutorture: Create config files for scripted test-the-test testingPaul E. McKenney2-0/+9
This commit adds a pair of files in the configs directory to allow test-the-test runs of rcutorture via a "--configs BUSTED" argument to the kvm.sh script. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2014-02-23rcutorture: Abstract kvm-recheck.shPaul E. McKenney2-19/+52
This commit creates a plug-in to allow kvm-recheck.sh to process non-rcutorture console output. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2014-02-23rcutorture: Print dates when doing parallel rcutorture runsPaul E. McKenney1-6/+6
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2014-02-23rcutorture: Don't create results directory for dryrunsPaul E. McKenney1-17/+17
This commit prevents the results directory from being created for dryruns. However, a script generated from a dryrun will create the results directory should it be run. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org
2014-02-18rcutorture: Print results directory when dumping resultsPaul E. McKenney1-0/+3
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2014-02-18rcutorture: Flag tests requiring more CPUs than are availablePaul E. McKenney1-5/+9
This commit adds a "(!)" flag after the number of CPUs required by a given test if that test requires more than the available number of CPUs. Note that these flags appear only when the number of CPUs is specified using the --cpus argument. In the absence of a --cpus argument, no tests are flagged. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2014-02-18rcutorture: Add comments, especially on bin packing.Paul E. McKenney1-2/+31
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2014-02-18rcutorture: Do better bin packingPaul E. McKenney1-1/+36
Running the standard set of rcutorture tests on 24 CPUs results in the following sub-optimal schedule: ----start batch---- TREE07 16 ----start batch---- TREE08 16 SRCU-P 8 ----start batch---- TREE01 8 TREE02 8 TREE03 8 ----start batch---- TREE04 8 TREE05 8 TREE06 8 ----start batch---- SRCU-N 4 TINY01 1 TINY02 1 TREE09 1 If one of the eight-CPU runs were to be moved into the first batch, the test suite would complete in four batches rather than five. This commit therefore uses a greedy algorithm to re-order the test entries so that the sequential batching will produce an optimal schedule in this case: ----start batch---- TREE07 16 SRCU-P 8 ----start batch---- TREE08 16 TREE01 8 ----start batch---- TREE02 8 TREE03 8 TREE04 8 ----start batch---- TREE05 8 TREE06 8 SRCU-N 4 TINY01 1 TINY02 1 TREE09 1 Please note that this is still not an optimal bin-packing algorithm, however, it does produce optimal solutions for most common scenarios. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2014-02-18rcutorture: Handle multiple runs of the same testPaul E. McKenney1-16/+13
This commit fixes handling numbering of multiple runs of the same test so as to disambiguate output. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2014-02-18rcutorture: Add dryrun capabilityPaul E. McKenney1-4/+35
Actual rcutorture tests take considerable time and machine resources, so it is inconvenient to actually do an rcutorture run when optimizing the bin-packing algorithm. This commit therefore adds a --dryrun argument, which defaults to doing a run, but for which "sched" says to simply print the run schedule and "script" dumps the script without running it. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2014-02-18rcutorture: Fix results-directory error messagePaul E. McKenney1-1/+1
The message complains about a build directory when it should instead be complaining about the results directory, so this commit fixes it. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2014-02-18rcutorture: Enable concurrent rcutorture runsPaul E. McKenney4-24/+108
The rcutorture tests run by default range from using one CPU to using sixteen of them. Therefore, rcutorture testing could be sped up significantly simply by running the kernels in parallel. Building them in parallel is not all that helpful: "make -j" is usually a better bet. So this commit takes a new "--cpus" argument that specifies how many CPUs rcutorture is permitted to use for its parallel runs. The default of zero does sequential runs as before. The bin-packing is minimal, and will be grossly suboptimal for some configurations. However, powers of two work reasonably well. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2014-02-18rcutorture: Reduce SRCU-N number of CPUsPaul E. McKenney1-1/+1
Both SRCU-P and SRCU-N specify eight CPUs, which results in four iterations for a parallel run on 32 CPUs. This commit reduces SRCU-N to four CPUs (but leaving SRCU-P at eight) to speed up parallel runs, while maintaining essentially the same test coverage. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2014-02-18rcutorture: Move common qemu flags to kvm-test-1.shPaul E. McKenney2-1/+2
Currently, most qemu flags are calculated in kvm-test-1-rcu.sh, except that -nographics is set up by kvm.sh. This commit promotes one-stop shopping by consolidating the determination of qemu flags into kvm-test-1-rcu.sh. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>