summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/rcutorture/bin
AgeCommit message (Collapse)Author
2025-07-16torture: Make torture.sh --allmodconfig testing fail on warningsPaul E. McKenney
Currently, the torture.sh --allmodconfig testing looks solely at the exit code from the kernel build, and thus fails to flag many compiler warnings. This commit therefore checks the kernel-build output for compiler diagnostics. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Neeraj Upadhyay (AMD) <neeraj.upadhyay@kernel.org>
2025-07-16torture: Add "ERROR" diagnostic for testing kernel-build outputPaul E. McKenney
Some recent kernel-build failures have featured "ERROR", so this commit adds it to the list checked by kvm-build.sh. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Neeraj Upadhyay (AMD) <neeraj.upadhyay@kernel.org>
2025-07-16torture: Make torture.sh tolerate runs having bad kvm.sh argumentsPaul E. McKenney
Currently, torture.sh assumes excessive levels of reviewer competence and thus fails to gracefully handle cases where it is tricked into giving kvm.sh invalid arguments. This commit therefore upgrades error handling to more gracefully handle this situation. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Neeraj Upadhyay (AMD) <neeraj.upadhyay@kernel.org>
2025-07-16torture: Add textid.txt file to --do-allmodconfig and --do-rcu-rust runsPaul E. McKenney
This commit causes the torture.sh --do-allmodconfig and --do-rcu-rust parameters to add testid.txt files to their results directories, thus allowing easier analysis of the results of a series of runs kicked off by "git bisect". Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Neeraj Upadhyay (AMD) <neeraj.upadhyay@kernel.org>
2025-07-16torture: Extract testid.txt generation to separate scriptPaul E. McKenney
The kvm.sh script places a testid.txt file in the top-level results directory in order to identify the tree and commit that was tested. This works well, but there are scripts other than kvm.sh that also create results directories, and it would be good for them to also identify exactly what was tested. This commit therefore extracts the testid.txt generation to a new mktestid.sh script so that it can be easily used elsewhere. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Neeraj Upadhyay (AMD) <neeraj.upadhyay@kernel.org>
2025-07-16torture: Suppress "find" diagnostics from torture.sh --do-none runPaul E. McKenney
When torture.sh is told to do nothing, it produces a couple of distracting diagnostics from the "find" command: find: ‘’: No such file or directory find: ‘’: No such file or directory This is pointless chatter and could cause confusion. This commit therefore suppresses these diagnostics when there is nothing to find. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Neeraj Upadhyay (AMD) <neeraj.upadhyay@kernel.org>
2025-07-16torture: Provide EXPERT Kconfig option for arm64 KCSAN torture.sh runsPaul E. McKenney
The arm64 architecture requires that KCSAN-enabled kernels be built with the CONFIG_EXPERT=y Kconfig option. This commit therefore causes the torture.sh script to provide this option, but only for --kcsan runs on arm64 systems. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Cc: Marco Elver <elver@google.com> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will@kernel.org> Cc: <kasan-dev@googlegroups.com> Cc: <linux-arm-kernel@lists.infradead.org> Acked-by: Will Deacon <will@kernel.org> Signed-off-by: Neeraj Upadhyay (AMD) <neeraj.upadhyay@kernel.org>
2025-06-25torture: Default --no-clocksourcewd on arm64Paul E. McKenney
Because arm64 does not support CONFIG_CLOCKSOURCE_WATCHDOG=n kernels, --do-clocksourcewd gets Kconfig errors. This commit therefore makes --do-no-clocksourcewd be the default on arm64. Note that arm64 users can still specify --do-clocksourcewd in order to override this default. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Neeraj Upadhyay (AMD) <neeraj.upadhyay@kernel.org>
2025-06-25torture: Default --no-rcutasksflavors on arm64Paul E. McKenney
Because arm64 does not support CONFIG_SMP=n kernels, --do-rcutasksflavors gets Kconfig errors when running the TINY01 rcutorture scenario. This commit therefore makes --no-rcutasksflavors be the default on arm64. Once kvm.sh automatically deselects CONFIG_SMP=n rcutorture scenarios on arm64, the two lines marked "FIXME" can be changed back from "${ifnotaarch64}" to "yes". Note that arm64 users can still specify --do-rcutasksflavors in order to override this default. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Neeraj Upadhyay (AMD) <neeraj.upadhyay@kernel.org>
2025-06-25torture: Make torture.sh KCSAN runs set CONFIG_RCU_TORTURE_TEST_CHK_RDR_STATE=yPaul E. McKenney
The RCU_TORTURE_TEST_CHK_RDR_STATE Kconfig option is used for low-level debugging of rcutorture's generation of overlapping and nested RCU readers. It incurs significant overhead, and is thus not to be used lightly. But if it is not tested regularly, it won't be there when it is needed, for example, it would have found an rcutorture bug in the testing of srcu_up_read(). This commit therefore uses CONFIG_RCU_TORTURE_TEST_CHK_RDR_STATE=y when building KCSAN kernels, but only for the --do-rcutorture case. Reported-by: kernel test robot <oliver.sang@intel.com> Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Neeraj Upadhyay (AMD) <neeraj.upadhyay@kernel.org>
2025-06-25torture: Permit multiple space characters in kvm.sh --kconfig argumentPaul E. McKenney
The straightforward way of doing bash substitution for optional strings leaves a pair of space characters, which the kvm.sh --kconfig option rejects as ill-formed. This commit therefore changes the corresponding regular expression to accommodate more than one space character between successive Kconfig options. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Neeraj Upadhyay (AMD) <neeraj.upadhyay@kernel.org>
2025-06-25torture: Suppress torture.sh "Zero time" messages for disabled testsPaul E. McKenney
The torture.sh script prints " --- Zero time for locktorture, disabling" when the --duration parameter is too short to allow the test to run even when locktorture has been disabled, for example, via --do-none. The same is true for scftorture and rcutorture. This commit therefore suppresses this message when the corresponding test has been disabled. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com> Signed-off-by: Neeraj Upadhyay (AMD) <neeraj.upadhyay@kernel.org>
2025-05-16rcutorture: Fix issue with re-using old images on ARM64Joel Fernandes
On ARM64, when running with --configs '36*SRCU-P', I noticed that only 1 instance instead of 36 for starting. Fix it by checking for Image files, instead of bzImage which ARM does not seem to have. With this I see all 36 instances running at the same time in the batch. Tested-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com>
2025-05-16torture: Check for "Call trace:" as well as "Call Trace:"Paul E. McKenney
Different architectures capitalize their splats differently. Who knew? This commit therefore checks for both arm64 "Call trace:" and x86 "Call Trace:". Reported-by: Joel Fernandes <joelagnelf@nvidia.com> Closes: https://lore.kernel.org/all/553c33d8-2b51-4772-8aef-97b0163bc78e@nvidia.com/ Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com>
2025-05-16torture: Add testing of RCU's Rust bindings to torture.shPaul E. McKenney
This commit adds a --do-rcu-rust parameter to torture.sh, which invokes a rust_doctests_kernel kunit run. Note that kunit wants a clean source tree, so this runs "make mrproper", which might come as a surprise to some users. Should there be a --mrproper parameter to torture.sh to make the user explicitly ask for it? Co-developed-by: Boqun Feng <boqun.feng@gmail.com> Signed-off-by: Boqun Feng <boqun.feng@gmail.com> Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com>
2025-05-16torture: Add --do-{,no-}normal to torture.shPaul E. McKenney
Right now, torture.sh runs normal runs unconditionally, which can be slow and thus annoying when you only want to test --kcsan or --kasan runs. This commit therefore adds a --do-normal argument so that "--kcsan --do-no-kasan --do-no-normal" runs only KCSAN runs. Note that specifying "--do-no-kasan --do-no-kcsan --do-no-normal" gets normal runs, so you should not try to use this as a synonym for --do-none. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com>
2025-04-11rcutorture: Make torture.sh --do-rt use CONFIG_PREEMPT_RTPaul E. McKenney
The torture.sh --do-rt command-line parameter is intended to mimic -rt kernels. Now that CONFIG_PREEMPT_RT is upstream, this commit makes this mimicking more precise. Note that testing of RCU priority boosting is disabled in favor of forward-progress testing of RCU callbacks. If it turns out to be possible to make kernels built with CONFIG_PREEMPT_RT=y to tolerate testing of both, both will be enabled. [ paulmck: Apply Sebastian Siewior feedback. ] Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com>
2025-04-08rcutorture: Make srcu_lockdep.sh check reader-conflict handlingPaul E. McKenney
Mixing different flavors of RCU readers is forbidden, for example, you should not use srcu_read_lock() and srcu_read_lock_nmisafe() on the same srcu_struct structure. There are checks for this, but these checks are not tested on a regular basis. This commit therefore adds such tests to srcu_lockdep.sh. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com>
2025-04-08rcutorture: Make srcu_lockdep.sh check kernel KconfigPaul E. McKenney
The srcu_lockdep.sh currently blindly trusts the rcutorture SRCU-P scenario to build its kernel with lockdep enabled. Of course, this dependency might not be obvious to someone rebalancing SRCU scenarios. This commit therefore adds code to srcu_lockdep.sh that verifies that the .config file has lockdep enabled. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com>
2025-02-05torture: Make SRCU lockdep testing use srcu_read_lock_nmisafe()Paul E. McKenney
Recent experience shows that the srcu_read_lock_nmisafe() and srcu_read_unlock_nmisafe() functions are not sufficiently tested. This commit therefore causes the torture.sh script's SRCU lockdep testing to use these two functions. This will cause these two functions to be regularly tested by several developers (myself included) who use torture.sh as an RCU acceptance test. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
2024-12-14torture: Make kvm-remote.sh give up on unresponsive systemPaul E. McKenney
Currently, a system that stops responding at the wrong time will hang kvm-remote.sh. This can happen when the system in question is forced offline for maintenance, and there is currently no way for the user to kick this script into moving ahead. This commit therefore causes kvm-remote.sh to wait at most 15 minutes for a non-responsive system, that is, a system for which ssh gives an exit code of 255. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
2024-11-12torture: Add --no-affinity parameter to kvm.shPaul E. McKenney
In performance tests, it can be counter-productive to spread torture-test guest OSes across sockets. Plus the experimenter might have ideas about what CPUs individual guest OSes are to run on. This commit therefore adds a --no-affinity parameter to kvm.sh to prevent it from running taskset on its guest OSes. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Reviewed-by: Neeraj Upadhyay <Neeraj.Upadhyay@amd.com> Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
2024-08-14torture: Add torture.sh --guest-cpu-limit argument for limited hostsPaul E. McKenney
Some servers have limitations on the number of CPUs a given guest OS can use. In my earlier experience, such limitations have been at least half of the host's CPUs, but in a recent example, this limit is less than 40%. This commit therefore adds a --guest-cpu-limit argument that allows such low limits to be made known to torture.sh. Signed-off-by: "Paul E. McKenney" <paulmck@kernel.org> Signed-off-by: Neeraj Upadhyay <neeraj.upadhyay@kernel.org>
2024-07-29rcutorture: Add CFcommon.arch for arch-specific Kconfig optionsZhouyi Zhou
Add CFcommon.arch for arch-specific Kconfig options. In accordance with [1], [2] and [3], move the x86-specific kernel option CONFIG_HYPERVISOR_GUEST to CFcommon.i686 and CFcommon.x86_64, and also move the x86/PowerPC CONFIG_KVM_GUEST Kconfig option to CFcommon.i686, CFcommon.x86_64, and CFcommon.ppc64le. The "arch" in CFcommon.arch is taken from the "uname -m" command. [1] https://lore.kernel.org/all/20240427005626.1365935-1-zhouzhouyi@gmail.com/ [2] https://lore.kernel.org/all/059d36ce-6453-42be-a31e-895abd35d590@paulmck-laptop/ [3] https://lore.kernel.org/all/ZnBkHosMDhsh4H8g@J2N7QTR9R3/ Tested in x86_64 and PPC VM of Open Source Lab of Oregon State University. Fixes: a6fda6dab93c ("rcutorture: Tweak kvm options") Suggested-by: Paul E. McKenney <paulmck@kernel.org> Suggested-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Zhouyi Zhou <zhouzhouyi@gmail.com> Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Neeraj Upadhyay <neeraj.upadhyay@kernel.org>
2024-04-16torture: Scale --do-kvfree test timePaul E. McKenney
Currently, the torture.sh --do-kvfree testing is hard-coded to ten minutes, ignoring the --duration argument. This commit therefore scales this test duration the same as for the rcutorture tests. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
2024-04-04rcutorture: Disable tracing to permit Tasks Rude RCU testingPaul E. McKenney
Now that the KPROBES, TRACING, BLK_DEV_IO_TRACE, and UPROBE_EVENTS Kconfig options select the TASKS_TRACE_RCU option, the torture.sh tests of enabling exactly one of the RCU Tasks flavors fail. This commit therefore disables these options to allow this testing to succeed. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
2024-04-04scftorture: Increase memory provided to guest OSPaul E. McKenney
The tradition, extending back almost a full year, has been 2GB plus an additional number of GBs equal to the number of CPUs divided by sixteen. This tradition has served scftorture well, even the CONFIG_PREEMPT=y version running KASAN within guest OSes having 40 CPUs. However, this test recently started OOMing on larger systems, and this commit therefore gives this test an additional GB of memory. It is quite possible that further testing on larger systems will show a need to decrease the divisor from 16 to (say) 8, but that is a change to make once it has been demonstrated to be required. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
2024-02-21clocksource: Scale the watchdog read retries automaticallyFeng Tang
On a 8-socket server the TSC is wrongly marked as 'unstable' and disabled during boot time on about one out of 120 boot attempts: clocksource: timekeeping watchdog on CPU227: wd-tsc-wd excessive read-back delay of 153560ns vs. limit of 125000ns, wd-wd read-back delay only 11440ns, attempt 3, marking tsc unstable tsc: Marking TSC unstable due to clocksource watchdog TSC found unstable after boot, most likely due to broken BIOS. Use 'tsc=unstable'. sched_clock: Marking unstable (119294969739, 159204297)<-(125446229205, -5992055152) clocksource: Checking clocksource tsc synchronization from CPU 319 to CPUs 0,99,136,180,210,542,601,896. clocksource: Switched to clocksource hpet The reason is that for platform with a large number of CPUs, there are sporadic big or huge read latencies while reading the watchog/clocksource during boot or when system is under stress work load, and the frequency and maximum value of the latency goes up with the number of online CPUs. The cCurrent code already has logic to detect and filter such high latency case by reading the watchdog twice and checking the two deltas. Due to the randomness of the latency, there is a low probabilty that the first delta (latency) is big, but the second delta is small and looks valid. The watchdog code retries the readouts by default twice, which is not necessarily sufficient for systems with a large number of CPUs. There is a command line parameter 'max_cswd_read_retries' which allows to increase the number of retries, but that's not user friendly as it needs to be tweaked per system. As the number of required retries is proportional to the number of online CPUs, this parameter can be calculated at runtime. Scale and enlarge the number of retries according to the number of online CPUs and remove the command line parameter completely. [ tglx: Massaged change log and comments ] Signed-off-by: Feng Tang <feng.tang@intel.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Jin Wang <jin1.wang@intel.com> Tested-by: Paul E. McKenney <paulmck@kernel.org> Reviewed-by: Waiman Long <longman@redhat.com> Reviewed-by: Paul E. McKenney <paulmck@kernel.org> Link: https://lore.kernel.org/r/20240221060859.1027450-1-feng.tang@intel.com
2023-11-23rcutorture: add nolibc init support for mips, ppc and rv64Thomas Weißschuh
Use nolibc for all support architectures. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Neeraj Upadhyay (AMD) <neeraj.iitr10@gmail.com>
2023-09-24torture: Convert parse-console.sh to mktempPaul E. McKenney
This commit does the long-overdue conversion of the parse-console.sh file to use mktemp to create its temporary directory. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
2023-09-24torture: Add kvm.sh --debug-info argumentPaul E. McKenney
This commit adds a --debug-info argument to kvm.sh in order to ease interpretation of addresses printed on the console and the like. This argument also disables KASLR. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
2023-09-24torture: Make torture.sh refscale testing qualify verbose_batchedPaul E. McKenney
In torture.sh, the testing of refscale incorrectly used verbose_batched as a kernel boot parameter, which causes this parameter to be passed to the init process. This commit therefore prefixes it with refscale, so that refscale.verbose_batched is passed to the kernel. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
2023-09-24rcutorture: Copy out ftrace into its own console fileJoel Fernandes (Google)
When debugging, it can be difficult to quickly find the ftrace dump within the console log, which in turn makes it difficult to process it independent of the rest of the console output. This commit therefore copies the contents of the buffers into its own file to make it easier to locate and process the ftrace dump. The original ftrace dump is still available in the console log in cases because it can be more convenient to process it in situ, for example, for scripts that process console output as well as ftrace-dump data. Also handle the case of multiple ftrace dumps potentially showing up in the log. Example for a file like [1], it will extract as [2]. [1]: foo foo Dumping ftrace buffer: --------------------------------- blah blah --------------------------------- more bar baz Dumping ftrace buffer: --------------------------------- blah2 blah2 --------------------------------- bleh bleh [2]: Ftrace dump 1: blah blah Ftrace dump 2: blah2 blah2 [ paulmck: Fixed awk indentation, input up front. ] Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org> Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
2023-09-24torture: Make kvm-recheck.sh use mktempPaul E. McKenney
This commit switches from the old "/tmp/kvm-recheck.sh.$$" approach to the newer and now reliable "mktemp" approach. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
2023-08-28Merge tag 'scftorture.2023.08.15a' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu Pull smp_call_function torture-test updates from Paul McKenney: "This prevents some memory-exhaustion false-postitive failures in scftorture testing" * tag 'scftorture.2023.08.15a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu: scftorture: Add CONFIG_PREEMPT_DYNAMIC=n to NOPREEMPT scenario scftorture: Pause testing after memory-allocation failure scftorture: Forgive memory-allocation failure if KASAN torture: Scale scftorture memory based on number of CPUs
2023-08-16Merge branches 'doc.2023.07.14b', 'fixes.2023.08.16a', ↵Paul E. McKenney
'rcu-tasks.2023.07.24a', 'rcuscale.2023.07.14b', 'refscale.2023.07.14b', 'torture.2023.08.14a' and 'torturescripts.2023.07.20a' into HEAD doc.2023.07.14b: Documentation updates. fixes.2023.08.16a: Miscellaneous fixes. rcu-tasks.2023.07.24a: RCU Tasks updates. rcuscale.2023.07.14b: RCU (updater) scalability test updates. refscale.2023.07.14b: Reference (reader) scalability test updates. torture.2023.08.14a: Other torture-test updates. torturescripts.2023.07.20a: Other torture-test scripting updates.
2023-07-20torture: Cause mkinitrd.sh to indicate failure on compile errorsPaul E. McKenney
Currently, if the C program created by mkinitrd.sh has compile errors, the errors are printed, but kvm.sh soldiers on, building kernels that have init-less initrd setups. The kernels then fail on boot when they attempt to mount non-existent root filesystems. This commit therefore improves user friendliness by making mkinitrd.sh return non-zero exit status on compile errors, which in turn causes kvm.sh to take an early exit, with the compile errors still clearly visible. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2023-07-20torture: Make init program dump command-line argumentsPaul E. McKenney
This commit causes the init program generated by mkinitrd.sh dump out its parameters. Although this is in some sense redundant given that the kernel already dumps them out, confirmation can be a good thing. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2023-07-20torture: Switch qemu from -nographic to -display nonePaul E. McKenney
This commit switches the qemu argument "-nographic" to "-display none", aligning with the nolibc tests. Cc: Willy Tarreau <w@1wt.eu> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2023-07-20torture: Add init-program support for loongarchPaul E. McKenney
This commit adds the __loongarch__, __loongarch_lp64, and __loongarch_double_float targets to rcutorture's mkinitrd.sh script in order to allow nolibc init programs for loongarch. [ paulmck: Apply feedback from Feiyang Chen. ] Cc: Feiyang Chen <chenfeiyang@loongson.cn> Cc: Huacai Chen <chenhuacai@loongson.cn> Cc: Willy Tarreau <w@1wt.eu> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2023-07-20torture: Avoid torture-test reboot loopsPaul E. McKenney
Currently, the various torture tests sometimes react to an early-boot bug by rebooting. This is almost always counterproductive, needlessly consuming CPU time and bloating the console log. This commit therefore adds the "-no-reboot" argument to qemu so that reboot requests will cause qemu to exit. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2023-07-20torture: Add srcu_lockdep.sh to torture.shPaul E. McKenney
This commit adds srcu_lockdep.sh to torture.sh, thus exercizing the extended SRCU-aware lockdep-RCU functionality on a regular basis. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2023-07-14torture: Loosen .config checks for KCSAN kernelsPaul E. McKenney
KCSAN enables some Kconfig options unilaterally and unconditionally, including CONFIG_PROVE_LOCKING. This in turn enables CONFIG_PROVE_RCU and CONFIG_PREEMPT_COUNT, which conflicts with constraints in SRCU-T, TRACE01, and TREE10, which in turn causes rcutorture to emit spurious configuration complaints. This commit therefore forgives configuration complaints involving CONFIG_PROVE_RCU and CONFIG_PREEMPT_COUNT. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2023-07-14torture: Make torture.sh summarize config and build errorsPaul E. McKenney
If some of the torture.sh runs had config and/or build errors, but all runs for which kernels were built ran successfully to completion, then torture.sh will incorrectly claim that all errors were KCSAN errors. This commit therefore makes torture.sh print the number of runs with config and build errors, and to refrain from claiming that all bugs were KCSAN bugs in that case. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2023-07-14torture: Place --bootargs parameters at end of -append listPaul E. McKenney
Currently, the kernel boot parameters specified by the kvm.sh --bootargs parameter are placed near the beginning of the -append list that is passed to qemu. This means that in the not-uncommon case of a kernel boot parameter where the last argument wins, the --bootargs list overrides neither the list in the .boot file nor the additional parameters supplied by the rcutorture scripting. This commit therefore places the kernel boot parameters specified by the kvm.sh --bootargs parameter at the end of qemu's -append list. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2023-07-14rcutorture: Remove obsolete parameter check from mkinitrd.shPaul E. McKenney
The mkinitrd.sh script no longer takes an argument, so this commit therefore removes the code that checks for the parameter being present. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Reviewed-by: Frederic Weisbecker <frederic@kernel.org>
2023-07-14torture: Make kvm-remote print diagnostics on initial ssh failurePaul E. McKenney
Currently, if the initial ssh fails, kvm-remote.sh gives up, printing a message saying so. But it would be nice to get a better idea as to why ssh failed. This commit therefore dumps out ssh's exit code, stdout, and stderr upon ssh failure for diagnostic purposes. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2023-07-14torture: Add RCU Tasks individual-flavor build testsPaul E. McKenney
This commit adds build tests of the individual RCU Tasks flavors in order to detect inadvertent dependencies among the flavors. Reported-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2023-07-14torture: Make kvm-recheck.sh report .config errorsPaul E. McKenney
Currently, kvm-recheck.sh will print out any .config errors with messages of the form: :CONFIG_TASKS_TRACE_RCU=y: improperly set However, if these are the only errors, the resulting exit code will declare the run successful. This commit therefore causes kvm-recheck.sh to record .config errors in the results directory in a file named ConfigFragment.diags and also returns a non-zero error code in that case. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2023-07-14torture: Allow #CHECK# in --kconfig argument to kvm.shPaul E. McKenney
Testing building of a given RCU Tasks flavor with the other two flavors disabled requires checking that the other two flavors are in fact disabled. This commit therefore modifies the scripting to permit things like "#CHECK#CONFIG_TASKS_TRACE_RCU=n" to be passed into the kvm.sh script's --kconfig parameter. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>