From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
Satoru Takeuchi <satoru.takeuchi@gmail.com>
Subject: [for-next][PATCH 1/7] ktest: add 2nd parameter of run_command() to set the redirect target file
Date: Thu, 24 Apr 2014 12:06:27 -0400 [thread overview]
Message-ID: <20140424160850.450820777@goodmis.org> (raw)
In-Reply-To: <20140424160626.491010573@goodmis.org>
[-- Attachment #1: 0001-ktest-add-2nd-parameter-of-run_command-to-set-the-re.patch --]
[-- Type: text/plain, Size: 1764 bytes --]
From: Satoru Takeuchi <satoru.takeuchi@gmail.com>
If we'd like to set the redirect target file of run_command(),
we should define $redirect before calling this function and should undef it
after calling this function. Since it's user-unfriendly, add 2nd parameter of
run_command() for this purpose.
Link: http://lkml.kernel.org/r/87vbvwokq8.wl%satoru.takeuchi@gmail.com
Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
tools/testing/ktest/ktest.pl | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index 4063156..f731ef6 100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -149,7 +149,6 @@ my $bisect_ret_abort;
my $bisect_ret_default;
my $in_patchcheck = 0;
my $run_test;
-my $redirect;
my $buildlog;
my $testlog;
my $dmesg;
@@ -1529,7 +1528,7 @@ sub fail {
}
sub run_command {
- my ($command) = @_;
+ my ($command, $redirect) = @_;
my $dolog = 0;
my $dord = 0;
my $pid;
@@ -2265,9 +2264,7 @@ sub build {
# Run old config regardless, to enforce min configurations
make_oldconfig;
- $redirect = "$buildlog";
- my $build_ret = run_command "$make $build_options";
- undef $redirect;
+ my $build_ret = run_command "$make $build_options", $buildlog;
if (defined($post_build)) {
# Because a post build may change the kernel version
@@ -2360,9 +2357,7 @@ sub child_run_test {
$poweroff_on_error = 0;
$die_on_failure = 1;
- $redirect = "$testlog";
- run_command $run_test or $failed = 1;
- undef $redirect;
+ run_command $run_test, $testlog or $failed = 1;
exit $failed;
}
--
1.8.5.3
next prev parent reply other threads:[~2014-04-24 16:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-24 16:06 [for-next][PATCH 0/7] ktest: A working config-bisect and other updates Steven Rostedt
2014-04-24 16:06 ` Steven Rostedt [this message]
2014-04-24 16:06 ` [for-next][PATCH 2/7] ktest: Some cleanup for improving readability Steven Rostedt
2014-04-24 16:06 ` [for-next][PATCH 3/7] ktest: Rewrite the config-bisect to actually work Steven Rostedt
2014-04-24 16:06 ` [for-next][PATCH 4/7] ktest: Put back in the CONFIG_BISECT_CHECK Steven Rostedt
2014-04-24 16:06 ` [for-next][PATCH 5/7] ktest: Remove unused functions Steven Rostedt
2014-04-24 16:06 ` [for-next][PATCH 6/7] ktest: Add the config bisect manual back Steven Rostedt
2014-04-24 16:06 ` [for-next][PATCH 7/7] ktest: Update documentation on config_bisect 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=20140424160850.450820777@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=satoru.takeuchi@gmail.com \
/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
all inboxes | Powered by JetHome®