Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
7ba18803
Commit
7ba18803
authored
Oct 06, 2006
by
msvensson@neptunus.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add error handling of failure to start server to "run_testcase_start_servers"
parent
738ba624
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
17 deletions
+39
-17
mysql-test/lib/mtr_report.pl
mysql-test/lib/mtr_report.pl
+5
-3
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+34
-14
No files found.
mysql-test/lib/mtr_report.pl
View file @
7ba18803
...
@@ -144,9 +144,11 @@ sub mtr_report_test_failed ($) {
...
@@ -144,9 +144,11 @@ sub mtr_report_test_failed ($) {
print
"
[ fail ]
\n
";
print
"
[ fail ]
\n
";
}
}
# FIXME Instead of this test, and meaningless error message in 'else'
if
(
$tinfo
->
{'
comment
'}
)
# we should write out into $::path_timefile when the error occurs.
{
if
(
-
f
$::path_timefile
)
print
"
\n
ERROR:
$tinfo
->{'comment'}
\n
";
}
elsif
(
-
f
$::path_timefile
)
{
{
print
"
\n
Errors are (from $::path_timefile) :
\n
";
print
"
\n
Errors are (from $::path_timefile) :
\n
";
print
mtr_fromfile
(
$::path_timefile
);
# FIXME print_file() instead
print
mtr_fromfile
(
$::path_timefile
);
# FIXME print_file() instead
...
...
mysql-test/mysql-test-run.pl
View file @
7ba18803
...
@@ -2775,6 +2775,9 @@ sub do_after_run_mysqltest($)
...
@@ -2775,6 +2775,9 @@ sub do_after_run_mysqltest($)
mtr_appendfile_to_file
(
$path_timefile
,
$path_mysqltest_log
)
mtr_appendfile_to_file
(
$path_timefile
,
$path_mysqltest_log
)
if
-
f
$path_timefile
;
if
-
f
$path_timefile
;
# Remove the file that mysqltest writes info to
unlink
(
$path_timefile
);
}
}
...
@@ -2807,7 +2810,12 @@ sub run_testcase ($) {
...
@@ -2807,7 +2810,12 @@ sub run_testcase ($) {
my
$died
=
mtr_record_dead_children
();
my
$died
=
mtr_record_dead_children
();
if
(
$died
or
$master_restart
or
$slave_restart
)
if
(
$died
or
$master_restart
or
$slave_restart
)
{
{
run_testcase_start_servers
(
$tinfo
);
if
(
run_testcase_start_servers
(
$tinfo
))
{
mtr_report_test_name
(
$tinfo
);
report_failure_and_restart
(
$tinfo
);
return
1
;
}
}
}
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
...
@@ -3748,6 +3756,17 @@ sub run_testcase_stop_servers($$$) {
...
@@ -3748,6 +3756,17 @@ sub run_testcase_stop_servers($$$) {
}
}
}
}
#
# run_testcase_start_servers
#
# Start the servers neede by this test case
#
# RETURN
# 0 OK
# 1 Start failed
#
sub
run_testcase_start_servers
($)
{
sub
run_testcase_start_servers
($)
{
my
$tinfo
=
shift
;
my
$tinfo
=
shift
;
...
@@ -3755,7 +3774,7 @@ sub run_testcase_start_servers($) {
...
@@ -3755,7 +3774,7 @@ sub run_testcase_start_servers($) {
if
(
$glob_use_running_server
or
$glob_use_embedded_server
)
if
(
$glob_use_running_server
or
$glob_use_embedded_server
)
{
{
return
;
return
0
;
}
}
# -------------------------------------------------------
# -------------------------------------------------------
...
@@ -3796,10 +3815,9 @@ sub run_testcase_start_servers($) {
...
@@ -3796,10 +3815,9 @@ sub run_testcase_start_servers($) {
$master
->
[
0
]
->
{'
start_timeout
'},
$master
->
[
0
]
->
{'
start_timeout
'},
$master
->
[
0
]
->
{'
pid
'}))
$master
->
[
0
]
->
{'
pid
'}))
{
{
mtr_report_test_name
(
$tinfo
);
mtr_report
("
Failed to create 'cluster/apply_status' table
");
$tinfo
->
{'
comment
'}
=
"
Failed to create 'cluster/apply_status' table
";
report_failure_and_restart
(
$tinfo
);
return
1
;
return
;
}
}
}
}
mtr_tofile
(
$master
->
[
1
]
->
{'
path_myerr
'},"
CURRENT_TEST:
$tname
\n
");
mtr_tofile
(
$master
->
[
1
]
->
{'
path_myerr
'},"
CURRENT_TEST:
$tname
\n
");
...
@@ -3822,13 +3840,10 @@ sub run_testcase_start_servers($) {
...
@@ -3822,13 +3840,10 @@ sub run_testcase_start_servers($) {
im_create_defaults_file
(
$instance_manager
);
im_create_defaults_file
(
$instance_manager
);
unless
(
mtr_im_start
(
$instance_manager
,
$tinfo
->
{
im_opts
})
)
if
(
!
mtr_im_start
(
$instance_manager
,
$tinfo
->
{
im_opts
})
)
{
{
mtr_report_test_name
(
$tinfo
);
$tinfo
->
{'
comment
'}
=
"
Failed to start Instance Manager.
";
report_failure_and_restart
(
$tinfo
);
return
1
;
mtr_report
("
Failed to start Instance Manager.
"
.
"
The test '
$tname
' is marked as failed.
");
return
;
}
}
}
}
...
@@ -3878,7 +3893,8 @@ sub run_testcase_start_servers($) {
...
@@ -3878,7 +3893,8 @@ sub run_testcase_start_servers($) {
if
(
ndbcluster_wait_started
(
$cluster
,
""))
if
(
ndbcluster_wait_started
(
$cluster
,
""))
{
{
# failed to start
# failed to start
mtr_report
("
Start of
$cluster
->{'name'} cluster failed,
");
$tinfo
->
{'
comment
'}
=
"
Start of
$cluster
->{'name'} cluster failed
";
return
1
;
}
}
}
}
...
@@ -3890,9 +3906,13 @@ sub run_testcase_start_servers($) {
...
@@ -3890,9 +3906,13 @@ sub run_testcase_start_servers($) {
if
(
mysqld_wait_started
(
$mysqld
))
if
(
mysqld_wait_started
(
$mysqld
))
{
{
mtr_warning
("
Failed to start
$mysqld
->{'type'} mysqld
$mysqld
->{'idx'}
");
# failed to start
$tinfo
->
{'
comment
'}
=
"
Failed to start
$mysqld
->{'type'} mysqld
$mysqld
->{'idx'}
";
return
1
;
}
}
}
}
return
0
;
}
}
#
#
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment