MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:msvensson Date:October 23 2007 9:52am
Subject:bk commit into 5.0 tree (msvensson:1.2539) BUG#30560
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of msvensson. When msvensson 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@stripped, 2007-10-23 11:52:55+02:00, msvensson@stripped +1 -0
  Bug#30560  Valgrind option to mysql-test-run with spaces in cause strange error

  mysql-test/mysql-test-run.pl@stripped, 2007-10-23 11:52:54+02:00, msvensson@stripped +31 -17
    Use an array to store the valgrind options
    Deprecate --valgrind-options=s and instead use --valgrind-option(but allow
    PushBuild's) --valgrind-options=s usage.
    Make the variables local

diff -Nrup a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
--- a/mysql-test/mysql-test-run.pl	2007-10-10 22:12:33 +02:00
+++ b/mysql-test/mysql-test-run.pl	2007-10-23 11:52:54 +02:00
@@ -255,13 +255,13 @@ our $opt_timer= 1;
 
 our $opt_user;
 
-our $opt_valgrind= 0;
-our $opt_valgrind_mysqld= 0;
-our $opt_valgrind_mysqltest= 0;
-our $default_valgrind_options= "--show-reachable=yes";
-our $opt_valgrind_options;
-our $opt_valgrind_path;
-our $opt_callgrind;
+my $opt_valgrind= 0;
+my $opt_valgrind_mysqld= 0;
+my $opt_valgrind_mysqltest= 0;
+my @default_valgrind_args= ("--show-reachable=yes");
+my @valgrind_args;
+my $opt_valgrind_path;
+my $opt_callgrind;
 
 our $opt_stress=               "";
 our $opt_stress_suite=     "main";
@@ -575,7 +575,18 @@ sub command_line_setup () {
              'valgrind|valgrind-all'    => \$opt_valgrind,
              'valgrind-mysqltest'       => \$opt_valgrind_mysqltest,
              'valgrind-mysqld'          => \$opt_valgrind_mysqld,
-             'valgrind-options=s'       => \$opt_valgrind_options,
+             'valgrind-options=s'       => sub {
+	       my ($opt, $value)= @_;
+	       # Deprecated option unless it's what we know pushbuild uses
+	       if ($value eq "--gen-suppressions=all --show-reachable=yes") {
+		 push(@valgrind_args, $_) for (split(' ', $value));
+		 return;
+	       }
+	       die("--valgrind-options=s is deprecated. Use ",
+		   "--valgrind-option=s, to be specified several",
+		   " times if necessary");
+	     },
+             'valgrind-option=s'        => \@valgrind_args,
              'valgrind-path=s'          => \$opt_valgrind_path,
 	     'callgrind'                => \$opt_callgrind,
 
@@ -992,7 +1003,7 @@ sub command_line_setup () {
   # --------------------------------------------------------------------------
   # Check valgrind arguments
   # --------------------------------------------------------------------------
-  if ( $opt_valgrind or $opt_valgrind_path or defined $opt_valgrind_options)
+  if ( $opt_valgrind or $opt_valgrind_path or @valgrind_args)
   {
     mtr_report("Turning on valgrind for all executables");
     $opt_valgrind= 1;
@@ -1017,17 +1028,18 @@ sub command_line_setup () {
     $opt_valgrind_mysqld= 1;
 
     # Set special valgrind options unless options passed on command line
-    $opt_valgrind_options="--trace-children=yes"
-      unless defined $opt_valgrind_options;
+    push(@valgrind_args, "--trace-children=yes")
+      unless @valgrind_args;
   }
 
   if ( $opt_valgrind )
   {
     # Set valgrind_options to default unless already defined
-    $opt_valgrind_options=$default_valgrind_options
-      unless defined $opt_valgrind_options;
+    push(@valgrind_args, @default_valgrind_args)
+      unless @valgrind_args;
 
-    mtr_report("Running valgrind with options \"$opt_valgrind_options\"");
+    mtr_report("Running valgrind with options \"",
+	       join(" ", @valgrind_args), "\"");
   }
 
   if ( ! $opt_testcase_timeout )
@@ -5008,7 +5020,7 @@ sub valgrind_arguments {
   }
 
   # Add valgrind options, can be overriden by user
-  mtr_add_arg($args, '%s', $opt_valgrind_options);
+  mtr_add_arg($args, '%s', $_) for (@valgrind_args);
 
   mtr_add_arg($args, $$exe);
 
@@ -5148,12 +5160,14 @@ Options for coverage, profiling etc
   gcov                  FIXME
   gprof                 FIXME
   valgrind              Run the "mysqltest" and "mysqld" executables using
-                        valgrind with options($default_valgrind_options)
+                        valgrind with default options
   valgrind-all          Synonym for --valgrind
   valgrind-mysqltest    Run the "mysqltest" and "mysql_client_test" executable
                         with valgrind
   valgrind-mysqld       Run the "mysqld" executable with valgrind
-  valgrind-options=ARGS Options to give valgrind, replaces default options
+  valgrind-options=ARGS Deprecated, use --valgrind-option
+  valgrind-option=ARGS  Option to give valgrind, replaces default option(s),
+                        can be specified more then once
   valgrind-path=[EXE]   Path to the valgrind executable
   callgrind             Instruct valgrind to use callgrind
 
Thread
bk commit into 5.0 tree (msvensson:1.2539) BUG#30560msvensson23 Oct