public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Subject: [PATCH 04/10] ktest: Add CONFIG_BISECT_CHECK option
Date: Mon, 30 Jul 2012 15:23:18 -0400	[thread overview]
Message-ID: <20120730192656.508834300@goodmis.org> (raw)
In-Reply-To: 20120730192314.144253843@goodmis.org

[-- Attachment #1: Type: text/plain, Size: 2721 bytes --]

From: Steven Rostedt <srostedt@redhat.com>

The config-bisect can take a bad config and bisect it down to find out
what config actually breaks the config. But as all tests will apply a
minconfig (defined by a user) to apply before booting, it is possible
that the minconfig could actually make the bad config work (minconfigs
can disable configs). The end result is that the config bisect test will
not find a config that breaks. This can be rather frustrating to the
user.

The CONFIG_BISECT_CHECK option, when set to 1, will make sure that the
bad config (with the minconfig applied) still fails before trying to
bisect.

And yes, I did get burned by this.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 tools/testing/ktest/ktest.pl    |   14 ++++++++++++++
 tools/testing/ktest/sample.conf |    6 ++++++
 2 files changed, 20 insertions(+)

diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index e91702e..8ce58d7 100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -173,6 +173,7 @@ my $bisect_check;
 
 my $config_bisect;
 my $config_bisect_type;
+my $config_bisect_check;
 
 my $patchcheck_type;
 my $patchcheck_start;
@@ -283,6 +284,7 @@ my %option_map = (
 
     "CONFIG_BISECT"		=> \$config_bisect,
     "CONFIG_BISECT_TYPE"	=> \$config_bisect_type,
+    "CONFIG_BISECT_CHECK"	=> \$config_bisect_check,
 
     "PATCHCHECK_TYPE"		=> \$patchcheck_type,
     "PATCHCHECK_START"		=> \$patchcheck_start,
@@ -2743,6 +2745,18 @@ sub config_bisect {
 	}
     }
     my $ret;
+
+    if (defined($config_bisect_check) && $config_bisect_check) {
+	doprint " Checking to make sure bad config with min config fails\n";
+	create_config keys %config_list;
+	$ret = run_config_bisect_test $config_bisect_type;
+	if ($ret) {
+	    doprint " FAILED! Bad config with min config boots fine\n";
+	    return -1;
+	}
+	doprint " Bad config with min config fails as expected\n";
+    }
+
     do {
 	$ret = run_config_bisect;
     } while (!$ret);
diff --git a/tools/testing/ktest/sample.conf b/tools/testing/ktest/sample.conf
index 19754e0..e4a12da 100644
--- a/tools/testing/ktest/sample.conf
+++ b/tools/testing/ktest/sample.conf
@@ -1077,6 +1077,12 @@
 #  can specify it with CONFIG_BISECT_GOOD. Otherwise
 #  the MIN_CONFIG is the base.
 #
+# CONFIG_BISECT_CHECK (optional)
+#  Set this to 1 if you want to confirm that the config ktest
+#  generates (the bad config with the min config) is still bad.
+#  It may be that the min config fixes what broke the bad config
+#  and the test will not return a result.
+#
 # Example:
 #   TEST_START
 #   TEST_TYPE = config_bisect
-- 
1.7.10.4



[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  parent reply	other threads:[~2012-07-30 19:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-30 19:23 [PATCH 00/10] [GIT PULL] ktest: changes for v3.6 Steven Rostedt
2012-07-30 19:23 ` [PATCH 01/10] ktest: Remove commented exit Steven Rostedt
2012-07-30 19:23 ` [PATCH 02/10] ktest: Add PRE/POST_KTEST and TEST options Steven Rostedt
2012-07-30 19:23 ` [PATCH 03/10] ktest: Add PRE_INSTALL option Steven Rostedt
2012-07-30 19:23 ` Steven Rostedt [this message]
2012-07-30 19:23 ` [PATCH 05/10] ktest: Fix config bisect with how make oldnoconfig works Steven Rostedt
2012-07-30 19:23 ` [PATCH 06/10] ktest: Add MAX_MONITOR_WAIT option Steven Rostedt
2012-07-30 19:23 ` [PATCH 07/10] ktest: Add check for bug or panic during reboot Steven Rostedt
2012-07-30 19:23 ` [PATCH 08/10] ktest: Reset saved min (force) configs for each test Steven Rostedt
2012-07-30 19:23 ` [PATCH 09/10] ktest: Ignore errors it tests if IGNORE_ERRORS is set Steven Rostedt
2012-07-30 19:23 ` [PATCH 10/10] ktest: Allow perl regex expressions in conditional statements 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=20120730192656.508834300@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.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