* [for-next][PATCH 1/5] ktest: Use make -s kernelrelease
2014-11-24 15:42 [for-next][PATCH 0/5] ktest: Updates for 3.19 Steven Rostedt
@ 2014-11-24 15:42 ` Steven Rostedt
2014-11-24 15:42 ` [for-next][PATCH 2/5] ktest: Fix make_min_config to handle new assign_configs call Steven Rostedt
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Steven Rostedt @ 2014-11-24 15:42 UTC (permalink / raw)
To: linux-kernel; +Cc: Andrew Morton, Michal Marek
[-- Attachment #1: 0001-ktest-Use-make-s-kernelrelease.patch --]
[-- Type: text/plain, Size: 961 bytes --]
From: Michal Marek <mmarek@suse.cz>
The previous tail -1 broke with commit 7ff525712acf ("kbuild: fake the
"Entering directory ..." message more simply")
Link: http://lkml.kernel.org/r/20141022194408.GA20989@pobox.suse.cz
Reported-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
tools/testing/ktest/ktest.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index bf1398180785..60fe020a6e80 100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -2005,7 +2005,7 @@ sub get_version {
# get the release name
return if ($have_version);
doprint "$make kernelrelease ... ";
- $version = `$make kernelrelease | tail -1`;
+ $version = `$make -s kernelrelease`;
chomp($version);
doprint "$version\n";
$have_version = 1;
--
2.1.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* [for-next][PATCH 2/5] ktest: Fix make_min_config to handle new assign_configs call
2014-11-24 15:42 [for-next][PATCH 0/5] ktest: Updates for 3.19 Steven Rostedt
2014-11-24 15:42 ` [for-next][PATCH 1/5] ktest: Use make -s kernelrelease Steven Rostedt
@ 2014-11-24 15:42 ` Steven Rostedt
2014-11-24 15:42 ` [for-next][PATCH 3/5] ktest: Allow tests to undefine default options Steven Rostedt
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Steven Rostedt @ 2014-11-24 15:42 UTC (permalink / raw)
To: linux-kernel; +Cc: Andrew Morton, stable
[-- Attachment #1: 0002-ktest-Fix-make_min_config-to-handle-new-assign_confi.patch --]
[-- Type: text/plain, Size: 1284 bytes --]
From: "Steven Rostedt (Red Hat)" <rostedt@goodmis.org>
Commit 6071c22e1755 "ktest: Rewrite the config-bisect to actually work"
fixed the config-bisect to work nicely but in doing so it broke
make_min_config by changing the way assign_configs works.
The assign_configs function now adds the config to the hash even if
it is disabled, but changes the hash value to be that of the
line "# CONFIG_FOO is not set". Unfortunately, the make_min_config
test only checks to see if the config is removed. It now needs to
check if the config is in the hash and not set to be disabled.
Cc: stable@vger.kernel.org # 3.17+
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
tools/testing/ktest/ktest.pl | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index 60fe020a6e80..89c2257bed98 100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -3571,7 +3571,9 @@ sub test_this_config {
undef %configs;
assign_configs \%configs, $output_config;
- return $config if (!defined($configs{$config}));
+ if (!defined($configs{$config}) || $configs{$config} =~ /^#/) {
+ return $config;
+ }
doprint "disabling config $config did not change .config\n";
--
2.1.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* [for-next][PATCH 3/5] ktest: Allow tests to undefine default options
2014-11-24 15:42 [for-next][PATCH 0/5] ktest: Updates for 3.19 Steven Rostedt
2014-11-24 15:42 ` [for-next][PATCH 1/5] ktest: Use make -s kernelrelease Steven Rostedt
2014-11-24 15:42 ` [for-next][PATCH 2/5] ktest: Fix make_min_config to handle new assign_configs call Steven Rostedt
@ 2014-11-24 15:42 ` Steven Rostedt
2014-11-24 15:42 ` [for-next][PATCH 4/5] ktest: Add name to running title Steven Rostedt
2014-11-24 15:42 ` [for-next][PATCH 5/5] ktest: Add back "tail -1" to kernelrelease make Steven Rostedt
4 siblings, 0 replies; 6+ messages in thread
From: Steven Rostedt @ 2014-11-24 15:42 UTC (permalink / raw)
To: linux-kernel; +Cc: Andrew Morton
[-- Attachment #1: 0003-ktest-Allow-tests-to-undefine-default-options.patch --]
[-- Type: text/plain, Size: 2394 bytes --]
From: "Steven Rostedt (Red Hat)" <rostedt@goodmis.org>
Tests can set options that override the default ones. But if a test
tries to undefine a default option, it is simply ignored and the
default option stays as is.
For example, if you want to have a test that defines no MIN_CONFIG
then the test should be able to do that with:
TEST_START
MIN_CONFIG =
Which should make MIN_CONFIG not defined for that test. But the way
the code currently works, undefined options in tests are dropped.
This is because the NULL options are evaluated during the reading of
the config file and since one can disable default options in the default
section with this method, it is evaluated there (the option turns to a
undef). But undef options in the test section mean to use the default
option.
To fix this, keep the empty string in the option during the reading
of the config file, and then evaluate it when running the test. This
will allow tests to null out default options.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
tools/testing/ktest/ktest.pl | 23 +++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index 89c2257bed98..ea43dd2f2fd5 100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -684,11 +684,8 @@ sub set_value {
}
${$overrides}{$lvalue} = $prvalue;
}
- if ($rvalue =~ /^\s*$/) {
- delete $opt{$lvalue};
- } else {
- $opt{$lvalue} = $prvalue;
- }
+
+ $opt{$lvalue} = $prvalue;
}
sub set_eval {
@@ -3947,12 +3944,22 @@ for (my $i = 0, my $repeat = 1; $i <= $opt{"NUM_TESTS"}; $i += $repeat) {
}
}
+sub option_defined {
+ my ($option) = @_;
+
+ if (defined($opt{$option}) && $opt{$option} !~ /^\s*$/) {
+ return 1;
+ }
+
+ return 0;
+}
+
sub __set_test_option {
my ($name, $i) = @_;
my $option = "$name\[$i\]";
- if (defined($opt{$option})) {
+ if (option_defined($option)) {
return $opt{$option};
}
@@ -3960,13 +3967,13 @@ sub __set_test_option {
if ($i >= $test &&
$i < $test + $repeat_tests{$test}) {
$option = "$name\[$test\]";
- if (defined($opt{$option})) {
+ if (option_defined($option)) {
return $opt{$option};
}
}
}
- if (defined($opt{$name})) {
+ if (option_defined($name)) {
return $opt{$name};
}
--
2.1.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* [for-next][PATCH 4/5] ktest: Add name to running title
2014-11-24 15:42 [for-next][PATCH 0/5] ktest: Updates for 3.19 Steven Rostedt
` (2 preceding siblings ...)
2014-11-24 15:42 ` [for-next][PATCH 3/5] ktest: Allow tests to undefine default options Steven Rostedt
@ 2014-11-24 15:42 ` Steven Rostedt
2014-11-24 15:42 ` [for-next][PATCH 5/5] ktest: Add back "tail -1" to kernelrelease make Steven Rostedt
4 siblings, 0 replies; 6+ messages in thread
From: Steven Rostedt @ 2014-11-24 15:42 UTC (permalink / raw)
To: linux-kernel; +Cc: Andrew Morton
[-- Attachment #1: 0004-ktest-Add-name-to-running-title.patch --]
[-- Type: text/plain, Size: 1181 bytes --]
From: "Steven Rostedt (Red Hat)" <rostedt@goodmis.org>
Instead of just showing the test type of test in the start of the
test, like this:
RUNNING TEST 1 of 26 with option build defconfig
Add the name (if it is defined) as well, like this:
RUNNING TEST 1 of 26 (arm64 aarch64-linux) with option build defconfig
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
tools/testing/ktest/ktest.pl | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index ea43dd2f2fd5..35b118a38c2f 100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -4086,8 +4086,14 @@ for (my $i = 1; $i <= $opt{"NUM_TESTS"}; $i++) {
my $installme = "";
$installme = " no_install" if ($no_install);
+ my $name = "";
+
+ if (defined($test_name)) {
+ $name = " ($test_name)";
+ }
+
doprint "\n\n";
- doprint "RUNNING TEST $i of $opt{NUM_TESTS} with option $test_type $run_type$installme\n\n";
+ doprint "RUNNING TEST $i of $opt{NUM_TESTS}$name with option $test_type $run_type$installme\n\n";
if (defined($pre_test)) {
run_command $pre_test;
--
2.1.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* [for-next][PATCH 5/5] ktest: Add back "tail -1" to kernelrelease make
2014-11-24 15:42 [for-next][PATCH 0/5] ktest: Updates for 3.19 Steven Rostedt
` (3 preceding siblings ...)
2014-11-24 15:42 ` [for-next][PATCH 4/5] ktest: Add name to running title Steven Rostedt
@ 2014-11-24 15:42 ` Steven Rostedt
4 siblings, 0 replies; 6+ messages in thread
From: Steven Rostedt @ 2014-11-24 15:42 UTC (permalink / raw)
To: linux-kernel; +Cc: Andrew Morton, Michal Marek
[-- Attachment #1: 0005-ktest-Add-back-tail-1-to-kernelrelease-make.patch --]
[-- Type: text/plain, Size: 1092 bytes --]
From: "Steven Rostedt (Red Hat)" <rostedt@goodmis.org>
Commit 52d21580b362 "ktest: Use make -s kernelrelease" fixed commit
7ff525712acf "kbuild: fake the "Entering directory ..." message more simply"
as that commit added output after the make kernelrelease. But there's still
some build scripts that are used by ktest that has output before the make
is executed, and requires that only the last line is printed.
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
tools/testing/ktest/ktest.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index 35b118a38c2f..b9cd036f0442 100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -2002,7 +2002,7 @@ sub get_version {
# get the release name
return if ($have_version);
doprint "$make kernelrelease ... ";
- $version = `$make -s kernelrelease`;
+ $version = `$make -s kernelrelease | tail -1`;
chomp($version);
doprint "$version\n";
$have_version = 1;
--
2.1.1
^ permalink raw reply related [flat|nested] 6+ messages in thread