ktest.pl (4025bc62dd045d326d8a26a50fc86fd163aec89f) ktest.pl (27d934b28752b860cba6c0d77ea4598861d80998)
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;

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

31$default{"SLEEP_TIME"} = 60; # sleep time between tests
32$default{"BUILD_NOCLEAN"} = 0;
33$default{"REBOOT_ON_ERROR"} = 0;
34$default{"POWEROFF_ON_ERROR"} = 0;
35$default{"REBOOT_ON_SUCCESS"} = 1;
36$default{"POWEROFF_ON_SUCCESS"} = 0;
37$default{"BUILD_OPTIONS"} = "";
38$default{"BISECT_SLEEP_TIME"} = 60; # sleep time between bisects
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;

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

31$default{"SLEEP_TIME"} = 60; # sleep time between tests
32$default{"BUILD_NOCLEAN"} = 0;
33$default{"REBOOT_ON_ERROR"} = 0;
34$default{"POWEROFF_ON_ERROR"} = 0;
35$default{"REBOOT_ON_SUCCESS"} = 1;
36$default{"POWEROFF_ON_SUCCESS"} = 0;
37$default{"BUILD_OPTIONS"} = "";
38$default{"BISECT_SLEEP_TIME"} = 60; # sleep time between bisects
39$default{"PATCHCHECK_SLEEP_TIME"} = 60; # sleep time between patch checks
39$default{"CLEAR_LOG"} = 0;
40$default{"BISECT_MANUAL"} = 0;
41$default{"BISECT_SKIP"} = 1;
42$default{"SUCCESS_LINE"} = "login:";
43$default{"BOOTED_TIMEOUT"} = 1;
44$default{"DIE_ON_FAILURE"} = 1;
45$default{"SSH_EXEC"} = "ssh \$SSH_USER\@\$MACHINE \$SSH_COMMAND";
46$default{"SCP_TO_TARGET"} = "scp \$SRC_FILE \$SSH_USER\@\$MACHINE:\$DST_FILE";

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

91my $redirect;
92my $buildlog;
93my $dmesg;
94my $monitor_fp;
95my $monitor_pid;
96my $monitor_cnt = 0;
97my $sleep_time;
98my $bisect_sleep_time;
40$default{"CLEAR_LOG"} = 0;
41$default{"BISECT_MANUAL"} = 0;
42$default{"BISECT_SKIP"} = 1;
43$default{"SUCCESS_LINE"} = "login:";
44$default{"BOOTED_TIMEOUT"} = 1;
45$default{"DIE_ON_FAILURE"} = 1;
46$default{"SSH_EXEC"} = "ssh \$SSH_USER\@\$MACHINE \$SSH_COMMAND";
47$default{"SCP_TO_TARGET"} = "scp \$SRC_FILE \$SSH_USER\@\$MACHINE:\$DST_FILE";

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

92my $redirect;
93my $buildlog;
94my $dmesg;
95my $monitor_fp;
96my $monitor_pid;
97my $monitor_cnt = 0;
98my $sleep_time;
99my $bisect_sleep_time;
100my $patchcheck_sleep_time;
99my $store_failures;
100my $timeout;
101my $booted_timeout;
102my $console;
103my $success_line;
104my $stop_after_success;
105my $stop_after_failure;
106my $stop_test_after;

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

1759 $ret = run_config_bisect;
1760 } while (!$ret);
1761
1762 return $ret if ($ret < 0);
1763
1764 success $i;
1765}
1766
101my $store_failures;
102my $timeout;
103my $booted_timeout;
104my $console;
105my $success_line;
106my $stop_after_success;
107my $stop_after_failure;
108my $stop_test_after;

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

