summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/rcutorture
Commit message (Collapse)AuthorAgeFilesLines
* rcutorture: Provide non-power-of-two Tasks RCU scenariosPaul E. McKenney2022-02-082-2/+2
| | | | | | | This commit adjusts RUDE01 to 3 CPUs and TRACE01 to 5 CPUs in order to test Tasks RCU's ability to handle non-power-of-two numbers of CPUs. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
* rcutorture: Test SRCU size transitionsPaul E. McKenney2022-02-082-0/+3
| | | | | | | | | | Thie commit adds kernel boot parameters to the SRCU-N and SRCU-P rcutorture scenarios to cause SRCU-N to test contention-based resizing and SRCU-P to test init_srcu_struct()-time resizing. Note that this also tests never-resizing because the contention-based resizing normally takes some minutes to make the shift. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
* torture: Make torture.sh help message match realityPaul E. McKenney2022-02-081-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>
* torture: Change KVM environment variable to RCUTORTUREPaul E. McKenney2022-02-016-19/+19
| | | | | | | | | | | | 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>
* torture: Make kvm-find-errors.sh notice missing vmlinux filePaul E. McKenney2022-02-011-0/+6
| | | | | | | | | | | | | Currently, an obtuse compiler diagnostic can fool kvm-find-errors.sh into believing that the build was successful. This commit therefore adds a check for a missing vmlinux file. Note that in the case of repeated torture-test scenarios ("--configs '2*TREE01'"), the vmlinux file will only be present in the first directory, that is, in TREE01 but not TREE01.2. Link: https://lore.kernel.org/lkml/36bd91e4-8eda-5677-7fde-40295932a640@molgen.mpg.de/ Reported-by: Paul Menzel <pmenzel@molgen.mpg.de> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
* torture: Print only one summary line per runPaul E. McKenney2022-02-011-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>
* torture: Make kvm-remote.sh try multiple times to download tarballPaul E. McKenney2022-02-011-6/+11
| | | | | | | | This commit ups the retries for downloading the build-product tarball to a given remote system from once to five times, the better to handle transient network failures. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
* torture: Compress KCSAN as well as KASAN vmlinux filesPaul E. McKenney2022-02-011-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>
* torture: Indicate which torture.sh runs' bugs are all KCSAN reportsPaul E. McKenney2022-02-011-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>
* torture: Make kvm.sh summaries note runs having only KCSAN reportsPaul E. McKenney2022-02-012-1/+11
| | | | | | | | | Runs having only KCSAN reports will normally print a summary line containing only a "Bugs:" entry. However, these bugs might or might not be KCSAN reports. This commit therefore flags runs in which all the "Bugs:" entries are KCSAN reports. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
* torture: Output per-failed-run summary lines from torture.shPaul E. McKenney2022-02-011-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>
* torture: Allow four-digit repetition numbers for --configs parameterPaul E. McKenney2022-02-011-1/+1
| | | | | | | | | | | | | | | | | In a clear-cut case of "not thinking big enough", kvm.sh limits the multipliers for torture-test scenarios to three digits. Although this is large enough for any single system that I have ever run rcutorture on, it does become a problem when you want to use kvm-remote.sh to run as many instances of TREE09 as fit on a set of 20 systems with 80 CPUs each. Yes, one could simply say "--configs '800*TREE09 800*TREE09'", but this commit removes the need for that sort of hacky workaround by permitting four-digit repetition numbers, thus allowing "--configs '1600*TREE09'". Five-digit repetition numbers remain off the menu. Should they ever really be needed, they can easily be added! Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
* torture: Drop trailing ^M from console outputPaul E. McKenney2022-02-011-1/+1
| | | | | | | | | Console logs can sometimes have trailing control-M characters, which the forward-progress evaluation code in kvm-recheck-rcu.sh passes through to the user output. Which does not cause a technical problem, but which can look ugly. This commit therefore strips the control-M characters. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
*---. Merge branches 'doc.2021.11.30c', 'exp.2021.12.07a', 'fastnohz.2021.11.30c', ↵Paul E. McKenney2021-12-0925-30/+31
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'fixes.2021.11.30c', 'nocb.2021.12.09a', 'nolibc.2021.11.30c', 'tasks.2021.12.09a', 'torture.2021.12.07a' and 'torturescript.2021.11.30c' into HEAD doc.2021.11.30c: Documentation updates. exp.2021.12.07a: Expedited-grace-period fixes. fastnohz.2021.11.30c: Remove CONFIG_RCU_FAST_NO_HZ. fixes.2021.11.30c: Miscellaneous fixes. nocb.2021.12.09a: No-CB CPU updates. nolibc.2021.11.30c: Tiny in-kernel library updates. tasks.2021.12.09a: RCU-tasks updates, including update-side scalability. torture.2021.12.07a: Torture-test in-kernel module updates. torturescript.2021.11.30c: Torture-test scripting updates.
| | | * torture: Properly redirect kvm-remote.sh "echo" commandsPaul E. McKenney2021-11-301-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The echo commands following initialization of the "oldrun" variable need to be "tee"d to $oldrun/remote-log. This commit fixes several stragglers. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
| | | * torture: Fix incorrectly redirected "exit" in kvm-remote.shPaul E. McKenney2021-11-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "exit 4" in kvm-remote.sh is pointlessly redirected, so this commit removes the redirection. Fixes: 0092eae4cb4e ("torture: Add kvm-remote.sh script for distributed rcutorture test runs") Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
| | | * rcutorture: Test RCU Tasks lock-contention detectionPaul E. McKenney2021-11-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adjusts the TRACE02 scenario to use a pair of callback-flood kthreads. This in turn forces lock contention on the single RCU Tasks Trace callback queue, which forces use of all CPUs' queues, thus testing this transition. (No, there is not yet any way to transition back. Cc: Neeraj Upadhyay <neeraj.iitr10@gmail.com> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
| | | * rcutorture: Cause TREE02 and TREE10 scenarios to do more callback floodingPaul E. McKenney2021-11-302-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit enables two callback-flood kthreads for the TREE02 scenario and 28 for the TREE10 scenario. Cc: Neeraj Upadhyay <neeraj.iitr10@gmail.com> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
| | | * torture: Retry download once before giving upPaul E. McKenney2021-11-301-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, a transient network error can kill a run if it happens while downloading the tarball to one of the target systems. This commit therefore does a 60-second wait and then a retry. If further experience indicates, a more elaborate mechanism might be used later. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
| | | * torture: Make kvm-find-errors.sh report link-time undefined symbolsPaul E. McKenney2021-11-302-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit makes kvm-find-errors.sh check for and report undefined symbols that are detected at link time. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
| | | * torture: Catch kvm.sh help text up with actual optionsPaul E. McKenney2021-11-301-3/+6
| |_|/ |/| | | | | | | | | | | | | | | | | This commit brings the kvm.sh script's help text up to date with recently (and some not-so-recently) added parameters. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
| | * rcutorture: Combine n_max_cbs from all kthreads in a callback floodPaul E. McKenney2021-12-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the addition of multiple callback-flood kthreads, the maximum number of callbacks from any one of those kthreads is reported in the rcutorture run summary. This commit changes this to report the sum of each kthread's maximum number of callbacks in a given callback-flooding episode. Cc: Neeraj Upadhyay <neeraj.iitr10@gmail.com> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
| | * rcutorture: Test RCU-tasks multiqueue callback queueingPaul E. McKenney2021-12-072-0/+2
| |/ |/| | | | | | | | | | | | | | | This commit modifies the TASKS01 scenario to use four callback queues and the TRACE01 scenario to use two queues, thus providing testing of multiple queues by default. Cc: Neeraj Upadhyay <neeraj.iitr10@gmail.com> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
| * rcu: Remove the RCU_FAST_NO_HZ Kconfig optionPaul E. McKenney2021-11-303-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | All of the uses of CONFIG_RCU_FAST_NO_HZ=y that I have seen involve systems with RCU callbacks offloaded. In this situation, all that this Kconfig option does is slow down idle entry/exit with an additional allways-taken early exit. If this is the only use case, then this Kconfig option nothing but an attractive nuisance that needs to go away. This commit therefore removes the RCU_FAST_NO_HZ Kconfig option. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
| * torture: Remove RCU_FAST_NO_HZ from rcu scenariosPaul E. McKenney2021-11-306-6/+0
| | | | | | | | | | | | | | | | All of the rcu scenarios that mentioning CONFIG_RCU_FAST_NO_HZ disable it. But this Kconfig option is disabled by default, so this commit removes the pointless "CONFIG_RCU_FAST_NO_HZ=n" lines from these scenarios. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
| * torture: Remove RCU_FAST_NO_HZ from rcuscale and refscale scenariosPaul E. McKenney2021-11-306-6/+0
|/ | | | | | | | | All of the rcuscale and refscale scenarios that mention the Kconfig option CONFIG_RCU_FAST_NO_HZ disable it. But this Kconfig option is disabled by default, so this commit removes the pointless "CONFIG_RCU_FAST_NO_HZ=n" lines from these scenarios. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
* rcutorture: Add CONFIG_PREEMPT_DYNAMIC=n to tiny scenariosPaul E. McKenney2021-11-305-0/+5
| | | | | | | | | With CONFIG_PREEMPT_DYNAMIC=y, the kernel builds with CONFIG_PREEMPTION=y because preemption can be enabled at runtime. This prevents any tests of Tiny RCU or Tiny SRCU from running correctly. This commit therefore explicitly sets CONFIG_PREEMPT_DYNAMIC=n for those scenarios. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
* torture: Make kvm-remote.sh print size of downloaded tarballPaul E. McKenney2021-09-161-0/+1
| | | | | | | | This commit causes kvm-remote.sh to print the size of the tarball that is downloaded to each of the remote systems. This size can help with performance projections and analysis. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
* torture: Allot 1G of memory for scftorture runsPaul E. McKenney2021-09-161-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>
* torture: Make torture.sh print the number of files to be compressedPaul E. McKenney2021-09-131-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>
* torture: Apply CONFIG_KCSAN_STRICT to kvm.sh --kcsan argumentPaul E. McKenney2021-09-131-1/+1
| | | | | | | | Currently, the --kcsan argument to kvm.sh applies a laundry list of Kconfig options. Now that KCSAN provides the CONFIG_KCSAN_STRICT Kconfig option, this commit reduces the laundry list to this one option. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
* torture: Make kvm-test-1-run-qemu.sh check for reboot loopsPaul E. McKenney2021-07-271-1/+5
| | | | | | | | | | It turns out that certain types of early boot bugs can result in reboot loops, even within a guest OS running under qemu/KVM. This commit therefore upgrades the kvm-test-1-run-qemu.sh script's hang-detection heuristics to detect such situations and to terminate the run when they occur. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
* torture: Add timestamps to kvm-test-1-run-qemu.sh outputPaul E. McKenney2021-07-271-5/+5
| | | | | | | | | The kvm-test-1-run-qemu.sh script logs the torture-test start time and also when it starts getting impatient for the test to finish. However, it does not timestamp these log messages, which can make debugging needlessly challenging. This commit therefore adds timestamps to these messages. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
* torture: Don't use "test" command's "-a" argumentPaul E. McKenney2021-07-271-5/+5
| | | | | | | | | | There was a time long ago when the "test" command's documentation claimed that the "-a" and "-o" arguments did something useful. But this documentation now suggests letting the shell execute these boolean operators, so this commit applies that suggestion to kvm-test-1-run-qemu.sh. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
* torture: Make kvm-test-1-run-batch.sh select per-scenario affinity masksPaul E. McKenney2021-07-274-2/+26
| | | | | | | | | | | | | | | | | This commit causes kvm-test-1-run-batch.sh to use the new kvm-assign-cpus.sh and kvm-get-cpus-script.sh scripts to create a TORTURE_AFFINITY environment variable containing either an empty string (for no affinity) or a list of CPUs to pin the scenario's vCPUs to. The additional change to kvm-test-1-run.sh places the per-scenario number-of-CPUs information where it can easily be found. If there is some reason why affinity cannot be supplied, this commit prints and logs the reason via changes to kvm-again.sh. Finally, this commit updates the kvm-remote.sh script to copy the qemu-affinity output files back to the host system. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
* torture: Consistently name "qemu*" test output filesPaul E. McKenney2021-07-273-10/+10
| | | | | | | | | | | There is "qemu-affinity", "qemu-cmd", "qemu-retval", but also "qemu_pid". This is hard to remember, not so good for bash tab completion, and just plain inconsistent. This commit therefore renames the "qemu_pid" file to "qemu-pid". A couple of the scripts must deal with old runs, and thus must handle both "qemu_pid" and "qemu-pid", but new runs will produce "qemu-pid". Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
* torture: Use numeric taskset argument in jitter.shPaul E. McKenney2021-07-271-7/+3
| | | | | | | | | | The jitter.sh script has some entertaining awk code to generate a hex mask from a randomly selected CPU number, which is handed to the "taskset" command. Except that this command has a "-c" parameter to take a comma/dash-separated list of CPU numbers. This commit therefore saves a few lines of awk by switching to a single-number CPU list. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
* rcutorture: Upgrade two-CPU scenarios to four CPUsPaul E. McKenney2021-07-273-3/+3
| | | | | | | | There is no way to place the vCPUs in a two-CPU rcutorture scenario to get variable memory latency. This commit therefore upgrades the current two-CPU rcutorture scenarios to four CPUs. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
* torture: Make kvm-test-1-run-qemu.sh apply affinityPaul E. McKenney2021-07-271-3/+10
| | | | | | | | | | | | This commit causes the kvm-test-1-run-qemu.sh script to check the TORTURE_AFFINITY environment variable and to add "taskset" commands to the qemu-cmd file. The first "taskset" command is applied only if the TORTURE_AFFINITY environment variable is a non-empty string, and this command pins the current scenario's guest OS to the specified CPUs. The second "taskset" command reports the guest OS's affinity in a new "qemu-affinity" file. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
* torture: Don't redirect qemu-cmd comment linesPaul E. McKenney2021-07-271-1/+1
| | | | | | | | | | | Currently, kvm-test-1-run-qemu.sh applies redirection to each and every line of each qemu-cmd script. Only the first line (the only one that is not a bash comment) needs to be redirected. Although redirecting the comments is currently harmless, just adding to the comment, it is an accident waiting to happen. This commit therefore adjusts the "sed" command to redirect only the qemu-system* command itself. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
* torture: Make kvm.sh select per-scenario affinity masksPaul E. McKenney2021-07-274-2/+207
| | | | | | | | | | This commit causes kvm.sh to use the new kvm-assign-cpus.sh and kvm-get-cpus-script.sh scripts to create a TORTURE_AFFINITY environment variable containing either an empty string (for no affinity) or a list of CPUs to pin the scenario's vCPUs to. A later commit will make use of this information to actually pin the vCPUs. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
* torture: Put kvm.sh batch-creation awk script into a temp filePaul E. McKenney2021-07-201-12/+15
| | | | | | | | | | | This commit is a first step towards pinning guest-OS vCPUs so as to force latency differences, especially on multi-socket systems. The kvm.sh script puts its batch-creation awk script into a temporary file so that later commits can add the awk code needed to dole out CPUs so as to maximize latency differences. This awk code will be used by multiple scripts. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
* torture: Move parse-console.sh call to PATH-aware scriptsPaul E. McKenney2021-07-202-2/+1
| | | | | | | | | | | | | The last line of kvm-test-1-run-qemu.sh invokes parse-console.sh, but kvm-test-1-run-qemu.sh is unaware of the PATH containing this script and does not have the job title handy. This commit therefore moves the invocation of parse-console.sh to kvm-test-1-run.sh, which has PATH and title at hand. This commit does not add an invocation of parse-console.sh to kvm-test-1-run-batch.sh because this latter script is run in the background, and the information will be gathered at the end of the full run. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
* torture: Make kvm-recheck.sh skip kcsan.sum for build-only runsPaul E. McKenney2021-07-201-1/+4
| | | | | | | | | Currently, kvm-recheck.sh attempts to create a kcsan.sum file even for build-only runs. This results in false-positive bash errors due to there being no console.log files in that case. This commit therefore makes kvm-recheck.sh skip creating the kcsan.sum file for build-only runs. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
* torture: Protect kvm-remote.sh directory trees from /tmp reapingPaul E. McKenney2021-07-202-1/+32
| | | | | | | | | | | The kvm-remote.sh script places the datestamped directory containing all the build artifacts in the destination systems' /tmp directories, where they accumulate runtime artifacts such as console.log. This works, but some systems have a habit of removing files in /tmp that have not been recently accessed. This commit therefore runs a simple script that periodically accesses all files in the datestamped directory. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
* torture: Log more kvm-remote.sh informationPaul E. McKenney2021-07-201-2/+13
| | | | | | | This commit logs additional information to help track down set up and networking issues. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
* torture: Make kvm-recheck-lock.sh tolerate qemu-cmd commentsPaul E. McKenney2021-07-201-1/+1
| | | | | | | | The qemu-cmd file can contain comments that are not relevant to the operation of kvm-recheck-lock.sh. This commit therefore strips these comments before looking for timing information. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
* torture: Make kvm-recheck-scf.sh tolerate qemu-cmd commentsPaul E. McKenney2021-07-201-1/+1
| | | | | | | | The qemu-cmd file can contain comments that are not relevant to the operation of kvm-recheck-scf.sh. This commit therefore strips these comments before looking for timing information. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
* torture: Create KCSAN summaries for torture.sh runsPaul E. McKenney2021-07-201-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>
* torture: Enable KCSAN summaries over groups of torture-test runsPaul E. McKenney2021-07-201-1/+1
| | | | | | | | | | The kcsan-collapse.sh script assumes that it is being run over the output of a single kvm.sh run, which is less than helpful for torture.sh runs. This commit therefore changes the kcsan-collapse.sh script's "ls" pattern with a "find" command to enable a KCSAN summary across all the -kcsan runs in a full torture.sh run. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>