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
84d455b4
Commit
84d455b4
authored
Oct 17, 2006
by
msvensson@shellback.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge shellback.(none):/home/msvensson/mysql/mysql-4.1-maint
into shellback.(none):/home/msvensson/mysql/mysql-5.0-maint
parents
ffc9538b
d45b61b1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
28 deletions
+28
-28
mysql-test/lib/mtr_report.pl
mysql-test/lib/mtr_report.pl
+1
-6
mysql-test/lib/mtr_timer.pl
mysql-test/lib/mtr_timer.pl
+14
-8
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+13
-14
No files found.
mysql-test/lib/mtr_report.pl
View file @
84d455b4
...
...
@@ -130,16 +130,11 @@ sub mtr_report_test_failed ($) {
my
$tinfo
=
shift
;
$tinfo
->
{'
result
'}
=
'
MTR_RES_FAILED
';
if
(
$tinfo
->
{'
timeout
'}
)
if
(
defined
$tinfo
->
{'
timeout
'}
)
{
print
"
[ fail ] timeout
\n
";
return
;
}
elsif
(
$tinfo
->
{'
ndb_test
'}
and
$::cluster
->
[
0
]
->
{'
installed_ok
'}
eq
"
NO
")
{
print
"
[ fail ] ndbcluster start failure
\n
";
return
;
}
else
{
print
"
[ fail ]
\n
";
...
...
mysql-test/lib/mtr_timer.pl
View file @
84d455b4
...
...
@@ -4,23 +4,22 @@
# and is part of the translation of the Bourne shell script with the
# same name.
use
Carp
qw(cluck)
;
use
Socket
;
use
Errno
;
use
strict
;
#use POSIX ":sys_wait_h";
use
POSIX
'
WNOHANG
';
#
use POSIX 'WNOHANG';
sub
mtr_init_timers
();
sub
mtr_timer_start
($$$);
sub
mtr_timer_stop
($$);
sub
mtr_timer_stop_all
($);
sub
mtr_timer_waitpid
($$$);
##############################################################################
#
# Initiate
a
structure shared by all timers
# Initiate
the
structure shared by all timers
#
##############################################################################
...
...
@@ -35,17 +34,19 @@ sub mtr_init_timers () {
# Start, stop and poll a timer
#
# As alarm() isn't portable to Windows, we use separate processes to
# implement timers. That is why there is a mtr_timer_waitpid(), as this
# is where we catch a timeout.
# implement timers.
#
##############################################################################
sub
mtr_timer_start
($$$)
{
my
(
$timers
,
$name
,
$duration
)
=
@_
;
mtr_verbose
("
mtr_timer_start:
$name
,
$duration
");
if
(
exists
$timers
->
{'
timers
'}
->
{
$name
}
)
{
# We have an old running timer, kill it
mtr_verbose
("
There is an old timer running
");
mtr_timer_stop
(
$timers
,
$name
);
}
...
...
@@ -57,7 +58,7 @@ sub mtr_timer_start($$$) {
{
if
(
$!
==
$!
{
EAGAIN
}
)
# See "perldoc Errno"
{
mtr_
debu
g
("
Got EAGAIN from fork(), sleep 1 second and redo
");
mtr_
warnin
g
("
Got EAGAIN from fork(), sleep 1 second and redo
");
sleep
(
1
);
redo
FORK
;
}
...
...
@@ -70,6 +71,7 @@ sub mtr_timer_start($$$) {
if
(
$tpid
)
{
# Parent, record the information
mtr_verbose
("
timer parent, record info(
$name
,
$tpid
,
$duration
)
");
$timers
->
{'
timers
'}
->
{
$name
}
->
{'
pid
'}
=
$tpid
;
$timers
->
{'
timers
'}
->
{
$name
}
->
{'
duration
'}
=
$duration
;
$timers
->
{'
pids
'}
->
{
$tpid
}
=
$name
;
...
...
@@ -85,6 +87,7 @@ sub mtr_timer_start($$$) {
$SIG
{
INT
}
=
'
DEFAULT
';
$0
=
"
mtr_timer(timers,
$name
,
$duration
)
";
mtr_verbose
("
timer child
$name
, sleep
$duration
");
sleep
(
$duration
);
exit
(
0
);
}
...
...
@@ -95,9 +98,12 @@ sub mtr_timer_start($$$) {
sub
mtr_timer_stop
($$)
{
my
(
$timers
,
$name
)
=
@_
;
mtr_verbose
("
mtr_timer_stop:
$name
");
if
(
exists
$timers
->
{'
timers
'}
->
{
$name
}
)
{
my
$tpid
=
$timers
->
{'
timers
'}
->
{
$name
}
->
{'
pid
'};
mtr_verbose
("
Stopping timer with pid
$tpid
");
# FIXME as Cygwin reuses pids fast, maybe check that is
# the expected process somehow?!
...
...
@@ -114,7 +120,7 @@ sub mtr_timer_stop ($$) {
}
else
{
mtr_
debug
("
Asked to stop timer
\"
$name
\"
not started
");
mtr_
error
("
Asked to stop timer
\"
$name
\"
not started
");
return
0
;
}
}
...
...
mysql-test/mysql-test-run.pl
View file @
84d455b4
...
...
@@ -391,6 +391,8 @@ sub main () {
my
(
$need_ndbcluster
,
$need_im
);
foreach
my
$test
(
@$tests
)
{
next
if
$test
->
{
skip
};
$need_ndbcluster
||=
$test
->
{
ndb_test
};
$need_im
||=
$test
->
{
component_id
}
eq
'
im
';
...
...
@@ -2753,10 +2755,9 @@ sub run_testcase_check_skip_test($)
# If test needs this cluster, check it was installed ok
if
(
!
$cluster
->
{'
installed_ok
'}
)
{
mtr_tofile
(
$path_timefile
,
"
Test marked as failed because
$cluster
->{'name'}
"
.
"
was not installed ok!
");
mtr_report_test_name
(
$tinfo
);
$tinfo
->
{
comment
}
=
"
Cluster
$cluster
->{'name'} was not installed ok
";
mtr_report_test_failed
(
$tinfo
);
return
1
;
}
...
...
@@ -2879,10 +2880,8 @@ sub run_testcase ($) {
# Can't restart a running server that may be in use
if
(
$glob_use_running_server
)
{
$tinfo
->
{'
skip
'}
=
1
;
$tinfo
->
{'
comment
'}
=
"
Can't restart a running server
";
mtr_report_test_name
(
$tinfo
);
$tinfo
->
{
comment
}
=
"
Can't restart a running server
";
mtr_report_test_skipped
(
$tinfo
);
return
;
}
...
...
@@ -2932,16 +2931,16 @@ sub run_testcase ($) {
$tinfo
->
{'
timeout
'}
=
1
;
# Mark as timeout
report_failure_and_restart
(
$tinfo
);
}
elsif
(
$res
==
1
)
{
# Test case failure reported by mysqltest
report_failure_and_restart
(
$tinfo
);
}
else
{
# Test case failed, if in control mysqltest returns 1
if
(
$res
!=
1
)
{
mtr_tofile
(
$path_timefile
,
"
mysqltest returned unexpected code
$res
,
"
.
"
it has probably crashed
");
}
# mysqltest failed, probably crashed
$tinfo
->
{
comment
}
=
"
mysqltest returned unexpected code
$res
, it has probably crashed
";
report_failure_and_restart
(
$tinfo
);
}
...
...
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