mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "tip-bot2 for Paul E. McKenney" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: "Paul E. McKenney" <paulmck@kernel.org>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: core/rcu] torture: Make torture.sh use common time-duration bash functions
Date: Fri, 12 Feb 2021 12:37:14 -0000	[thread overview]
Message-ID: <161313343482.23325.159300005773488089.tip-bot2@tip-bot2> (raw)

The following commit has been merged into the core/rcu branch of tip:

Commit-ID:     1adb5d6b52251105f77630432b36e340cdcb3390
Gitweb:        https://git.kernel.org/tip/1adb5d6b52251105f77630432b36e340cdcb3390
Author:        Paul E. McKenney <paulmck@kernel.org>
AuthorDate:    Sun, 22 Nov 2020 16:49:15 -08:00
Committer:     Paul E. McKenney <paulmck@kernel.org>
CommitterDate: Wed, 06 Jan 2021 17:03:37 -08:00

torture: Make torture.sh use common time-duration bash functions

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 7f21aab..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.

                 reply	other threads:[~2021-02-12 12:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=161313343482.23325.159300005773488089.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=paulmck@kernel.org \
    --cc=x86@kernel.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®