1. 07 Jan, 2021 17 commits
  2. 05 Jan, 2021 1 commit
    • Paul E. McKenney's avatar
      torture: Do Kconfig analysis only once per scenario · 11202817
      Paul E. McKenney authored
      Currently, if a scenario is repeated as in "--configs '4*TREE01'",
      the Kconfig analysis is performed for each occurrance (four times in
      this example) and each analysis places the exact same data into the
      exact same files.  This is not really an issue in this repetition-four
      example, but it can needlessly consume tens of seconds of wallclock time
      for something like "--config '128*TINY01'".
      
      This commit therefore does Kconfig analysis only once per set of
      repeats of a given scenario, courtesy of the "sort -u" command and an
      automatically generated awk script.
      
      While in the area, this commit also wordsmiths a comment.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
      11202817
  3. 04 Jan, 2021 19 commits
    • Paul E. McKenney's avatar
      torture: Allow standalone kvm-recheck.sh run detect --trust-make · b79b0b67
      Paul E. McKenney authored
      Normally, kvm-recheck.sh is run from kvm.sh, which provides the
      TORTURE_TRUST_MAKE environment variable that, if a non-empty string,
      indicates that the --trust-make command-line parameter has been passed
      to kvm.sh.  If there was no --trust-make, kvm-recheck.sh insists
      that the Make.out file contain at least one "CC" command.  Thus, when
      kvm-recheck.sh is run standalone to evaluate a prior --trust-make run,
      it will incorrectly insist that a proper kernel build did not happen.
      
      This commit therefore causes kvm-recheck.sh to also search the "log"
      file in the top-level results directory for the string "--trust-make".
      Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
      b79b0b67
    • Paul E. McKenney's avatar
      torture: Remove "Failed to add ttynull console" false positive · 546eee2d
      Paul E. McKenney authored
      Commit 757055ae ("init/console: Use ttynull as a fallback when
      there is no console") results in the string "Warning: Failed to add
      ttynull console. No stdin, stdout, and stderr for the init process!"
      appearing on the console, which the rcutorture scripting interprets as
      a warning, which causes every rcutorture run to be flagged.  However,
      the rcutorture init process never attempts to do any I/O, and thus does
      not care that it has no stdin, stdout, or stderr.
      
      This commit therefore causes the rcutorture scripting to ignore this
      message.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
      546eee2d
    • Paul E. McKenney's avatar
      torture: Simplify exit-code plumbing for kvm-recheck.sh and kvm-find-errors.sh · 365dc5cb
      Paul E. McKenney authored
      This commit simplifies exit-code plumbing.  It makes kvm-recheck.sh return
      the value 1 for a build error and 2 for a runtime error.  It also makes
      kvm-find-errors.sh avoid checking runtime files for --build-only runs.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
      365dc5cb
    • Paul E. McKenney's avatar
      torture: s/STOP/STOP.1/ to avoid scenario collision · c821f855
      Paul E. McKenney authored
      This commit changes the "STOP" file that is used to cleanly halt a running
      rcutorture run to "STOP.1" because no scenario directory will ever end
      with ".1".  If there really was a scenario named "STOP", its directories
      would instead be named "STOP", "STOP.2", "STOP.3", and so on.  While in
      the area, the commit also changes the kernel-run-time checks for this
      file to look directly in the directory above $resdir, thus avoiding the
      need to pass the TORTURE_STOPFILE environment variable to remote systems.
      
      While in the area, move the STOP.1 file to the top-level directory
      covering all of the scenarios.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
      c821f855
    • Paul E. McKenney's avatar
      torture: Add --dryrun batches to help schedule a distributed run · 755cf0af
      Paul E. McKenney authored
      When all of the remote systems have the same number of CPUs, one
      approach is to use one "--buildonly" run and one "--dryrun sched" run,
      and then distributing the batches out one per remote system.  However,
      the output of "--dryrun sched" is not made for parsing, so this commit
      adds a "--dryrun batches" that provides the same information in easily
      parsed form.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
      755cf0af
    • Paul E. McKenney's avatar
      torture: Stop hanging on panic · f716348f
      Paul E. McKenney authored
      By default, the "panic" kernel parameter is zero, which causes the kernel
      to loop indefinitely after a panic().  The rcutorture scripting will
      eventually kill the corresponding qemu process, but only after waiting
      for the full run duration plus a few minutes.  This works, but delays
      notifying the developer of the failure.
      
      This commit therefore causes the rcutorture scripting to pass the
      "panic=-1" kernel parameter, which caused the kernel to instead
      unceremoniously shut down immediately.  This in turn causes qemu to
      terminate, so that if all of the runs in a given batch panic(), the
      rcutorture scripting can immediately proceed to the next batch.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
      f716348f
    • Paul E. McKenney's avatar
      torture: Add kvm.sh test summary to end of log file · 0beb3948
      Paul E. McKenney authored
      This commit adds the test summary to the end of the log in the top-level
      directory containing the kvm.sh test artifacts.  While in the area, it adds
      the kvm.sh exit code to this test summary.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
      0beb3948
    • Paul E. McKenney's avatar
      torture: Make kvm.sh include --kconfig arguments in CPU calculation · 22bf64cc
      Paul E. McKenney authored
      Currently, passing something like "--kconfig CONFIG_NR_CPUS=2" to kvm.sh
      has no effect on scenario scheduling.  For scenarios that do not specify
      the number of CPUs, this can result in kvm.sh wastefully scheduling only
      one scenario at a time even when the --kconfig argument would allow
      a number to be run concurrently.  This commit therefore makes kvm.sh
      consider the --kconfig arguments when scheduling scenarios across the
      available CPUs.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
      22bf64cc
    • Paul E. McKenney's avatar
      torture: Make kvm.sh return failure upon build failure · 23239fc0
      Paul E. McKenney authored
      The kvm.sh script uses kvm-find-errors.sh to evaluate whether or not
      a build failed.  Unfortunately, kvm-find-errors.sh returns success if
      there are no failed runs (including when there are no runs at all) even if
      there are build failures.  This commit therefore makes kvm-find-errors.sh
      return failure in response to build failures.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
      23239fc0
    • Paul E. McKenney's avatar
      torture: Print run duration at end of kvm.sh execution · 0bcca183
      Paul E. McKenney authored
      Yes, you can mentally subtract the timestamps, but this commit makes
      the computer do this work.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
      0bcca183
    • Paul E. McKenney's avatar
      torture: Make kvm.sh arguments accumulate · 45261371
      Paul E. McKenney authored
      Given that kvm.sh in invoked from scripts, it is only natural for
      different levels of scripting to provide their own Kconfig option values,
      for example.  Unfortunately, right now, the last such argument on the
      command line wins.
      
      This commit therefore makes the --bootargs, --configs, --kconfigs,
      --kmake-args, and --qemu-args argument values accumulate.  For example,
      where "--configs TREE01 --configs TREE02" would previously have run only
      scenario TREE02, now it will run both scenarios.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
      45261371
    • Paul E. McKenney's avatar
      torture: Make kvm.sh "Test Summary" date be end of test · cb212767
      Paul E. McKenney authored
      Currently, the "date" command producing the output on the kvm.sh "Test
      Summary" line is executed at the beginning of the test, which produces a
      date that is less than helpful to someone wanting to know the duration
      of the test.  This commit therefore defers this command's execution to
      the end of the test.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
      cb212767
    • Frederic Weisbecker's avatar
      tools/rcutorture: Make identify_qemu_vcpus() independent of local language · 106cc0d9
      Frederic Weisbecker authored
      The rcutorture scripts' identify_qemu_vcpus() function expects `lscpu`
      to have a "CPU: " line, for example:
      
      	CPU(s):		8
      
      But different local language settings can give different results:
      
      	Processeur(s) :		8
      
      As a result, identify_qemu_vcpus() may return an empty string, resulting
      in the following warning (with the same local language settings):
      
      	kvm-test-1-run.sh: ligne 138 : test:  : nombre entier attendu comme expression
      
      This commit therefore changes identify_qemu_vcpus() to use getconf,
      which produces local-language-independend output.
      
      Cc: Josh Triplett <josh@joshtriplett.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Cc: Lai Jiangshan <jiangshanlai@gmail.com>
      Cc: rcu@vger.kernel.org
      Signed-off-by: default avatarFrederic Weisbecker <frederic@kernel.org>
      Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
      106cc0d9
    • Paul E. McKenney's avatar
      torture: Add config2csv.sh script to compare torture scenarios · d4a945e2
      Paul E. McKenney authored
      This commit adds a config2csv.sh script that converts the specified
      torture-test scenarios' Kconfig options and kernel-boot parameters to
      .csv format.  This allows easier comparison of scenarios when one fails
      and another does not.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
      d4a945e2
    • Paul E. McKenney's avatar
      torture: Prepare for splitting qemu execution from kvm-test-1-run.sh · 315957ca
      Paul E. McKenney authored
      Distributed execution of rcutorture is eased if the qemu execution can
      be split from the building of the kernel, as this allows target systems
      to be used that are not set up to build kernels.  It also avoids issues
      with toolchain version skew across the cluster, aside of course from
      qemu and KVM version skew.
      
      This commit therefore records needed data as comments in the qemu-cmd file
      and moves recording of the starting time to just before qemu is launched.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
      315957ca
    • Paul E. McKenney's avatar
      torture: Allow kvm.sh --datestamp to specify subdirectories · bc407358
      Paul E. McKenney authored
      Scripts like kvm-check-branches.sh group runs under a single directory
      in resdir in order to allow easier retrospective analysis.  However, they
      do this by letting kvm.sh create a directory as usual and then moving it
      after the run.  This can be very confusing when looking at the results
      while kvm-check-branches.sh is running.  This commit therefore enables
      --datestamp to hand subdirectories to kvm.sh.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
      bc407358
    • Paul E. McKenney's avatar
      torture: Make kvm.sh "--dryrun sched" summarize number of builds · eca0501a
      Paul E. McKenney authored
      Knowing the number of builds that kvm.sh will split a run into allows
      estimation of the duration of a test, give or take build duration.
      This commit therefore adds a line of output to "--dryrun sched" that
      gives the number of builds that will be run.  This excludes "builds"
      for repeated scenarios that reuse an earlier build.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
      eca0501a
    • Paul E. McKenney's avatar
      torture: Make kvm.sh "--dryrun sched" summarize number of batches · 1f947be7
      Paul E. McKenney authored
      Knowing the number of batches that kvm.sh will split a run into allows
      estimation of the duration of a test, give or take the number of builds.
      This commit therefore adds a line of output to "--dryrun sched" that
      gives the number of batches that will be run.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
      1f947be7
    • Paul E. McKenney's avatar
      torture: Make --kcsan specify lockdep · 0682aa7a
      Paul E. McKenney authored
      The --kcsan argument to kvm.sh adds CONFIG_KCSAN_VERBOSE=y in order to
      get more detail from the KCSAN reports.  However, this Kconfig option
      requires lockdep to be enabled.  This commit therefore causes --kcsan
      to also enable lockdep.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
      0682aa7a
  4. 27 Dec, 2020 3 commits