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
704ef98d
Commit
704ef98d
authored
Apr 28, 2018
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.2 into 10.3
parents
49680497
bcc26dce
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
117 additions
and
128 deletions
+117
-128
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+117
-128
No files found.
mysql-test/mysql-test-run.pl
View file @
704ef98d
...
...
@@ -3975,32 +3975,32 @@ sub run_testcase ($$) {
}
my
$test
=
$tinfo
->
{
suite
}
->
start_test
(
$tinfo
);
# Set
to a list of processes we have to keep waiting (expectedly died servers)
my
%
keep_waiting_proc
=
()
;
# Set
only when we have to keep waiting after expectedly died server
my
$keep_waiting_proc
=
0
;
my
$print_timeout
=
start_timer
(
$print_freq
*
60
);
while
(
1
)
{
my
$proc
;
if
(
scalar
(
keys
(
%
keep_waiting_proc
))
>
0
)
if
(
$keep_waiting_proc
)
{
# Any other process exited?
$proc
=
My::
SafeProcess
->
check_any
();
if
(
$proc
)
{
mtr_verbose
("
Found exited process
$proc
");
$keep_waiting_proc
{
$proc
}
=
1
;
}
else
{
$proc
=
$keep_waiting_proc
;
# Also check if timer has expired, if so cancel waiting
if
(
has_expired
(
$test_timeout
)
)
{
%
keep_waiting_proc
=
()
;
$keep_waiting_proc
=
0
;
}
}
}
if
(
scalar
(
keys
(
%
keep_waiting_proc
))
==
0
)
if
(
!
$keep_waiting_proc
)
{
if
(
$test_timeout
>
$print_timeout
)
{
...
...
@@ -4017,19 +4017,19 @@ sub run_testcase ($$) {
else
{
$proc
=
My::
SafeProcess
->
wait_any_timeout
(
$test_timeout
);
$keep_waiting_proc
{
$proc
}
=
1
;
}
}
if
(
scalar
(
keys
(
%
keep_waiting_proc
))
==
0
)
# Will be restored if we need to keep waiting
$keep_waiting_proc
=
0
;
unless
(
defined
$proc
)
{
mtr_error
("
wait_any failed
");
}
mtr_verbose
("
Got
"
.
join
("
,
",
keys
(
%
keep_waiting_proc
))
);
mtr_verbose
("
Got
$proc
"
);
mark_time_used
('
test
');
my
$expected_exit
=
1
;
foreach
$proc
(
keys
(
%
keep_waiting_proc
))
{
# ----------------------------------------------------
# Was it the test program that exited
# ----------------------------------------------------
...
...
@@ -4143,22 +4143,11 @@ sub run_testcase ($$) {
# Check if it was an expected crash
# ----------------------------------------------------
my
$check_crash
=
check_expected_crash_and_restart
(
$proc
);
if
(
$check_crash
==
0
)
# unexpected exit/crash of $proc
if
(
$check_crash
)
{
$expected_exit
=
0
;
last
;
}
elsif
(
$check_crash
==
1
)
# $proc was started again by check_expected_crash_and_restart()
{
delete
$keep_waiting_proc
{
$proc
};
}
elsif
(
$check_crash
==
2
)
# we must keep waiting
{
# do nothing
}
}
if
(
$expected_exit
)
{
# Keep waiting if it returned 2, if 1 don't wait or stop waiting.
$keep_waiting_proc
=
0
if
$check_crash
==
1
;
$keep_waiting_proc
=
$proc
if
$check_crash
==
2
;
next
;
}
...
...
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