Commit graph

35 commits

Author SHA1 Message Date
anozdrin/alik@alik.
1a7cb4153c Preliminary patch for the following bugs:
- BUG#15934: Instance manager fails to work;
  - BUG#18020: IM connect problem;
  - BUG#18027: IM: Server_ID differs;
  - BUG#18033: IM: Server_ID not reported;
  - BUG#21331: Instance Manager: Connect problems in tests;

The only test suite has been changed
(server codebase has not been modified).
2006-08-29 15:46:40 +04:00
anozdrin@mysql.com
a142a4d97b Small fix for test suite:
- fix for IM stopping routine;
  - polishing.
2006-06-19 14:15:26 +04:00
anozdrin@mysql.com
3b74668bfa Partial fix for BUG#14106: IM: im_life_cycle and im_utils
tests fail on FreeBSD.

The patch contains of the following:
  - make Instance Manager, running in the daemon mode, dump
    the pid of angel-process in the special file;
  - default value of angel-pid-file-name is 'mysqlmanager.angel.pid';
  - if ordinary (IM) pid-file-name is specified in the configuration,
    angel-pid-file-name is updated according to the following
    rule: extension of the basename of pid-file-name is replaced by
    '.angel.pid.
    For example:
    - pid-file-name: /tmp/im.pid
      => angel-pid-file-name: /tmp/im.angel.pid
    - pid-file-name: /tmp/im.txt
      => angel-pid-file-name: /tmp/im.angel.pid
    - pid-file-name: /tmp/5.0/im
      => angel-pid-file-name: /tmp/5.0/im.angel.pid
  - add support for configuration option to customize angel
    pid file name;
  - fix test suite to use angel pid to kill Instance Manager
    by all means if something went wrong.

Background
----------

The problem is that on some OSes (FreeBSD for one) Instance
Manager does not get SIGTERM, so can not shutdown gracefully.
Test suite wasn't able to cope with it, so this leads to the
mess in test results.

The problem should be split into two:
  - fix signal handling;
  - fix test suite.

This patch fixes test suite so that it will be able to kill
uncooperative Instance Manager. In order to achieve this,
test suite needs to know PID of IM Angel process.
2006-05-06 13:57:56 +04:00
msvensson@neptunus.(none)
0e08e39763 Change sleep_until_file_created to sleep 100 millisecond instead of sleeping 1 seconds between each iteration. 2006-04-26 13:22:18 +02:00
msvensson@neptunus.(none)
7e3593def8 Bug#19084 ./mysql-test-run.pl do not print bootstrap run info
- Log boostratp/install to var/log/boostrap.log
 - Log output from mysqladmin to var/log/mysqladmin.log
 - Remove old manager references
2006-04-24 11:26:41 +02:00
msvensson@neptunus.(none)
1f2ac2195a Remove 5 second sleep for win32 2006-04-24 10:22:26 +02:00
joerg@mysql.com
df09a0cedc Manual merge. 2006-04-07 13:16:40 +02:00
joerg@mysql.com
7e4d41de58 Perl test script: Avoid some aborts, which made the whole build/test process terminate. 2006-04-07 13:02:15 +02:00
knielsen@mysql.com
5346bf7392 Merge mysql.com:/usr/local/mysql/mysql-4.1-fixrace
into  mysql.com:/usr/local/mysql/mysql-5.0
2006-02-12 00:10:43 +01:00
knielsen@mysql.com
43189fd8ad Fix a race on some platforms in mysql-test-run.pl, where it would sometimes
errorneously abort reporting failure to kill child processes, where in
reality the problem was merely that the child had become a zombie because
of missing waitpid() call.
2006-02-11 22:50:59 +01:00
knielsen@mysql.com
f6b1f10707 Fix QNX test abort in release builds and pushbuild, avoid killing our
parent when we are not the process group leader.
2006-01-04 16:02:41 +01:00
kent@mysql.com
7635353bc8 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
2005-10-16 20:51:19 +02:00
anozdrin@mysql.com
c73e03ff22 WL#2789 "Instance Manager: test using mysql-test-run testing framework"
1) Add support to testing Instance Manager in daemon mode;
2) Don't run Instance Manager tests when running with --ps-protocol option;
2005-10-01 01:12:14 +04:00
kent@mysql.com
656b0cc15a Merge 2005-09-29 03:20:31 +02:00
kent@mysql.com
7e6a78a1ae mtr_process.pl:
Append to some of the log files, not overwrite
2005-09-28 23:53:31 +02:00
joerg@mysql.com
3d457c3ba1 Merge mysql.com:/M41/upward-4.1 into mysql.com:/M50/merge-5.0 2005-09-14 14:34:45 +02:00
joerg@mysql.com
b4d4e7a306 Improve error / process handling in the Perl script to run the test suite (patch supplied by Kent). 2005-09-14 13:55:53 +02:00
kent@mysql.com
9de5938254 Merge mysql.com:/Users/kent/mysql/bk/mysql-4.1
into mysql.com:/Users/kent/mysql/bk/mysql-5.0
2005-09-01 14:34:33 +02:00
kent@mysql.com
1a5f346bf9 mtr_process.pl:
Make sure mtr_kill_processes() is called with an array ref
  Corrected error string for STDERR redirect
