aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/rcutorture/bin/torture.sh (follow)
AgeCommit message (Collapse)AuthorFilesLines
2022-05-03Merge branches 'docs.2022.04.20a', 'fixes.2022.04.20a', 'nocb.2022.04.11b', 'rcu-tasks.2022.04.11b', 'srcu.2022.05.03a', 'torture.2022.04.11b', 'torture-tasks.2022.04.20a' and 'torturescript.2022.04.20a' into HEADPaul E. McKenney1-5/+24
docs.2022.04.20a: Documentation updates. fixes.2022.04.20a: Miscellaneous fixes. nocb.2022.04.11b: Callback-offloading updates. rcu-tasks.2022.04.11b: RCU-tasks updates. srcu.2022.05.03a: Put SRCU on a memory diet. torture.2022.04.11b: Torture-test updates. torture-tasks.2022.04.20a: Avoid torture testing changing RCU configuration. torturescript.2022.04.20a: Torture-test scripting updates.
2022-04-20rcutorture: Make torture.sh allow for --kasanPaul E. McKenney1-2/+2
The torture.sh script provides extra memory for scftorture and rcuscale. However, the total memory provided is only 1G, which is less than the 2G that is required for KASAN testing. This commit therefore ups the torture.sh script's 1G to 2G. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2022-04-20rcutorture: Make torture.sh refscale and rcuscale specify Tasks Trace RCUPaul E. McKenney1-2/+2
Now that the Tasks RCU flavors are selected by their users rather than by the rcutorture scenarios, torture.sh fails when attempting to run NOPREEMPT scenarios for refscale and rcuscale. This commit therefore makes torture.sh specify CONFIG_TASKS_TRACE_RCU=y to avoid such failure. Why not also CONFIG_TASKS_RCU? Because tracing selects this one. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2022-04-20torture: Save "make allmodconfig" .config filePaul E. McKenney1-0/+1
Currently, torture.sh saves only the build output and exit code from the "make allmodconfig" test. This commit also saves the .config file. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2022-04-20torture: Enable CSD-lock stall reports for scftorturePaul E. McKenney1-1/+1
This commit passes the csdlock_debug=1 kernel parameter in order to enable CSD-lock stall reports for torture.sh scftorure runs. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2022-04-11torture: Add rcu_normal and rcu_expedited runs to torture.shPaul E. McKenney1-0/+18
Currently, the rcupdate.rcu_normal and rcupdate.rcu_expedited kernel boot parameters are not regularly tested. The potential addition of polled expedited grace-period APIs increases the amount of code that is affected by these kernel boot parameters. This commit therefore adds a "--do-rt" argument to torture.sh to exercise these kernel-boot options. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2022-02-08torture: Make torture.sh help message match realityPaul E. McKenney1-2/+2
This commit fixes a couple of typos: s/--doall/--do-all/ and s/--doallmodconfig/--do-allmodconfig/. [ paulmck: Add Fixes: supplied by Paul Menzel. ] Fixes: a115a775a8d5 ("torture: Add "make allmodconfig" to torture.sh") Reported-by: Paul Menzel <pmenzel@molgen.mpg.de> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2022-02-01torture: Change KVM environment variable to RCUTORTUREPaul E. McKenney1-2/+2
The torture-test scripting's long-standing use of KVM as the environment variable tracking the pathname of the rcutorture directory now conflicts with allmodconfig builds due to the virt/kvm/Makefile.kvm file's use of this as a makefile variable. This commit therefore changes the torture-test scripting from KVM to RCUTORTURE, avoiding the name conflict. Reported-by: Zhouyi Zhou <zhouzhouyi@gmail.com> Tested-by: Zhouyi Zhou <zhouzhouyi@gmail.com> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2022-02-01torture: Print only one summary line per runPaul E. McKenney1-1/+1
The torture.sh scripts currently duplicates the summary lines, getting one during the run phase and one during the summary phase of each run. This commit therefore removes the run phase from consideration so as to get only one summary line per run. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2022-02-01torture: Compress KCSAN as well as KASAN vmlinux filesPaul E. McKenney1-9/+9
Compressing KASAN vmlinux files reduces torture.sh res file size from about 100G to about 50G, which is good, but the KCSAN vmlinux files are also large. Compressing them reduces their size from about 700M to about 100M (but of course your mileage may vary). This commit therefore compresses both KASAN and KCSAN vmlinux files. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2022-02-01torture: Indicate which torture.sh runs' bugs are all KCSAN reportsPaul E. McKenney1-1/+11
This commit further improves torture.sh run summaries by indicating which runs' "Bugs:" counts are all KCSAN reports, and further printing an additional end-of-run summary line when all errors reported in all runs were KCSAN reports. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2022-02-01torture: Output per-failed-run summary lines from torture.shPaul E. McKenney1-1/+1
Currently, torture.sh lists the failed runs, but it is up to the user to work out what failed. This is especially annoying for KCSAN runs, where RCU's tighter definitions result in failures being reported for other parts of the kernel. This commit therefore outputs "Summary:" lines for each failed run, allowing the user to more quickly identify which failed runs need focused attention. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2021-09-16torture: Allot 1G of memory for scftorture runsPaul E. McKenney1-1/+1
By default, torture.sh allots 512M of memory for each guest OS. However, when running scftorture with KASAN, 1G is needed. This commit therefore causes torture.sh to provide the required 1G. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2021-09-13torture: Make torture.sh print the number of files to be compressedPaul E. McKenney1-2/+7
Compressing gigabyte vmlinux files can take some time, and it can be a bit annoying to not know many more batches of compression there will be. This commit therefore makes torture.sh print the number of files to be compressed just before starting compression and just after compression completes. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2021-07-20torture: Create KCSAN summaries for torture.sh runsPaul E. McKenney1-0/+4
Currently, each -kcsan run in a torture.sh group of runs has its own kcsan.sum summary. This works, but there is usually a lot of duplication between the runs. This commit therefore also creates an overall kcsan.sum file for the entire torture.sh run, if there was at least one -kcsan run. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2021-07-20torture: Make torture.sh accept --do-all and --dononePaul E. McKenney1-2/+2
Currently, torture.sh accepts --doall on the one hand and --do-none on the other, which is a bit inconsistent. This commit therefore adds --do-all and --donone so that a fully consistent test may be used. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2021-07-20torture: Add clocksource-watchdog testing to torture.shPaul E. McKenney1-3/+26
This commit adds three short tests of the clocksource-watchdog capability to the torture.sh script, all to avoid otherwise-inevitable bitrot. While in the area, fix an obsolete comment. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2021-05-10torture: Fix remaining erroneous torture.sh instance of $*Paul E. McKenney1-1/+1
Although "eval" was removed from torture.sh, that commit failed to update the KCSAN instance of $* to "$@". This results in failures when (for example) --bootargs is given more than one argument. This commit therefore makes this change. There is one remaining instance of $* in torture.sh, but this is used only in the "echo" command, where quoting doesn't matter so much. Fixes: 197220d4a334 ("torture: Remove use of "eval" in torture.sh") Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2021-03-08torture: Allow 1G of memory for torture.sh kvfree testingPaul E. McKenney1-1/+1
Yes, I do recall a time when 512MB of memory was a lot of mass storage, much less main memory, but the rcuscale kvfree_rcu() testing invoked by torture.sh can sometimes exceed it on large systems, resulting in OOM. This commit therefore causes torture.sh to pase the "--memory 1G" argument to kvm.sh to reserve a full gigabyte for this purpose. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2021-01-06torture: Compress KASAN vmlinux filesPaul E. McKenney1-2/+46
The sizes of vmlinux files built with KASAN enabled can approach a full gigabyte, which can result in disk overflow sooner rather than later. Fortunately, the xz command compresses them by almost an order of magnitude. This commit therefore uses xz to compress vmlinux file built by torture.sh with KASAN enabled. However, xz is not the fastest thing in the world. In fact, it is way slower than rotating-rust mass storage. This commit therefore also adds a --compress-kasan-vmlinux argument to specify the degree of xz concurrency, which defaults to using all available CPUs if there are that many files in need of compression. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2021-01-06torture: Add --kcsan-kmake-arg to torture.sh for KCSANPaul E. McKenney1-6/+15
In 2020, running KCSAN often requires careful choice of compiler. This commit therefore adds a --kcsan-kmake-arg parameter to torture.sh to allow specifying (for example) "CC=clang" to the kernel build process to correctly build a KCSAN-enabled kernel. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2021-01-06torture: Add command and results directory to torture.sh logPaul E. McKenney1-4/+7
This commit adds the command and arguments to the torture.sh log file, and also outputs the results directory. This latter allows impatient users to quickly find the results that are being generated by the current run. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2021-01-06torture: Allow scenarios to be specified to torture.shPaul E. McKenney1-3/+43
This commit adds --configs-rcutorture, --configs-locktorture, and --configs-scftorture arguments to torture.sh, allowing the desired set of scenarios to be passed to each. The default for each has been changed from a large-system-appropriate set to just CFLIST for each. Users are encouraged to create scripts that provide appropriate settings for their specific systems. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2021-01-06torture: Drop log.long generation from torture.shPaul E. McKenney1-4/+1
Now that kvm.sh puts all the relevant details in the "log" file, there is no need for torture.sh to generate a separate "log.long" file. This commit therefore drops this from torture.sh. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2021-01-06torture: Make torture.sh refuse to do zero-length runsPaul E. McKenney1-6/+19
This commit causes torture.sh to check for zero-length runs and to take the cowardly option of refusing to run them, logging its cowardice for later inspection. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2021-01-06torture: Make torture.sh throttle VERBOSE_TOROUT_*() for refscalePaul E. McKenney1-1/+1
This commit causes torture.sh to use the torture.verbose_sleep_frequency kernel boot parameter to throttle verbose refscale output on large systems. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2021-01-06torture: Make torture.sh allmodconfig retain and label outputPaul E. McKenney1-3/+6
This commit places "---" markers in the torture.sh script's allmodconfig output, and uses "<<" to avoid overwriting earlier output from this build test. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2021-01-06torture: Create doyesno helper function for torture.shPaul E. McKenney1-59/+19
This commit saves a few lines of code by creating a doyesno helper bash function for argument parsing. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2021-01-06torture: Make torture.sh refscale runs use verbose_batched module parameterPaul E. McKenney1-1/+6
On large systems, the refscale printk() rate can overrun the file system's ability to accept console log messages. This commit therefore uses the new verbose_batched module parameter to rate-limit some of the higher-rate printk() calls. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2021-01-06torture: Make torture.sh rcuscale and refscale deal with allmodconfigPaul E. McKenney1-2/+2
The .mod.c files created by allmodconfig builds interfers with the approach torture.sh uses to enumerate types of rcuscale and refscale runs. This commit therefore tightens the pattern matching to avoid this interference. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2021-01-06torture: Enable torture.sh argument checkingPaul E. McKenney1-5/+5
This commit uncomments the argument checking for the --duration argument to torture.sh. While in the area, it also corrects the duration units from seconds to minutes. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2021-01-06torture: Auto-size SCF and scaling runs based on number of CPUsPaul E. McKenney1-7/+12
This commit improves torture.sh flexibility by autoscaling the number of CPUs to be used in variable-CPUs torture tests, including scftorture, refscale, rcuscale, and kvfree. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2021-01-06torture: Add "make allmodconfig" to torture.shPaul E. McKenney1-1/+36
This commit adds the ability to do "make allmodconfig" to torture.sh, given that normal rcutorture runs do not normally catch missing exports. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2021-01-06torture: Remove use of "eval" in torture.shPaul E. McKenney1-11/+44
The bash "eval" command enables Bobby Tables attacks, which might not be a concern in torture testing by themselves, but one could imagine these combined with a cut-and-paste attack. This commit therefore gets rid of them. This comes at a price in terms of bash quoting not working nicely, so the "--bootargs" argument lists are now passed to torture_one via a bash-variable side channel. This might be a bit ugly, but it will also allow torture.sh to grow its own --bootargs parameter. While in the area, add proper header comments for the bash functions. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2021-01-06torture: Make torture.sh use common time-duration bash functionsPaul E. McKenney1-13/+7
This commit makes torture.sh use the new bash functions get_starttime() and get_starttime_duration() created for kvm.sh. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2021-01-06torture: Add torture.sh torture-everything scriptPaul E. McKenney1-0/+301
Although tailoring a specific set of kvm.sh runs has served rcutorture testing well over many years, it requires a relatively distraction-free environment, which is not always available. This commit therefore adds a prototype torture.sh script that by default tortures pretty much everything the rcutorture scripting is designed to torture, and which can be given command-line arguments to take a more focused approach. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>