summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-11-23 09:50:42 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2011-11-23 09:50:42 -0800
commitf10cdea68b70bd85706baed0decab59618f9c353 (patch)
tree56e5246cc7ac0f606a13e775be632df462afc530
parent5907c5f8adbd0bb7ab69124520304e5b25c8eb5e (diff)
parentf9dfb65b055c56678afa03e13e942761459ea53d (diff)
downloadtalos-obmc-linux-f10cdea68b70bd85706baed0decab59618f9c353.tar.gz
talos-obmc-linux-f10cdea68b70bd85706baed0decab59618f9c353.zip
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest: ktest: Check parent options for iterated tests
-rwxr-xr-xtools/testing/ktest/ktest.pl16
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index 30e2befd6f2a..8b4c2535b266 100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -747,6 +747,18 @@ sub __eval_option {
# Add space to evaluate the character before $
$option = " $option";
my $retval = "";
+ my $repeated = 0;
+ my $parent = 0;
+
+ foreach my $test (keys %repeat_tests) {
+ if ($i >= $test &&
+ $i < $test + $repeat_tests{$test}) {
+
+ $repeated = 1;
+ $parent = $test;
+ last;
+ }
+ }
while ($option =~ /(.*?[^\\])\$\{(.*?)\}(.*)/) {
my $start = $1;
@@ -760,10 +772,14 @@ sub __eval_option {
# otherwise see if the default OPT (without [$i]) exists.
my $o = "$var\[$i\]";
+ my $parento = "$var\[$parent\]";
if (defined($opt{$o})) {
$o = $opt{$o};
$retval = "$retval$o";
+ } elsif ($repeated && defined($opt{$parento})) {
+ $o = $opt{$parento};
+ $retval = "$retval$o";
} elsif (defined($opt{$var})) {
$o = $opt{$var};
$retval = "$retval$o";
OpenPOWER on IntegriCloud