From: paulmck@kernel.org To: rcu@vger.kernel.org Cc: linux-kernel@vger.kernel.org, kernel-team@fb.com, mingo@kernel.org, jiangshanlai@gmail.com, akpm@linux-foundation.org, mathieu.desnoyers@efficios.com, josh@joshtriplett.org, tglx@linutronix.de, peterz@infradead.org, rostedt@goodmis.org, dhowells@redhat.com, edumazet@google.com, fweisbec@gmail.com, oleg@redhat.com, joel@joelfernandes.org, "Paul E. McKenney" <paulmck@kernel.org> Subject: [PATCH tip/core/rcu 03/18] torture: Make torture.sh use common time-duration bash functions Date: Wed, 6 Jan 2021 09:31:04 -0800 Message-ID: <20210106173119.23159-3-paulmck@kernel.org> (raw) In-Reply-To: <20210106173056.GA23035@paulmck-ThinkPad-P72> From: "Paul E. McKenney" <paulmck@kernel.org> 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> --- tools/testing/selftests/rcutorture/bin/torture.sh | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) mode change 100644 => 100755 tools/testing/selftests/rcutorture/bin/torture.sh diff --git a/tools/testing/selftests/rcutorture/bin/torture.sh b/tools/testing/selftests/rcutorture/bin/torture.sh old mode 100644 new mode 100755 index f556cc7..1657404 --- a/tools/testing/selftests/rcutorture/bin/torture.sh +++ b/tools/testing/selftests/rcutorture/bin/torture.sh @@ -13,6 +13,10 @@ scriptname=$0 args="$*" +KVM="`pwd`/tools/testing/selftests/rcutorture"; export KVM +PATH=${KVM}/bin:$PATH; export PATH +. functions.sh + # Default duration and apportionment. duration_base=10 duration_rcutorture_frac=7 @@ -172,7 +176,7 @@ touch $T/successes ds="`date +%Y.%m.%d-%H.%M.%S`-torture" startdate="`date`" -starttime="`awk 'BEGIN { print systime() }' < /dev/null`" +starttime="`get_starttime`" # tortureme flavor command # Note that "flavor" is an arbitrary string. Supply --torture if needed. @@ -274,17 +278,7 @@ then nfailures="`wc -l "$T/failures" | awk '{ print $1 }'`" ret=2 fi -duration="`awk -v starttime=$starttime ' -BEGIN { - s = systime() - starttime; - h = s / 3600; - d = h /24; - if (d < 1) - print h " hours"; - else - print d " days (" h " hours)"; -}' < /dev/null`" -echo Started at $startdate, ended at `date`, duration $duration. | tee -a $T/log +echo Started at $startdate, ended at `date`, duration `get_starttime_duration $starttime`. | tee -a $T/log echo Summary: Successes: $nsuccesses Failures: $nfailures. | tee -a $T/log tdir="`cat $T/successes $T/failures | head -1 | awk '{ print $NF }' | sed -e 's,/[^/]\+/*$,,'`" if test -n "$tdir" @@ -293,9 +287,9 @@ then fi exit $ret +# @@@ # RCU CPU stall warnings? # scftorture warnings? # Need a way for the invoker to specify clang. # Work out --configs based on number of available CPUs? -# Need a way to specify --configs. --configs--rcutorture? # Need to sense CPUs to size scftorture run. Ditto rcuscale and refscale. -- 2.9.5
next prev parent reply index Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-01-06 17:30 [PATCH tip/core/rcu 0/18] Add a torture-all acceptance-test script for v5.12 Paul E. McKenney 2021-01-06 17:31 ` [PATCH tip/core/rcu 01/18] torture: Do Kconfig analysis only once per scenario paulmck 2021-01-06 17:31 ` [PATCH tip/core/rcu 02/18] torture: Add torture.sh torture-everything script paulmck 2021-01-06 17:31 ` paulmck [this message] 2021-01-06 17:31 ` [PATCH tip/core/rcu 04/18] torture: Remove use of "eval" in torture.sh paulmck 2021-01-06 17:31 ` [PATCH tip/core/rcu 05/18] torture: Add "make allmodconfig" to torture.sh paulmck 2021-01-06 17:31 ` [PATCH tip/core/rcu 06/18] torture: Auto-size SCF and scaling runs based on number of CPUs paulmck 2021-01-06 17:31 ` [PATCH tip/core/rcu 07/18] torture: Enable torture.sh argument checking paulmck 2021-01-06 17:31 ` [PATCH tip/core/rcu 08/18] torture: Make torture.sh rcuscale and refscale deal with allmodconfig paulmck 2021-01-06 17:31 ` [PATCH tip/core/rcu 09/18] torture: Make torture.sh refscale runs use verbose_batched module parameter paulmck 2021-01-06 17:31 ` [PATCH tip/core/rcu 10/18] torture: Create doyesno helper function for torture.sh paulmck 2021-01-06 17:31 ` [PATCH tip/core/rcu 11/18] torture: Make torture.sh allmodconfig retain and label output paulmck 2021-01-06 17:31 ` [PATCH tip/core/rcu 12/18] torture: Make torture.sh throttle VERBOSE_TOROUT_*() for refscale paulmck 2021-01-06 17:31 ` [PATCH tip/core/rcu 13/18] torture: Make torture.sh refuse to do zero-length runs paulmck 2021-01-06 17:31 ` [PATCH tip/core/rcu 14/18] torture: Drop log.long generation from torture.sh paulmck 2021-01-06 17:31 ` [PATCH tip/core/rcu 15/18] torture: Allow scenarios to be specified to torture.sh paulmck 2021-01-06 17:31 ` [PATCH tip/core/rcu 16/18] torture: Add command and results directory to torture.sh log paulmck 2021-01-06 17:31 ` [PATCH tip/core/rcu 17/18] torture: Add --kcsan-kmake-arg to torture.sh for KCSAN paulmck 2021-01-06 17:31 ` [PATCH tip/core/rcu 18/18] torture: Compress KASAN vmlinux files paulmck
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210106173119.23159-3-paulmck@kernel.org \ --to=paulmck@kernel.org \ --cc=akpm@linux-foundation.org \ --cc=dhowells@redhat.com \ --cc=edumazet@google.com \ --cc=fweisbec@gmail.com \ --cc=jiangshanlai@gmail.com \ --cc=joel@joelfernandes.org \ --cc=josh@joshtriplett.org \ --cc=kernel-team@fb.com \ --cc=linux-kernel@vger.kernel.org \ --cc=mathieu.desnoyers@efficios.com \ --cc=mingo@kernel.org \ --cc=oleg@redhat.com \ --cc=peterz@infradead.org \ --cc=rcu@vger.kernel.org \ --cc=rostedt@goodmis.org \ --cc=tglx@linutronix.de \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
RCU Archive on lore.kernel.org Archives are clonable: git clone --mirror https://lore.kernel.org/rcu/0 rcu/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 rcu rcu/ https://lore.kernel.org/rcu \ rcu@vger.kernel.org public-inbox-index rcu Example config snippet for mirrors Newsgroup available over NNTP: nntp://nntp.lore.kernel.org/org.kernel.vger.rcu AGPL code for this site: git clone https://public-inbox.org/public-inbox.git