List:Commits« Previous MessageNext Message »
From:Andrei Elkin Date:December 19 2008 12:21pm
Subject:bzr commit into mysql-6.0-rpl branch (aelkin:2752) Bug#41017
View as plain text  
#At file:///home/andrei/MySQL/BZR/mysql-6.0-rpl/ based on revid:skozlov@stripped

 2752 Andrei Elkin	2008-12-19
      Bug #41017 main.events_restart fails in pushbuild: "Server failed to restart"
      
      The reason of the bug was an incorrect name for the mtr-test expect file.
      
      The name was corrected in the restart macro and an error message in mtr plus
      detailed comments in the macro would serve as a good enough protection
      from the same thing happened again.
      Bug #40636 was found as a dup for the current.
modified:
  mysql-test/include/restart_mysqld.inc
  mysql-test/mysql-test-run.pl

per-file messages:
  mysql-test/include/restart_mysqld.inc
    Correcting the name of the expect file;
    extending the macro to be able to restart an arbitrary server.
  mysql-test/mysql-test-run.pl
    Adding the error msg to print if the expect file name provided by the test does not
    correspond to an existing file.
=== modified file 'mysql-test/include/restart_mysqld.inc'
--- a/mysql-test/include/restart_mysqld.inc	2008-11-13 14:55:42 +0000
+++ b/mysql-test/include/restart_mysqld.inc	2008-12-19 12:21:41 +0000
@@ -1,7 +1,19 @@
 #
+# A macro to restart a certain server.
+# The caller can call `let $server_id_for_restart = N' prior
+# invocation for the macro to change the default server id
+
+let $server_id_for_restart = 1;
+
+#
 # Write file to make mysql-test-run.pl expect the "crash", but don't start
-# it until it's told to
---write_file $MYSQLTEST_VARDIR/tmp/master0.expect
+# it until it's told to.
+# The name of the expect file must correspond to one that mtr expects
+# which is a name of the section for the server in the server's configuration
+# file.
+#
+
+--write_file $MYSQLTEST_VARDIR/tmp/mysqld.$server_id_for_restart.expect
 wait
 EOF
 
@@ -13,7 +25,7 @@ shutdown_server 30;
 --source include/wait_until_disconnected.inc
 
 # Write file to make mysql-test-run.pl start up the server again
---append_file $MYSQLTEST_VARDIR/tmp/master0.expect
+--append_file $MYSQLTEST_VARDIR/tmp/mysqld.$server_id_for_restart.expect
 restart
 EOF
 

=== modified file 'mysql-test/mysql-test-run.pl'
--- a/mysql-test/mysql-test-run.pl	2008-11-25 17:07:47 +0000
+++ b/mysql-test/mysql-test-run.pl	2008-12-19 12:21:41 +0000
@@ -3582,7 +3582,9 @@ sub check_expected_crash_and_restart {
 	last;
       }
     }
-
+    else {
+      mtr_error("Expected file: '$expect_file' does not exist. Make sure the requested in the test expect file name corresponds to a correct name of the server section of the configuration file");
+    }
     return 1;
   }
 

Thread
bzr commit into mysql-6.0-rpl branch (aelkin:2752) Bug#41017Andrei Elkin19 Dec