ktest.pl (30f75da5ff475f1f455c0b009f3c06767963c54f) ktest.pl (9064af5206c26ce0d47621fef216b0c43d65d693)
1#!/usr/bin/perl -w
2#
3# Copyright 2010 - Steven Rostedt <srostedt@redhat.com>, Red Hat Inc.
4# Licensed under the terms of the GNU GPL License version 2
5#
6
7use strict;
8use IPC::Open2;

--- 87 unchanged lines hidden (view full) ---

96my $dmesg;
97my $monitor_fp;
98my $monitor_pid;
99my $monitor_cnt = 0;
100my $sleep_time;
101my $bisect_sleep_time;
102my $patchcheck_sleep_time;
103my $store_failures;
1#!/usr/bin/perl -w
2#
3# Copyright 2010 - Steven Rostedt <srostedt@redhat.com>, Red Hat Inc.
4# Licensed under the terms of the GNU GPL License version 2
5#
6
7use strict;
8use IPC::Open2;

--- 87 unchanged lines hidden (view full) ---

96my $dmesg;
97my $monitor_fp;
98my $monitor_pid;
99my $monitor_cnt = 0;
100my $sleep_time;
101my $bisect_sleep_time;
102my $patchcheck_sleep_time;
103my $store_failures;
104my $test_name;
104my $timeout;
105my $booted_timeout;
106my $detect_triplefault;
107my $console;
108my $success_line;
109my $stop_after_success;
110my $stop_after_failure;
111my $stop_test_after;

--- 503 unchanged lines hidden (view full) ---

615 if (!do_not_reboot) {
616 doprint "REBOOTING\n";
617 reboot;
618 start_monitor;
619 wait_for_monitor $sleep_time;
620 end_monitor;
621 }
622
105my $timeout;
106my $booted_timeout;
107my $detect_triplefault;
108my $console;
109my $success_line;
110my $stop_after_success;
111my $stop_after_failure;
112my $stop_test_after;

--- 503 unchanged lines hidden (view full) ---

616 if (!do_not_reboot) {
617 doprint "REBOOTING\n";
618 reboot;
619 start_monitor;
620 wait_for_monitor $sleep_time;
621 end_monitor;
622 }
623
624 my $name = "";
625
626 if (defined($test_name)) {
627 $name = " ($test_name)";
628 }
629
623 doprint "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n";
624 doprint "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n";
630 doprint "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n";
631 doprint "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n";
625 doprint "KTEST RESULT: TEST $i Failed: ", @_, "\n";
632 doprint "KTEST RESULT: TEST $i$name Failed: ", @_, "\n";
626 doprint "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n";
627 doprint "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n";
628
629 return 1 if (!defined($store_failures));
630
631 my @t = localtime;
632 my $date = sprintf "%04d%02d%02d%02d%02d%02d",
633 1900+$t[5],$t[4],$t[3],$t[2],$t[1],$t[0];

--- 491 unchanged lines hidden (view full) ---

1125 }
1126}
1127
1128sub success {
1129 my ($i) = @_;
1130
1131 $successes++;
1132
633 doprint "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n";
634 doprint "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n";
635
636 return 1 if (!defined($store_failures));
637
638 my @t = localtime;
639 my $date = sprintf "%04d%02d%02d%02d%02d%02d",
640 1900+$t[5],$t[4],$t[3],$t[2],$t[1],$t[0];

--- 491 unchanged lines hidden (view full) ---

1132 }
1133}
1134
1135sub success {
1136 my ($i) = @_;
1137
1138 $successes++;
1139
1140 my $name = "";
1141
1142 if (defined($test_name)) {
1143 $name = " ($test_name)";
1144 }
1145
1133 doprint "\n\n*******************************************\n";
1134 doprint "*******************************************\n";
1146 doprint "\n\n*******************************************\n";
1147 doprint "*******************************************\n";
1135 doprint "KTEST RESULT: TEST $i SUCCESS!!!! **\n";
1148 doprint "KTEST RESULT: TEST $i$name SUCCESS!!!! **\n";
1136 doprint "*******************************************\n";
1137 doprint "*******************************************\n";
1138
1139 if ($i != $opt{"NUM_TESTS"} && !do_not_reboot) {
1140 doprint "Reboot and wait $sleep_time seconds\n";
1141 reboot;
1142 start_monitor;
1143 wait_for_monitor $sleep_time;

--- 1032 unchanged lines hidden (view full) ---

2176 $poweroff_after_halt = set_test_option("POWEROFF_AFTER_HALT", $i);
2177 $sleep_time = set_test_option("SLEEP_TIME", $i);
2178 $bisect_sleep_time = set_test_option("BISECT_SLEEP_TIME", $i);
2179 $patchcheck_sleep_time = set_test_option("PATCHCHECK_SLEEP_TIME", $i);
2180 $bisect_manual = set_test_option("BISECT_MANUAL", $i);
2181 $bisect_skip = set_test_option("BISECT_SKIP", $i);
2182 $config_bisect_good = set_test_option("CONFIG_BISECT_GOOD", $i);
2183 $store_failures = set_test_option("STORE_FAILURES", $i);
1149 doprint "*******************************************\n";
1150 doprint "*******************************************\n";
1151
1152 if ($i != $opt{"NUM_TESTS"} && !do_not_reboot) {
1153 doprint "Reboot and wait $sleep_time seconds\n";
1154 reboot;
1155 start_monitor;
1156 wait_for_monitor $sleep_time;

--- 1032 unchanged lines hidden (view full) ---

2189 $poweroff_after_halt = set_test_option("POWEROFF_AFTER_HALT", $i);
2190 $sleep_time = set_test_option("SLEEP_TIME", $i);
2191 $bisect_sleep_time = set_test_option("BISECT_SLEEP_TIME", $i);
2192 $patchcheck_sleep_time = set_test_option("PATCHCHECK_SLEEP_TIME", $i);
2193 $bisect_manual = set_test_option("BISECT_MANUAL", $i);
2194 $bisect_skip = set_test_option("BISECT_SKIP", $i);
2195 $config_bisect_good = set_test_option("CONFIG_BISECT_GOOD", $i);
2196 $store_failures = set_test_option("STORE_FAILURES", $i);
2197 $test_name = set_test_option("TEST_NAME", $i);
2184 $timeout = set_test_option("TIMEOUT", $i);
2185 $booted_timeout = set_test_option("BOOTED_TIMEOUT", $i);
2186 $console = set_test_option("CONSOLE", $i);
2187 $detect_triplefault = set_test_option("DETECT_TRIPLE_FAULT", $i);
2188 $success_line = set_test_option("SUCCESS_LINE", $i);
2189 $stop_after_success = set_test_option("STOP_AFTER_SUCCESS", $i);
2190 $stop_after_failure = set_test_option("STOP_AFTER_FAILURE", $i);
2191 $stop_test_after = set_test_option("STOP_TEST_AFTER", $i);

--- 107 unchanged lines hidden ---
2198 $timeout = set_test_option("TIMEOUT", $i);
2199 $booted_timeout = set_test_option("BOOTED_TIMEOUT", $i);
2200 $console = set_test_option("CONSOLE", $i);
2201 $detect_triplefault = set_test_option("DETECT_TRIPLE_FAULT", $i);
2202 $success_line = set_test_option("SUCCESS_LINE", $i);
2203 $stop_after_success = set_test_option("STOP_AFTER_SUCCESS", $i);
2204 $stop_after_failure = set_test_option("STOP_AFTER_FAILURE", $i);
2205 $stop_test_after = set_test_option("STOP_TEST_AFTER", $i);

--- 107 unchanged lines hidden ---