All of lore.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 3/8] ktest: Add USE_OUTPUT_MIN_CONFIG to avoid prompt on make_min_config
Date: Tue, 22 May 2012 08:05:34 -0400	[thread overview]
Message-ID: <20120522120630.558090845@goodmis.org> (raw)
In-Reply-To: 20120522120531.460108326@goodmis.org

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

From: Steven Rostedt <srostedt@redhat.com>

If the file that OUTPUT_MIN_CONFIG exists then ktest.pl will prompt the
user and ask them if the OUTPUT_MIN_CONFIG should be used as the
starting point for make_min_config instead of MIN_CONFIG.

This is usually the case, and to allow the user to do so, which is
helpful if the user is creating different min configs based on tests,
and they know one is a superset of another test, they can set
USE_OUTPUT_MIN_CONFIG to one, which will prevent kest.pl from prompting
to use the OUTPUT_MIN_CONFIG and it will just use it.

If USE_OUTPUT_MIN_CONIFG is set to zero, then ktest.pl will continue to
use MIN_CONFIG instead.

The default is that USE_OUTPUT_MIN_CONFIG is undefined.

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

diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index b6de819..292b13a 100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -109,6 +109,7 @@ my $start_minconfig;
 my $start_minconfig_defined;
 my $output_minconfig;
 my $minconfig_type;
+my $use_output_minconfig;
 my $ignore_config;
 my $ignore_errors;
 my $addconfig;
@@ -209,6 +210,7 @@ my %option_map = (
     "OUTPUT_MIN_CONFIG"		=> \$output_minconfig,
     "START_MIN_CONFIG"		=> \$start_minconfig,
     "MIN_CONFIG_TYPE"		=> \$minconfig_type,
+    "USE_OUTPUT_MIN_CONFIG"	=> \$use_output_minconfig,
     "IGNORE_CONFIG"		=> \$ignore_config,
     "TEST"			=> \$run_test,
     "ADD_CONFIG"		=> \$addconfig,
@@ -3146,8 +3148,15 @@ sub make_min_config {
     # that instead.
     if (-f $output_minconfig && !$start_minconfig_defined) {
 	print "$output_minconfig exists\n";
-	if (read_yn " Use it as minconfig?") {
+	if (!defined($use_output_minconfig)) {
+	    if (read_yn " Use it as minconfig?") {
+		$start_minconfig = $output_minconfig;
+	    }
+	} elsif ($use_output_minconfig > 0) {
+	    doprint "Using $output_minconfig as MIN_CONFIG\n";
 	    $start_minconfig = $output_minconfig;
+	} else {
+	    doprint "Set to still use MIN_CONFIG as starting point\n";
 	}
     }
 
diff --git a/tools/testing/ktest/sample.conf b/tools/testing/ktest/sample.conf
index 1c1b7dc..0e8191b 100644
--- a/tools/testing/ktest/sample.conf
+++ b/tools/testing/ktest/sample.conf
@@ -1113,6 +1113,12 @@
 #   config that is generated allows network activity (ssh).
 #   (optional)
 #
+#  USE_OUTPUT_MIN_CONFIG set this to 1 if you do not want to be prompted
+#   about using the OUTPUT_MIN_CONFIG as the MIN_CONFIG as the starting
+#   point. Set it to 0 if you want to always just use the given MIN_CONFIG.
+#   If it is not defined, it will prompt you to pick which config
+#   to start with (MIN_CONFIG or OUTPUT_MIN_CONFIG).
+#
 # Example:
 #
 #  TEST_TYPE = make_min_config
-- 
1.7.10



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

  parent reply	other threads:[~2012-05-22 12:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-22 12:05 [PATCH 0/8] [GIT PULL] ktest: updates for v3.5 Steven Rostedt
2012-05-22 12:05 ` [PATCH 1/8] ktest: Fix kernelrevision with POST_BUILD Steven Rostedt
2012-05-22 12:05 ` [PATCH 2/8] ktest: Add MIN_CONFIG_TYPE to allow making a minum .config that has network Steven Rostedt
2012-05-22 12:05 ` Steven Rostedt [this message]
2012-05-22 12:05 ` [PATCH 4/8] ktest: Add useful example configs Steven Rostedt
2012-05-22 12:05 ` [PATCH 5/8] ktest: Add kvm.conf example config Steven Rostedt
2012-05-22 12:05 ` [PATCH 6/8] ktest: Add an example config that does cross compiling of several archs Steven Rostedt
2012-05-22 12:05 ` [PATCH 7/8] ktest: Add the snowball.conf example config Steven Rostedt
2012-05-22 12:05 ` [PATCH 8/8] ktest: Add README to explain what is in the examples directory 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=20120522120630.558090845@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 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.