From 2d5634b592d81cc147d68dbb2c97a24ffd79ccf3 Mon Sep 17 00:00:00 2001 From: "msvensson@shellback.(none)" <> Date: Thu, 16 Mar 2006 12:06:39 +0100 Subject: [PATCH 1/7] Add extre DBUG_PRINT in push_warning --- sql/sql_error.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/sql/sql_error.cc b/sql/sql_error.cc index 191a6e0a1fd..19811efbb12 100644 --- a/sql/sql_error.cc +++ b/sql/sql_error.cc @@ -108,6 +108,7 @@ MYSQL_ERROR *push_warning(THD *thd, MYSQL_ERROR::enum_warning_level level, { MYSQL_ERROR *err= 0; DBUG_ENTER("push_warning"); + DBUG_PRINT("enter", ("code: %d, msg: %s", code, msg)); if (level == MYSQL_ERROR::WARN_LEVEL_NOTE && !(thd->options & OPTION_SQL_NOTES)) From 5ec7aa3aaf7d5e34f6dc5020c348f6e25745589a Mon Sep 17 00:00:00 2001 From: "msvensson@shellback.(none)" <> Date: Thu, 23 Mar 2006 15:04:46 +0100 Subject: [PATCH 2/7] Dump reject file before mysqltest in 'die' Makes it easier to see what happened before the failure --- client/mysqltest.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/client/mysqltest.c b/client/mysqltest.c index 3f2e7d8edb6..c15435bcbdf 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -573,6 +573,8 @@ static void die(const char *fmt, ...) { va_list args; DBUG_ENTER("die"); + + /* Print the error message */ va_start(args, fmt); if (fmt) { @@ -587,6 +589,15 @@ static void die(const char *fmt, ...) fflush(stderr); } va_end(args); + + /* Dump the result that has been accumulated so far to reject file */ + if (result_file && ds_res.length) + { + + reject_dump(result_file, ds_res.str, ds_res.length); + } + + /* Clean up and exit */ free_used_memory(); my_end(MY_CHECK_ERROR); exit(1); From 2b38c41bda066e3a872f0edfea7f6da108ef9b71 Mon Sep 17 00:00:00 2001 From: "msvensson@shellback.(none)" <> Date: Thu, 23 Mar 2006 15:07:39 +0100 Subject: [PATCH 3/7] mysql-test-run.pl Add support for debuggers and impove support for valgrind --- mysql-test/mysql-test-run.pl | 294 +++++++++++++++++++++++++---------- 1 file changed, 210 insertions(+), 84 deletions(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 6aa97ba6d37..5aa13acb683 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -133,6 +133,7 @@ our $glob_win32= 0; # OS and native Win32 executables our $glob_win32_perl= 0; # ActiveState Win32 Perl our $glob_cygwin_perl= 0; # Cygwin Perl our $glob_cygwin_shell= undef; +our $glob_use_libtool= 1; our $glob_mysql_test_dir= undef; our $glob_mysql_bench_dir= undef; our $glob_hostname= undef; @@ -189,7 +190,6 @@ our @opt_extra_mysqld_opt; our $opt_comment; our $opt_compress; our $opt_current_test; -our $opt_ddd; our $opt_debug; our $opt_do_test; our @opt_cases; # The test cases names in argv @@ -203,9 +203,14 @@ our $opt_gcov; our $opt_gcov_err; our $opt_gcov_msg; +our $glob_debugger= 0; our $opt_gdb; our $opt_client_gdb; +our $opt_ddd; +our $opt_client_ddd; our $opt_manual_gdb; +our $opt_manual_ddd; +our $opt_manual_debug; our $opt_gprof; our $opt_gprof_dir; @@ -259,11 +264,12 @@ our $opt_timer; our $opt_user; our $opt_user_test; -our $opt_valgrind; -our $opt_valgrind_mysqld; -our $opt_valgrind_mysqltest; -our $opt_valgrind_all; +our $opt_valgrind= 0; +our $opt_valgrind_mysqld= 0; +our $opt_valgrind_mysqltest= 0; +our $opt_valgrind_all= 0; our $opt_valgrind_options; +our $opt_valgrind_path; our $opt_verbose; @@ -410,6 +416,12 @@ sub initial_setup () { $glob_cygwin_perl= ($^O eq "cygwin"); $glob_win32= ($glob_win32_perl or $glob_cygwin_perl); + # Use libtool on all platforms except windows + if ( $glob_win32 ) + { + $glob_use_libtool= 0; + } + # We require that we are in the "mysql-test" directory # to run mysql-test-run @@ -524,9 +536,11 @@ sub command_line_setup () { # Debugging 'gdb' => \$opt_gdb, - 'manual-gdb' => \$opt_manual_gdb, 'client-gdb' => \$opt_client_gdb, + 'manual-gdb' => \$opt_manual_gdb, + 'manual-debug' => \$opt_manual_debug, 'ddd' => \$opt_ddd, + 'client-ddd' => \$opt_client_ddd, 'strace-client' => \$opt_strace_client, 'master-binary=s' => \$exe_master_mysqld, 'slave-binary=s' => \$exe_slave_mysqld, @@ -534,10 +548,12 @@ sub command_line_setup () { # Coverage, profiling etc 'gcov' => \$opt_gcov, 'gprof' => \$opt_gprof, - 'valgrind:s' => \$opt_valgrind, - 'valgrind-mysqltest:s' => \$opt_valgrind_mysqltest, - 'valgrind-all:s' => \$opt_valgrind_all, + 'valgrind' => \$opt_valgrind, + 'valgrind-mysqltest' => \$opt_valgrind_mysqltest, + 'valgrind-mysqld' => \$opt_valgrind_mysqld, + 'valgrind-all' => \$opt_valgrind_all, 'valgrind-options=s' => \$opt_valgrind_options, + 'valgrind-path=s' => \$opt_valgrind_path, # Misc 'big-test' => \$opt_big_test, @@ -692,29 +708,17 @@ sub command_line_setup () { mtr_error("Coverage test needs the source - please use source dist"); } - if ( $opt_gdb ) + # Check debug related options + if ( $opt_gdb || $opt_client_gdb || $opt_ddd || opt_client_ddd || + $opt_manual_gdb || $opt_manual_ddd || opt_manual_debug) { + # Indicate that we are using debugger + $glob_debugger= 1; + # Increase timeouts $opt_wait_timeout= 300; if ( $opt_extern ) { - mtr_error("Can't use --extern with --gdb"); - } - } - - if ( $opt_manual_gdb ) - { - $opt_gdb= 1; - if ( $opt_extern ) - { - mtr_error("Can't use --extern with --manual-gdb"); - } - } - - if ( $opt_ddd ) - { - if ( $opt_extern ) - { - mtr_error("Can't use --extern with --ddd"); + mtr_error("Can't use --extern when using debugger"); } } @@ -733,22 +737,20 @@ sub command_line_setup () { $opt_with_ndbcluster= 0; } - # The ":s" in the argument spec, means we have three different cases - # - # undefined option not set - # "" option set with no argument - # "somestring" option is name/path of valgrind executable - - # Take executable path from any of them, if any - $opt_valgrind_mysqld= $opt_valgrind; - $opt_valgrind= $opt_valgrind_mysqltest if $opt_valgrind_mysqltest; - $opt_valgrind= $opt_valgrind_all if $opt_valgrind_all; - - # If valgrind flag not defined, define if other valgrind flags are - unless ( defined $opt_valgrind ) + # Turn on valgrinding of all executables if "valgrind" or "valgrind-all" + if ( $opt_valgrind or $opt_valgrind_all ) { - $opt_valgrind= "" - if defined $opt_valgrind_mysqltest or defined $opt_valgrind_all; + mtr_report("Turning on valgrind for all executables"); + $opt_valgrind= 1; + $opt_valgrind_mysqld= 1; + $opt_valgrind_mysqltest= 1; + } + elsif ( $opt_valgrind_mysqld or $opt_valgrind_mysqltest ) + { + # If test's are run for a specific executable, turn on + # verbose and show-reachable + $opt_valgrind= 1; + $opt_valgrind_all= 1; } if ( ! $opt_testcase_timeout ) @@ -763,12 +765,11 @@ sub command_line_setup () { $opt_suite_timeout*= 4 if defined $opt_valgrind; } - if ( defined $opt_valgrind ) + # Increase times to wait for executables to start if using valgrind + if ( $opt_valgrind ) { $opt_sleep_time_after_restart= 10; $opt_sleep_time_for_delete= 60; - # >=2.1.2 requires the --tool option, some versions write to stdout, some to stderr - # valgrind --help 2>&1 | grep "\-\-tool" > /dev/null && VALGRIND="$VALGRIND --tool=memcheck" } if ( ! $opt_user ) @@ -893,19 +894,7 @@ sub executable_setup () { } else { - if ( $opt_valgrind_mysqltest ) - { - # client/mysqltest might be a libtool .sh script, so look for real exe - # to avoid valgrinding bash ;) - $exe_mysqltest= - mtr_exe_exists("$path_client_bindir/.libs/lt-mysqltest", - "$path_client_bindir/.libs/mysqltest", - "$path_client_bindir/mysqltest"); - } - else - { - $exe_mysqltest= mtr_exe_exists("$path_client_bindir/mysqltest"); - } + $exe_mysqltest= mtr_exe_exists("$path_client_bindir/mysqltest"); $exe_mysql_client_test= mtr_exe_exists("$glob_basedir/tests/mysql_client_test", "/usr/bin/false"); @@ -1378,8 +1367,9 @@ sub run_suite () { mtr_print_line(); - if ( ! $opt_gdb and ! $glob_use_running_server and - ! $opt_ddd and ! $glob_use_embedded_server ) + if ( ! $opt_debugger and + ! $glob_use_running_server and + ! $glob_use_embedded_server ) { stop_masters_slaves(); } @@ -1748,17 +1738,18 @@ sub report_failure_and_restart ($) { my $test_mode= join(" ", @::glob_test_mode) || "default"; print "Aborting: $tinfo->{'name'} failed in $test_mode mode. "; print "To continue, re-run with '--force'.\n"; - if ( ! $opt_gdb and ! $glob_use_running_server and - ! $opt_ddd and ! $glob_use_embedded_server ) + if ( ! $glob_debugger and + ! $glob_use_running_server and + ! $glob_use_embedded_server ) { stop_masters_slaves(); } mtr_exit(1); } - # FIXME always terminate on failure?! - if ( ! $opt_gdb and ! $glob_use_running_server and - ! $opt_ddd and ! $glob_use_embedded_server ) + if ( ! $glob_debugger and + ! $glob_use_running_server and + ! $glob_use_embedded_server ) { stop_masters_slaves(); } @@ -1882,7 +1873,7 @@ sub mysqld_arguments ($$$$$) { mtr_add_arg($args, "%s--language=%s", $prefix, $path_language); mtr_add_arg($args, "%s--tmpdir=$opt_tmpdir", $prefix); - if ( defined $opt_valgrind_mysqld ) + if ( $opt_valgrind_mysqld ) { mtr_add_arg($args, "%s--skip-safemalloc", $prefix); mtr_add_arg($args, "%s--skip-bdb", $prefix); @@ -2020,7 +2011,8 @@ sub mysqld_arguments ($$$$$) { mtr_add_arg($args, "%s--log-warnings", $prefix); } - if ( $opt_gdb or $opt_client_gdb or $opt_manual_gdb or $opt_ddd) + # Indicate to "mysqld" it will be debugged in debugger + if ( $glob_debugger ) { mtr_add_arg($args, "%s--gdb", $prefix); } @@ -2111,13 +2103,22 @@ sub mysqld_start ($$$$) { mtr_init_args(\$args); - if ( defined $opt_valgrind_mysqld ) + if ( $opt_valgrind_mysqld ) { valgrind_arguments($args, \$exe); } mysqld_arguments($args,$type,$idx,$extra_opt,$slave_master_info); + if ( $opt_gdb || $opt_manual_gdb) + { + gdb_arguments(\$args, \$exe, $type); + } + elsif ( $opt_ddd || $opt_manual_ddd ) + { + ddd_arguments(\$args, \$exe, $type); + } + if ( $type eq 'master' ) { if ( $pid= mtr_spawn($exe, $args, "", @@ -2297,7 +2298,7 @@ sub run_mysqltest ($) { mtr_init_args(\$args); - if ( defined $opt_valgrind_mysqltest ) + if ( $opt_valgrind_mysqltest ) { valgrind_arguments($args, \$exe); } @@ -2379,7 +2380,10 @@ sub run_mysqltest ($) { # Add arguments that should not go into the MYSQL_TEST env var # ---------------------------------------------------------------------- - mtr_add_arg($args, "-R"); + mtr_add_arg($args, "--test-file"); + mtr_add_arg($args, $tinfo->{'path'}); + + mtr_add_arg($args, "--result-file"); mtr_add_arg($args, $tinfo->{'result_file'}); if ( $opt_record ) @@ -2387,10 +2391,130 @@ sub run_mysqltest ($) { mtr_add_arg($args, "--record"); } - return mtr_run_test($exe,$args,$tinfo->{'path'},"",$path_timefile,""); + if ( $opt_client_gdb ) + { + gdb_arguments(\$args, \$exe, "client"); + } + elsif ( $opt_client_ddd ) + { + ddd_arguments(\$args, \$exe, "client"); + } + + if ($glob_use_libtool) + { + # Add "libtool --mode-execute" before the test to execute + unshift(@$args, "--mode=execute", $path); + $exe= "libtool"; + } + + return mtr_run_test($exe,$args,"","",$path_timefile,""); } +# +# Modify the exe and args so that program is run in gdb in xterm +# +sub gdb_arguments { + my $args= shift; + my $exe= shift; + my $type= shift; + + # Write $args to gdb init file + my $str= join(" ", @$$args); + my $gdb_init_file= "$opt_tmpdir/gdbinit.$type"; + + if ( $type eq "client" ) + { + # write init file for client + mtr_tofile($gdb_init_file, + "set args $str\n" + ); + } + else + { + # write init file for mysqld + mtr_tofile($gdb_init_file, + "file $$exe\n" . + "set args $str\n" . + "break mysql_parse\n" . + "commands 1\n" . + "disable 1\n" . + "end\n" . + "run" + ); + } + + $$args= []; + mtr_add_arg($$args, "-title"); + mtr_add_arg($$args, "$type"); + mtr_add_arg($$args, "-e"); + if ( $glob_use_libtool ) + { + mtr_add_arg($$args, "libtool"); + mtr_add_arg($$args, "--mode=execute"); + } + + mtr_add_arg($$args, "gdb"); + mtr_add_arg($$args, "-x"); + mtr_add_arg($$args, "$gdb_init_file"); + mtr_add_arg($$args, "$$exe"); + + $$exe= "xterm"; +} + +# +# Modify the exe and args so that program is run in ddd +# +sub ddd_arguments { + my $args= shift; + my $exe= shift; + my $type= shift; + + # Write $args to ddd init file + my $str= join(" ", @$$args); + my $gdb_init_file= "$opt_tmpdir/gdbinit.$type"; + + if ( $type eq "client" ) + { + # write init file for client + mtr_tofile($gdb_init_file, + "set args $str\n" . + "break main\n" + ); + } + else + { + # write init file for mysqld + mtr_tofile($gdb_init_file, + "file $$exe\n" . + "set args $str\n" . + "break mysql_parse\n" . + "commands 1\n" . + "disable 1\n" . + "end\n" . + "run" + ); + } + + my $save_exe= $$exe; + $$args= []; + if ( $glob_use_libtool ) + { + $$exe= "libtool"; + mtr_add_arg($$args, "--mode=execute"); + mtr_add_arg($$args, "ddd"); + } + else + { + $$exe= "ddd"; + } + mtr_add_arg($$args, "--command=$gdb_init_file"); + mtr_add_arg($$args, "$save_exe"); +} + +# +# Modify the exe and args so that program is run in valgrind +# sub valgrind_arguments { my $args= shift; my $exe= shift; @@ -2402,7 +2526,7 @@ sub valgrind_arguments { mtr_add_arg($args, "--suppressions=%s/valgrind.supp", $glob_mysql_test_dir) if -f "$glob_mysql_test_dir/valgrind.supp"; - if ( defined $opt_valgrind_all ) + if ( $opt_valgrind_all ) { mtr_add_arg($args, "-v"); mtr_add_arg($args, "--show-reachable=yes"); @@ -2410,13 +2534,12 @@ sub valgrind_arguments { if ( $opt_valgrind_options ) { - # FIXME split earlier and put into @glob_valgrind_* mtr_add_arg($args, split(' ', $opt_valgrind_options)); } mtr_add_arg($args, $$exe); - $$exe= $opt_valgrind || "valgrind"; + $$exe= $opt_valgrind_path || "valgrind"; } @@ -2474,10 +2597,12 @@ Options to run test on running server Options for debugging the product - gdb FIXME - manual-gdb FIXME - client-gdb FIXME - ddd FIXME + gdb Start the mysqld(s) in gdb + manual-gdb Let user manually start mysqld in gdb, before running test(s) + manual-debug Let user manually start mysqld in debugger, before running test(s) + client-gdb Start mysqltest client in gdb + ddd Start mysqld in ddd + client-ddd Start mysqltest client in ddd strace-client FIXME master-binary=PATH Specify the master "mysqld" to use slave-binary=PATH Specify the slave "mysqld" to use @@ -2486,12 +2611,13 @@ Options for coverage, profiling etc gcov FIXME gprof FIXME - valgrind[=EXE] Run the "mysqltest" executable as well as the "mysqld" - server using valgrind, optionally specifying the - executable path/name - valgrind-mysqltest[=EXE] In addition, run the "mysqltest" executable with valgrind - valgrind-all[=EXE] Adds verbose flag, and --show-reachable to valgrind + valgrind Run the "mysqltest" and "mysqld" executables using valgrind + valgrind-all Same as "valgrind" but will also add "verbose" and "--show-reachable" + flags to valgrind + valgrind-mysqltest Run the "mysqltest" executable with valgrind + valgrind-mysqld Run the "mysqld" executable with valgrind valgrind-options=ARGS Extra options to give valgrind + valgrind-path=[EXE] Path to the valgrind executable Misc options From 5ebda1d2f6991a401c267bee130322a9a9fb0df7 Mon Sep 17 00:00:00 2001 From: "msvensson@shellback.(none)" <> Date: Thu, 23 Mar 2006 16:21:20 +0100 Subject: [PATCH 4/7] Update after merge, function renamed --- client/mysqltest.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/client/mysqltest.c b/client/mysqltest.c index 0fec7ffc528..0de63ccd329 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -634,10 +634,7 @@ static void die(const char *fmt, ...) /* Dump the result that has been accumulated so far to reject file */ if (result_file && ds_res.length) - { - - reject_dump(result_file, ds_res.str, ds_res.length); - } + dump_result_to_reject_file(result_file, ds_res.str, ds_res.length); /* Clean up and exit */ free_used_memory(); From 6a65f08c267926a7a7d15d1f9736b1973967f297 Mon Sep 17 00:00:00 2001 From: "msvensson@shellback.(none)" <> Date: Thu, 23 Mar 2006 16:22:56 +0100 Subject: [PATCH 5/7] Add support fo --manual-debug, --manual-gdb and -manual-ddd Touchups --- mysql-test/mysql-test-run.pl | 78 ++++++++++++++++++++++++++---------- 1 file changed, 56 insertions(+), 22 deletions(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 4b3c773911f..21f3df1e6b7 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -774,8 +774,8 @@ sub command_line_setup () { } # Check debug related options - if ( $opt_gdb || $opt_client_gdb || $opt_ddd || opt_client_ddd || - $opt_manual_gdb || $opt_manual_ddd || opt_manual_debug) + if ( $opt_gdb || $opt_client_gdb || $opt_ddd || $opt_client_ddd || + $opt_manual_gdb || $opt_manual_ddd || $opt_manual_debug) { # Indicate that we are using debugger $glob_debugger= 1; @@ -1557,7 +1557,7 @@ sub run_suite () { mtr_print_line(); - if ( ! $opt_debugger and + if ( ! $glob_debugger and ! $glob_use_running_server and ! $glob_use_embedded_server ) { @@ -2494,7 +2494,7 @@ sub mysqld_start ($$$$$) { my $args; # Arg vector my $exe; - my $pid; + my $pid= -1; if ( $type eq 'master' ) { @@ -2527,30 +2527,45 @@ sub mysqld_start ($$$$$) { { ddd_arguments(\$args, \$exe, $type); } + elsif ( $opt_manual_debug ) + { + print "\nStart $type in your debugger\n" . + "dir: $glob_mysql_test_dir\n" . + "exe: $exe\n" . + "args: " . join(" ", @$args) . "\n\n" . + "Waiting ....\n"; + + # Indicate the exe should not be started + $exe= undef; + } if ( $type eq 'master' ) { - if ( $pid= mtr_spawn($exe, $args, "", - $master->[$idx]->{'path_myerr'}, - $master->[$idx]->{'path_myerr'}, - "", - { append_log_file => 1 }) ) + if ( ! defined $exe or + $pid= mtr_spawn($exe, $args, "", + $master->[$idx]->{'path_myerr'}, + $master->[$idx]->{'path_myerr'}, + "", + { append_log_file => 1 }) ) { return sleep_until_file_created($master->[$idx]->{'path_mypid'}, - $master->[$idx]->{'start_timeout'}, $pid); + $master->[$idx]->{'start_timeout'}, + $pid); } } if ( $type eq 'slave' ) { - if ( $pid= mtr_spawn($exe, $args, "", + if ( ! defined $exe or + $pid= mtr_spawn($exe, $args, "", $slave->[$idx]->{'path_myerr'}, $slave->[$idx]->{'path_myerr'}, "", { append_log_file => 1 }) ) { return sleep_until_file_created($slave->[$idx]->{'path_mypid'}, - $master->[$idx]->{'start_timeout'}, $pid); + $master->[$idx]->{'start_timeout'}, + $pid); } } @@ -3012,7 +3027,7 @@ sub run_mysqltest ($) { if ($glob_use_libtool) { # Add "libtool --mode-execute" before the test to execute - unshift(@$args, "--mode=execute", $path); + unshift(@$args, "--mode=execute", $exe); $exe= "libtool"; } @@ -3049,27 +3064,37 @@ sub gdb_arguments { { # write init file for client mtr_tofile($gdb_init_file, - "set args $str\n" - ); + "set args $str\n" . + "break main\n"); } else { # write init file for mysqld mtr_tofile($gdb_init_file, - "file $$exe\n" . "set args $str\n" . "break mysql_parse\n" . "commands 1\n" . "disable 1\n" . "end\n" . - "run" - ); + "run"); + } + + if ( $opt_manual_gdb ) + { + print "\nTo start gdb for$type, type in another window:\n"; + print "cd $glob_mysql_test_dir;\n"; + print "gdb -x $gdb_init_file $$exe\n"; + + # Indicate the exe should not be started + $$exe= undef; + return; } $$args= []; mtr_add_arg($$args, "-title"); mtr_add_arg($$args, "$type"); mtr_add_arg($$args, "-e"); + if ( $glob_use_libtool ) { mtr_add_arg($$args, "libtool"); @@ -3101,8 +3126,7 @@ sub ddd_arguments { # write init file for client mtr_tofile($gdb_init_file, "set args $str\n" . - "break main\n" - ); + "break main\n"); } else { @@ -3114,8 +3138,18 @@ sub ddd_arguments { "commands 1\n" . "disable 1\n" . "end\n" . - "run" - ); + "run"); + } + + if ( $opt_manual_ddd ) + { + print "\nTo start ddd for$type, type in another window:\n"; + print "cd $glob_mysql_test_dir;\n"; + print "ddd -x $gdb_init_file $$exe\n"; + + # Indicate the exe should not be started + $$exe= undef; + return; } my $save_exe= $$exe; From 8091b7b5f11e0594691ed1daecdd81a6ab58affa Mon Sep 17 00:00:00 2001 From: "msvensson@shellback.(none)" <> Date: Thu, 23 Mar 2006 16:39:51 +0100 Subject: [PATCH 6/7] Moved "tmpdir" and 2vardor" to the documented flags and add some documentation --- mysql-test/mysql-test-run.pl | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 21f3df1e6b7..86799a6a793 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -619,6 +619,10 @@ sub command_line_setup () { 'stress-test-count=i' => \$opt_stress_test_count, 'stress-test-duration=i' => \$opt_stress_test_duration, + # Directories + 'tmpdir=s' => \$opt_tmpdir, + 'vardir=s' => \$opt_vardir, + # Misc 'big-test' => \$opt_big_test, 'comment=s' => \$opt_comment, @@ -636,11 +640,9 @@ sub command_line_setup () { 'start-and-exit' => \$opt_start_and_exit, 'start-from=s' => \$opt_start_from, 'timer' => \$opt_timer, - 'tmpdir=s' => \$opt_tmpdir, 'unified-diff|udiff' => \$opt_udiff, 'user-test=s' => \$opt_user_test, 'user=s' => \$opt_user, - 'vardir=s' => \$opt_vardir, 'verbose' => \$opt_verbose, 'wait-timeout=i' => \$opt_wait_timeout, 'testcase-timeout=i' => \$opt_testcase_timeout, @@ -3227,6 +3229,13 @@ Options to control what engine/variation to run bench Run the benchmark suite FIXME small-bench FIXME +Options to control directories to use + vardir=DIR The directory where files generated from the test run + is stored(default: ./var). Specifying a ramdisk or tmpfs + will speed up tests. + tmpdir=DIR The directory where temporary files are stored + (default: ./var/tmp). + Options to control what test suites or cases to run force Continue to run the suite after failure @@ -3315,7 +3324,6 @@ Options not yet described, or that I want to look into more old-master sleep=SECONDS socket=PATH - tmpdir=DIR user-test=s wait-timeout=SECONDS warnings From f4426c0d3d541e8c9279862e87c0e784019643d1 Mon Sep 17 00:00:00 2001 From: "msvensson@shellback.(none)" <> Date: Thu, 23 Mar 2006 16:41:29 +0100 Subject: [PATCH 7/7] Remove unused option "verbose" --- mysql-test/mysql-test-run.pl | 4 ---- 1 file changed, 4 deletions(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 86799a6a793..a9bbe3bc7e1 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -300,8 +300,6 @@ our $opt_stress_test_duration= 0; our $opt_stress_init_file= ""; our $opt_stress_test_file= ""; -our $opt_verbose; - our $opt_wait_for_master; our $opt_wait_for_slave; our $opt_wait_timeout= 10; @@ -643,7 +641,6 @@ sub command_line_setup () { 'unified-diff|udiff' => \$opt_udiff, 'user-test=s' => \$opt_user_test, 'user=s' => \$opt_user, - 'verbose' => \$opt_verbose, 'wait-timeout=i' => \$opt_wait_timeout, 'testcase-timeout=i' => \$opt_testcase_timeout, 'suite-timeout=i' => \$opt_suite_timeout, @@ -3296,7 +3293,6 @@ Options for coverage, profiling etc Misc options comment=STR Write STR to the output - verbose Verbose output from this script script-debug Debug this script itself timer Show test case execution time start-and-exit Only initiate and start the "mysqld" servers, use the startup