1761 $ret = run_config_bisect;
1762 } while (!$ret);
1763
1764 return $ret if ($ret < 0);
1765
1766 success $i;
1767}
1768
1769sub patchcheck_reboot {
1770 doprint "Reboot and sleep $patchcheck_sleep_time seconds\n";
1771 reboot;
1772 start_monitor;
1773 wait_for_monitor $patchcheck_sleep_time;
1774 end_monitor;
1775}
1776
1767sub patchcheck {
1768 my ($i) = @_;
1769
1770 die "PATCHCHECK_START[$i] not defined\n"
1771 if (!defined($opt{"PATCHCHECK_START[$i]"}));
1772 die "PATCHCHECK_TYPE[$i] not defined\n"
1773 if (!defined($opt{"PATCHCHECK_TYPE[$i]"}));
1774

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

1850 monitor or $failed = 1;
1851
1852 if (!$failed && $type ne "boot"){
1853 do_run_test or $failed = 1;
1854 }
1855 end_monitor;
1856 return 0 if ($failed);
1857
1777sub patchcheck {
1778 my ($i) = @_;
1779
1780 die "PATCHCHECK_START[$i] not defined\n"
1781 if (!defined($opt{"PATCHCHECK_START[$i]"}));
1782 die "PATCHCHECK_TYPE[$i] not defined\n"
1783 if (!defined($opt{"PATCHCHECK_TYPE[$i]"}));
1784

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

1860 monitor or $failed = 1;
1861
1862 if (!$failed && $type ne "boot"){
1863 do_run_test or $failed = 1;
1864 }
1865 end_monitor;
1866 return 0 if ($failed);
1867
1868 patchcheck_reboot;
1869
1858 }
1859 $in_patchcheck = 0;
1860 success $i;
1861
1862 return 1;
1863}
1864
1865$#ARGV < 1 or die "ktest.pl version: $VERSION\n usage: ktest.pl config-file\n";

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

1999 $reboot_on_error = set_test_option("REBOOT_ON_ERROR", $i);
2000 $poweroff_on_error = set_test_option("POWEROFF_ON_ERROR", $i);
2001 $die_on_failure = set_test_option("DIE_ON_FAILURE", $i);
2002 $power_off = set_test_option("POWER_OFF", $i);
2003 $powercycle_after_reboot = set_test_option("POWERCYCLE_AFTER_REBOOT", $i);
2004 $poweroff_after_halt = set_test_option("POWEROFF_AFTER_HALT", $i);
2005 $sleep_time = set_test_option("SLEEP_TIME", $i);
2006 $bisect_sleep_time = set_test_option("BISECT_SLEEP_TIME", $i);
1870 }
1871 $in_patchcheck = 0;
1872 success $i;
1873
1874 return 1;
1875}
1876
1877$#ARGV < 1 or die "ktest.pl version: $VERSION\n usage: ktest.pl config-file\n";

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

2011 $reboot_on_error = set_test_option("REBOOT_ON_ERROR", $i);
2012 $poweroff_on_error = set_test_option("POWEROFF_ON_ERROR", $i);
2013 $die_on_failure = set_test_option("DIE_ON_FAILURE", $i);
2014 $power_off = set_test_option("POWER_OFF", $i);
2015 $powercycle_after_reboot = set_test_option("POWERCYCLE_AFTER_REBOOT", $i);
2016 $poweroff_after_halt = set_test_option("POWEROFF_AFTER_HALT", $i);
2017 $sleep_time = set_test_option("SLEEP_TIME", $i);
2018 $bisect_sleep_time = set_test_option("BISECT_SLEEP_TIME", $i);
2019 $patchcheck_sleep_time = set_test_option("PATCHCHECK_SLEEP_TIME", $i);
2007 $bisect_manual = set_test_option("BISECT_MANUAL", $i);
2008 $bisect_skip = set_test_option("BISECT_SKIP", $i);
2009 $store_failures = set_test_option("STORE_FAILURES", $i);
2010 $timeout = set_test_option("TIMEOUT", $i);
2011 $booted_timeout = set_test_option("BOOTED_TIMEOUT", $i);
2012 $console = set_test_option("CONSOLE", $i);
2013 $success_line = set_test_option("SUCCESS_LINE", $i);
2014 $stop_after_success = set_test_option("STOP_AFTER_SUCCESS", $i);

--- 109 unchanged lines hidden ---
2020 $bisect_manual = set_test_option("BISECT_MANUAL", $i);
2021 $bisect_skip = set_test_option("BISECT_SKIP", $i);
2022 $store_failures = set_test_option("STORE_FAILURES", $i);
2023 $timeout = set_test_option("TIMEOUT", $i);
2024 $booted_timeout = set_test_option("BOOTED_TIMEOUT", $i);
2025 $console = set_test_option("CONSOLE", $i);
2026 $success_line = set_test_option("SUCCESS_LINE", $i);
2027 $stop_after_success = set_test_option("STOP_AFTER_SUCCESS", $i);

--- 109 unchanged lines hidden ---