All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: "John Warthog9 Hawley" <warthog9@kernel.org>,
	Scott Wood <swood@redhat.com>,
	Tim Tianyang Chen <tianyang.chen@oracle.com>
Subject: [for-next][PATCH 11/23] ktest.pl: Have ktest.pl pass -r to config-bisect.pl to reset bisect
Date: Sun, 08 Apr 2018 16:17:19 -0400	[thread overview]
Message-ID: <20180408201835.063916215@goodmis.org> (raw)
In-Reply-To: 20180408201708.346970379@goodmis.org

[-- Attachment #1: 0011-ktest.pl-Have-ktest.pl-pass-r-to-config-bisect.pl-to.patch --]
[-- Type: text/plain, Size: 3107 bytes --]

From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>

If config-bisect.pl sees that a config_bisect has already been started, it
will ask on the command line if it should bisect or not. This will mess up
running config_bisect from ktest.pl.

Have ktest.pl pass in '-r' to config-bisect.pl and have config-bisect.pl
recognize that to reset without asking.

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 tools/testing/ktest/config-bisect.pl | 21 ++++++++++++++-------
 tools/testing/ktest/ktest.pl         |  6 +++++-
 2 files changed, 19 insertions(+), 8 deletions(-)

diff --git a/tools/testing/ktest/config-bisect.pl b/tools/testing/ktest/config-bisect.pl
index 37cd796efa2b..b28feea7c363 100755
--- a/tools/testing/ktest/config-bisect.pl
+++ b/tools/testing/ktest/config-bisect.pl
@@ -52,11 +52,11 @@
 
 # If "good" or "bad" is not stated at the end, it will copy the good and
 # bad configs to the .tmp versions. If a .tmp version already exists, it will
-# warn before writing over them. If the last config is labeled "good", then
-# it will copy it to the good .tmp version. If the last config is labeled
-# "bad", it will copy it to the bad .tmp version. It will continue this until
-# it can not merge the two any more without the result being equal to either
-# the good or bad .tmp configs.
+# warn before writing over them (-r will not warn, and just write over them).
+# If the last config is labeled "good", then it will copy it to the good .tmp
+# version. If the last config is labeled "bad", it will copy it to the bad
+# .tmp version. It will continue this until it can not merge the two any more
+# without the result being equal to either the good or bad .tmp configs.
 
 my $start = 0;
 my $val = "";
@@ -67,6 +67,7 @@ my $tree = $pwd;
 my $build;
 
 my $output_config;
+my $reset_bisect;
 
 sub usage {
     print << "EOF"
@@ -654,6 +655,10 @@ while ($#ARGV >= 0) {
 	$tree = $val;
     }
 
+    elsif ($opt eq "-r") {
+	$reset_bisect = 1;
+    }
+
     elsif ($opt eq "-h") {
 	usage;
     }
@@ -721,8 +726,10 @@ if ($start) {
 	    $p = "$p$bad exists\n";
 	}
 
-	if (!read_yn "${p}Overwrite and start new bisect anyway?") {
-	    exit (-1);
+	if (!defined($reset_bisect)) {
+	    if (!read_yn "${p}Overwrite and start new bisect anyway?") {
+		exit (-1);
+	    }
 	}
     }
     run_command "cp $good_start $good" or die "failed to copy to $good\n";
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index 27505fef2dab..fe6a7bb7d7d9 100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -3127,10 +3127,14 @@ sub config_bisect_end {
 
 sub run_config_bisect {
     my ($good, $bad, $last_result) = @_;
+    my $reset = "";
     my $cmd;
     my $ret;
 
-    run_command "$builddir/tools/testing/ktest/config-bisect.pl -b $outputdir $good $bad $last_result", 1;
+    if (!length($last_result)) {
+	$reset = "-r";
+    }
+    run_command "$builddir/tools/testing/ktest/config-bisect.pl $reset -b $outputdir $good $bad $last_result", 1;
 
     # config-bisect returns:
     #   0 if there is more to bisect
-- 
2.16.3

  parent reply	other threads:[~2018-04-08 20:18 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-08 20:17 [for-next][PATCH 00/23] ktest: Updates for 4.17 Steven Rostedt
2018-04-08 20:17 ` [for-next][PATCH 01/23] ktest: Wait for console process to exit Steven Rostedt
2018-04-08 20:17 ` [for-next][PATCH 02/23] ktest: Add CONNECT_TIMEOUT to change the connection timeout time Steven Rostedt
2018-04-08 20:17 ` [for-next][PATCH 03/23] ktest: Clarify config file usage Steven Rostedt
2018-04-08 20:17 ` [for-next][PATCH 04/23] ktest: Comment about other names than just ktest.conf Steven Rostedt
2018-04-08 20:17 ` [for-next][PATCH 05/23] ktest: Set buildonly=1 for CONFIG_BISECT_TYPE=build Steven Rostedt
2018-04-08 20:17 ` [for-next][PATCH 06/23] ktest: Set do_not_reboot=y " Steven Rostedt
2018-04-08 20:17 ` [for-next][PATCH 07/23] ktest: Add standalone config-bisect.pl program Steven Rostedt
2018-04-08 20:17 ` [for-next][PATCH 08/23] ktest: Use config-bisect.pl in ktest.pl Steven Rostedt
2018-04-08 20:17 ` [for-next][PATCH 09/23] ktest.pl: Allow for the config-bisect.pl output to display to console Steven Rostedt
2018-04-08 20:17 ` [for-next][PATCH 10/23] ktest.pl: Use diffconfig if available for failed config bisects Steven Rostedt
2018-04-08 20:17 ` Steven Rostedt [this message]
2018-04-08 20:17 ` [for-next][PATCH 12/23] ktest.pl: Make finding config-bisect.pl dynamic Steven Rostedt
2018-04-08 20:17 ` [for-next][PATCH 13/23] ktest.pl: Detect if a config-bisect was interrupted Steven Rostedt
2018-04-08 20:17 ` [for-next][PATCH 14/23] Ktest: Add email support Steven Rostedt
2018-04-08 20:17 ` [for-next][PATCH 15/23] Ktest: Add SigInt handling Steven Rostedt
2018-04-08 20:17 ` [for-next][PATCH 16/23] Ktest: Use dodie for critical falures Steven Rostedt
2018-04-08 20:17 ` [for-next][PATCH 17/23] Ktest: add email options to sample.config Steven Rostedt
2018-04-08 20:17 ` [for-next][PATCH 18/23] ktest.pl: No need to print no mailer is specified when mailto is not Steven Rostedt
2018-04-08 20:17 ` [for-next][PATCH 19/23] ktest.pl: Add MAIL_PATH option to define where to find the mailer Steven Rostedt
2018-04-08 20:17 ` [for-next][PATCH 20/23] ktest.pl: Kill test if mailer is not supported Steven Rostedt
2018-04-08 20:17 ` [for-next][PATCH 21/23] ktest.pl: Allow dodie be recursive Steven Rostedt
2018-04-08 20:17 ` [for-next][PATCH 22/23] ktest.pl: Use run_command to execute sending mail Steven Rostedt
2018-04-08 20:17 ` [for-next][PATCH 23/23] ktest.pl: Add MAIL_COMMAND option to define how to send email Steven Rostedt

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=20180408201835.063916215@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=swood@redhat.com \
    --cc=tianyang.chen@oracle.com \
    --cc=warthog9@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.