Below is the list of changes that have just been committed into a local
5.0 repository of kent. When kent does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2068 05/10/16 20:51:19 kent@stripped +3 -0
mysql-test-run.pl:
Added --skip-im option handling
Don't terminate script if IM fails to create PID file
mtr_cases.pl:
Added --skip-im option handling
mtr_process.pl:
Kill left over 'mysqld' processes started by IM
mysql-test/mysql-test-run.pl
1.53 05/10/16 20:32:35 kent@stripped +25 -30
Added --skip-im option handling
Don't terminate script if IM fails to create PID file
mysql-test/lib/mtr_cases.pl
1.12 05/10/16 20:31:44 kent@stripped +4 -4
Added --skip-im option handling
mysql-test/lib/mtr_process.pl
1.24 05/10/16 20:30:22 kent@stripped +11 -0
Kill left over 'mysqld' processes started by IM
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: kent
# Host: c-634072d5.010-2112-6f72651.cust.bredbandsbolaget.se
# Root: /Users/kent/mysql/bk/mysql-5.0-release
--- 1.11/mysql-test/lib/mtr_cases.pl 2005-09-30 23:11:51 +02:00
+++ 1.12/mysql-test/lib/mtr_cases.pl 2005-10-16 20:31:44 +02:00
@@ -68,7 +68,7 @@
#
# Otherwise, try to guess the target component.
- if ( defined $component_id )
+ if ( $component_id )
{
if ( ! -f "$testdir/$elem")
{
@@ -80,11 +80,11 @@
my $mysqld_test_exists = -f "$testdir/$tname.test";
my $im_test_exists = -f "$testdir/$tname.imtest";
- if ( $mysqld_test_exists && $im_test_exists )
+ if ( $mysqld_test_exists and $im_test_exists )
{
mtr_error("Ambiguos test case name ($tname)");
}
- elsif ( ! $mysqld_test_exists && !$im_test_exists )
+ elsif ( ! $mysqld_test_exists and ! $im_test_exists )
{
mtr_error("Test case $tname is not found");
}
@@ -405,7 +405,7 @@
"Instance Manager tests are not run with --ps-protocol. " .
"Test case '$tname' is skipped.");
}
- elsif ( !$::exe_im )
+ elsif ( $::opt_skip_im )
{
$tinfo->{'skip'}= 1;
--- 1.23/mysql-test/lib/mtr_process.pl 2005-09-30 23:11:51 +02:00
+++ 1.24/mysql-test/lib/mtr_process.pl 2005-10-16 20:30:22 +02:00
@@ -360,8 +360,19 @@
# First, kill all masters and slaves that would conflict with
# this run. Make sure to remove the PID file, if any.
+ # FIXME kill IM manager first, else it will restart the servers, how?!
my @args;
+
+ for ( my $idx; $idx < 2; $idx++ )
+ {
+ push(@args,{
+ pid => 0, # We don't know the PID
+ pidfile => $::instance_manager->{'instances'}->[$idx]->{'path_pid'},
+ sockfile => $::instance_manager->{'instances'}->[$idx]->{'path_sock'},
+ port => $::instance_manager->{'instances'}->[$idx]->{'port'},
+ });
+ }
for ( my $idx; $idx < 2; $idx++ )
{
--- 1.52/mysql-test/mysql-test-run.pl 2005-10-16 17:04:12 +02:00
+++ 1.53/mysql-test/mysql-test-run.pl 2005-10-16 20:32:35 +02:00
@@ -233,6 +233,7 @@
our $opt_skip;
our $opt_skip_rpl;
our $opt_skip_test;
+our $opt_skip_im;
our $opt_sleep;
our $opt_ps_protocol;
@@ -490,6 +491,7 @@
'do-test=s' => \$opt_do_test,
'suite=s' => \$opt_suite,
'skip-rpl' => \$opt_skip_rpl,
+ 'skip-im' => \$opt_skip_im,
'skip-test=s' => \$opt_skip_test,
# Specify ports
@@ -1118,7 +1120,7 @@
foreach my $instance (@{$instance_manager->{'instances'}})
{
- push (@data_dir_lst, $instance->{'path_datadir'});
+ push(@data_dir_lst, $instance->{'path_datadir'});
}
foreach my $data_dir (@data_dir_lst)
@@ -1364,7 +1366,7 @@
install_db('slave', $slave->[1]->{'path_myddir'});
install_db('slave', $slave->[2]->{'path_myddir'});
- if ( defined $exe_im)
+ if ( ! $opt_skip_im )
{
im_prepare_env($instance_manager);
}
@@ -1513,12 +1515,7 @@
EOF
;
- if ( exists $instance->{nonguarded} and
- defined $instance->{nonguarded} )
- {
- print OUT "nonguarded\n";
- }
-
+ print OUT "nonguarded\n" if $instance->{'nonguarded'};
print OUT "\n";
}
@@ -1678,7 +1675,7 @@
$master->[0]->{'running_master_is_special'}= 1;
}
}
- elsif ( $tinfo->{'component_id'} eq 'im')
+ elsif ( ! $opt_skip_im and $tinfo->{'component_id'} eq 'im' )
{
# We have to create defaults file every time, in order to ensure that it
# will be the same for each test. The problem is that test can change the
@@ -1776,7 +1773,8 @@
# Stop Instance Manager if we are processing an IM-test case.
# ----------------------------------------------------------------------
- if ( ! $glob_use_running_server and $tinfo->{'component_id'} eq 'im' )
+ if ( ! $glob_use_running_server and $tinfo->{'component_id'} eq 'im' and
+ $instance_manager->{'pid'} )
{
im_stop($instance_manager);
}
@@ -2195,7 +2193,7 @@
print "Ending Tests\n";
- if (defined $instance_manager->{'pid'})
+ if ( $instance_manager->{'pid'} )
{
print "Shutting-down Instance Manager\n";
im_stop($instance_manager);
@@ -2269,14 +2267,10 @@
my $instance_manager = shift;
my $opts = shift;
- if ( ! defined $exe_im)
- {
- return;
- }
-
my $args;
mtr_init_args(\$args);
- mtr_add_arg($args, "--defaults-file=" . $instance_manager->{'defaults_file'});
+ mtr_add_arg($args, "--defaults-file=%s",
+ $instance_manager->{'defaults_file'});
foreach my $opt (@{$opts})
{
@@ -2294,7 +2288,7 @@
{ append_log_file => 1 } # append log files
);
- if ( ! defined $instance_manager->{'pid'} )
+ if ( ! $instance_manager->{'pid'} )
{
mtr_report('Could not start Instance Manager');
return;
@@ -2304,10 +2298,14 @@
# several processes and the parent process, created by mtr_spawn(), exits just
# after start. So, we have to obtain Instance Manager PID from the PID file.
- sleep_until_file_created(
- $instance_manager->{'path_pid'},
- $instance_manager->{'start_timeout'},
- -1); # real PID is still unknown
+ if ( ! sleep_until_file_created(
+ $instance_manager->{'path_pid'},
+ $instance_manager->{'start_timeout'},
+ -1)) # real PID is still unknown
+ {
+ mtr_report("Instance Manager PID file is missing");
+ return;
+ }
$instance_manager->{'pid'} =
mtr_get_pid_from_file($instance_manager->{'path_pid'});
@@ -2316,16 +2314,12 @@
sub im_stop($) {
my $instance_manager = shift;
- if (! defined $instance_manager->{'pid'})
- {
- return;
- }
-
# Re-read pid from the file, since during tests Instance Manager could have
# been restarted, so its pid could have been changed.
$instance_manager->{'pid'} =
- mtr_get_pid_from_file($instance_manager->{'path_pid'});
+ mtr_get_pid_from_file($instance_manager->{'path_pid'})
+ if -f $instance_manager->{'path_pid'};
# Inspired from mtr_stop_mysqld_servers().
@@ -2340,12 +2334,12 @@
if ( -r $instances->[0]->{'path_pid'} )
{
- push @pids, mtr_get_pid_from_file($instances->[0]->{'path_pid'});
+ push(@pids, mtr_get_pid_from_file($instances->[0]->{'path_pid'}));
}
if ( -r $instances->[1]->{'path_pid'} )
{
- push @pids, mtr_get_pid_from_file($instances->[1]->{'path_pid'});
+ push(@pids, mtr_get_pid_from_file($instances->[1]->{'path_pid'}));
}
# Kill processes.
@@ -2601,6 +2595,7 @@
start-from=PREFIX Run test cases starting from test prefixed with PREFIX
suite=NAME Run the test suite named NAME. The default is "main"
skip-rpl Skip the replication test cases.
+ skip-im Don't start IM, and skip the IM test cases
skip-test=PREFIX Skip test cases which name are prefixed with PREFIX
Options that specify ports
| Thread |
|---|
| • bk commit into 5.0 tree (kent:1.2068) | kent | 16 Oct |