2005-09-01 14:32:42 +02:00
kent@mysql.com
16eecea22e mtr_timer.pl, mtr_report.pl, mtr_process.pl, mysql-test-run.pl:
Backporting from 5.0
2005-08-31 16:28:47 +02:00
anozdrin@mysql.com
d30534c953 Implement WL#2789 "Instance Manager: test using mysql-test-run testing framework" 2005-08-29 22:28:42 +04:00
kent@mysql.com
af2b5f3bae mtr_process.pl:
Call mtr_timer_stop_all() at exit
mtr_report.pl, mysql-test-run.pl:
  Added default/ps-protocol/embedded to abort and summary line
mtr_timer.pl:
  Added function mtr_timer_stop_all()
2005-08-25 16:25:54 +02:00
kent@mysql.com
1476a52433 mtr_timer.pl, mysql-test-run.pl, mtr_report.pl, mtr_process.pl:
Added suite and test case timeout
mtr_timer.pl:
  new file
2005-08-18 00:16:44 +02:00
kent@mysql.com
adb94df296 mtr_process.pl:
Bug#11792: Create a shell like 'mysqltest' exit status
2005-08-18 00:07:17 +02:00
kent@mysql.com
1dddccb8e9 mtr_process.pl:
Longer shutdown timeout, slave may be in reconnect
  HUP seem to disturb exit(), added sleep to make sure
  output is flushed
2005-08-17 23:47:03 +02:00
kent@mysql.com
c3104d1af1 mtr_process.pl:
Bug#11792: Check all of status code, to catch a crash as a failure
mtr_cases.pl:
  Code cleanup for skipped/disabled handling
mtr_process.pl:
  In debug mode, report if mysqladmin did not at least
  make the server stop listening to the port.
  Increased the time waiting for terminating to 20 seconds,
  to wait for really slow slave shutdown.
  Added call to start_reap_all(), to avoid zombies.
mtr_report.pl:
  Removed prototype for unused function mtr_report_test_disabled()
2005-08-17 01:18:13 +02:00
kent@mysql.com
9457373c5f mtr_process.pl:
Bug#12094: Let sleep_until_file_created() return the pid as intended
2005-08-16 19:49:43 +02:00
kent@mysql.com
a2073df284 mtr_process.pl:
Added a sleep for 5 seconds when shuting down,
  work around for strange problem with server restarts
mtr_cases.pl:
  Set default time zone as opt to mysqld
mysql-test-run.pl:
  Enabled --mysqld=<flags> to work
  Put some Windows path names into environment,
  to be used in --replace_result
mysql-test-run.sh:
  Make shell script tolerant to Windows change in test cases
2005-06-10 21:29:37 +02:00
kent@mysql.com
5ec1549776 mtr_misc.pl, mtr_report.pl:
Try kill all children to the mysql-test-run process when exiting
mtr_process.pl:
  Added new function mtr_exit() that try kill all children to the mysql-test-run process when exiting
mysql-test-run.pl:
  Try kill all children to the mysql-test-run process when exiting
  New --vardir caused problems on Windows
  Changed faulty calls to error() to mtr_error()
2005-06-05 20:10:47 +02:00
kent@mysql.com
81b36addc9 mtr_report.pl, mtr_process.pl, mysql-test-run.pl:
Added option --vardir=<directory> for feature bug#10096
2005-05-15 17:22:54 +02:00
kent@mysql.com
75ebab7861 Windows compatibility changes of the 'rpl_delete_all',
'ps_1general' and 'fulltext_cache' test cases.
2005-02-17 02:59:39 +01:00
kent@mysql.com
1f088e95d3 mysql-test-run.pl:
Let --start-and-exit actually start a server
  Added that test case names can be specified on the comman line
  Added embedded server support
  Added environment variables UMASK, UMASK_DIR
  Added missing MASTER_MYSOCK1, MASTER_MYPORT1, USE_RUNNING_SERVER
  Added missing CHARSETSDIR, MYSQL_FIX_SYSTEM_TABLES, MYSQL_CLIENT_TEST
  Pass on return value from sleep_until_file_created(), to fail test
  Fail test if early termination of mysqld servers
  Create intial databases for the second master, and two additional slaves
mtr_process.pl:
  Find out if port is still in use, using simple TCP connect
  Use non blocking waitpid() to catch terminations early
  Make a special case spawning the 'mysqltest' application
  Redo the fork() if it returns EAGAIN
  Make sure to record if master or slave terminated
  Improved debugging output
  Improved code that remove PID files to avoid race
  Abort if we can't stop all mysqld servers using our ports
  Many improvements in killing mysqld servers
  Let sleep_until_file_created() catch if server died early
mtr_report.pl:
  Added option to disable test cases using <testcase>.disabled file
  If --timer, only try to open file with time data if it exists
mtr_io.pl:
  Remove starting/ending space reading server options from file
2005-02-03 21:13:27 +01:00
kent@mysql.com
31d5463ae1 mtr_process.pl:
Catch more fork() errors.
  Moved sleep_until_file_created() here from "mysql-test-run.pl".
  Improved debug output.
mtr_io.pl:
  Improved mtr_get_opts_from_file(), try to mimic some sh.
mysql-test-run.pl:
  Cleaned up the timeout handling.
  Created new function environment_setup().
  Corrected time zone handling.
  Moved sleep_until_file_created() to "lib/mtr_process.pl".
  Improved debug output.
2005-01-11 01:35:08 +01:00
kent@mysql.com
c725e09089 mtr_process.pl:
Added missing stop_reap_all() if returns early from function
mysql-test-run.pl:
  Improved output from --script-debug
  Initial Cygwin support
  Improved mysqld process termination
2005-01-03 16:54:08 +01:00
kent@mysql.com
9d860c060b Many files:
Perl version of mysql-test-run
  new file
2004-12-30 16:34:01 +01:00