Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 285895
b: refs/heads/master
c: c5dacb8
h: refs/heads/master
i:
  285893: 0e21146
  285891: 5446ad2
  285887: 37133bb
v: v3
  • Loading branch information
Steven Rostedt authored and Steven Rostedt committed Dec 23, 2011
1 parent e8731c6 commit ac1149d
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cad9666980c1c1a76345f36a68e96fda3d78d857
refs/heads/master: c5dacb88f0a6410b3270f77e3d1e1b159afc4adc
47 changes: 47 additions & 0 deletions trunk/tools/testing/ktest/ktest.pl
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@
my $bisect_manual;
my $bisect_skip;
my $config_bisect_good;
my $bisect_ret_good;
my $bisect_ret_bad;
my $bisect_ret_skip;
my $bisect_ret_abort;
my $bisect_ret_default;
my $in_patchcheck = 0;
my $run_test;
my $redirect;
Expand Down Expand Up @@ -1854,6 +1859,43 @@ sub do_run_test {
waitpid $child_pid, 0;
$child_exit = $?;

if (!$bug && $in_bisect) {
if (defined($bisect_ret_good)) {
if ($child_exit == $bisect_ret_good) {
return 1;
}
}
if (defined($bisect_ret_skip)) {
if ($child_exit == $bisect_ret_skip) {
return -1;
}
}
if (defined($bisect_ret_abort)) {
if ($child_exit == $bisect_ret_abort) {
fail "test abort" and return -2;
}
}
if (defined($bisect_ret_bad)) {
if ($child_exit == $bisect_ret_skip) {
return 0;
}
}
if (defined($bisect_ret_default)) {
if ($bisect_ret_default eq "good") {
return 1;
} elsif ($bisect_ret_default eq "bad") {
return 0;
} elsif ($bisect_ret_default eq "skip") {
return -1;
} elsif ($bisect_ret_default eq "abort") {
return -2;
} else {
fail "unknown default action: $bisect_ret_default"
and return -2;
}
}
}

if ($bug || $child_exit) {
return 0 if $in_bisect;
fail "test failed" and return 0;
Expand Down Expand Up @@ -3284,6 +3326,11 @@ sub set_test_option {
$bisect_manual = set_test_option("BISECT_MANUAL", $i);
$bisect_skip = set_test_option("BISECT_SKIP", $i);
$config_bisect_good = set_test_option("CONFIG_BISECT_GOOD", $i);
$bisect_ret_good = set_test_option("BISECT_RET_GOOD", $i);
$bisect_ret_bad = set_test_option("BISECT_RET_BAD", $i);
$bisect_ret_skip = set_test_option("BISECT_RET_SKIP", $i);
$bisect_ret_abort = set_test_option("BISECT_RET_ABORT", $i);
$bisect_ret_default = set_test_option("BISECT_RET_DEFAULT", $i);
$store_failures = set_test_option("STORE_FAILURES", $i);
$store_successes = set_test_option("STORE_SUCCESSES", $i);
$test_name = set_test_option("TEST_NAME", $i);
Expand Down
36 changes: 36 additions & 0 deletions trunk/tools/testing/ktest/sample.conf
Original file line number Diff line number Diff line change
Expand Up @@ -868,6 +868,42 @@
# BISECT_BAD with BISECT_CHECK = good or
# BISECT_CHECK = bad, respectively.
#
# BISECT_RET_GOOD = 0 (optional, default undefined)
#
# In case the specificed test returns something other than just
# 0 for good, and non-zero for bad, you can override 0 being
# good by defining BISECT_RET_GOOD.
#
# BISECT_RET_BAD = 1 (optional, default undefined)
#
# In case the specificed test returns something other than just
# 0 for good, and non-zero for bad, you can override non-zero being
# bad by defining BISECT_RET_BAD.
#
# BISECT_RET_ABORT = 255 (optional, default undefined)
#
# If you need to abort the bisect if the test discovers something
# that was wrong, you can define BISECT_RET_ABORT to be the error
# code returned by the test in order to abort the bisect.
#
# BISECT_RET_SKIP = 2 (optional, default undefined)
#
# If the test detects that the current commit is neither good
# nor bad, but something else happened (another bug detected)
# you can specify BISECT_RET_SKIP to an error code that the
# test returns when it should skip the current commit.
#
# BISECT_RET_DEFAULT = good (optional, default undefined)
#
# You can override the default of what to do when the above
# options are not hit. This may be one of, "good", "bad",
# "abort" or "skip" (without the quotes).
#
# Note, if you do not define any of the previous BISECT_RET_*
# and define BISECT_RET_DEFAULT, all bisects results will do
# what the BISECT_RET_DEFAULT has.
#
#
# Example:
# TEST_START
# TEST_TYPE = bisect
Expand Down

0 comments on commit ac1149d

Please sign in to comment.