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
f0831228
Commit
f0831228
authored
Nov 12, 2009
by
Bjorn Munch
Browse files
Options
Browse Files
Download
Plain Diff
merge 43418
parents
5b406b68
d1daf074
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
76 additions
and
3 deletions
+76
-3
mysql-test/include/mtr_warnings.sql
mysql-test/include/mtr_warnings.sql
+8
-0
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+68
-3
No files found.
mysql-test/include/mtr_warnings.sql
View file @
f0831228
...
...
@@ -186,6 +186,14 @@ INSERT INTO global_suppressions VALUES
(
": The MySQL server is running with the --secure-backup-file-priv option so it cannot execute this statement"
),
(
"Slave: Unknown table 't1' Error_code: 1051"
),
/* Messages from valgrind */
(
"==[0-9]*== Memcheck,"
),
(
"==[0-9]*== Copyright"
),
(
"==[0-9]*== Using"
),
(
"==[0-9]*== For more details"
),
/* This comes with innodb plugin tests */
(
"==[0-9]*== Warning: set address range perms: large range .* .defined."
),
(
"THE_LAST_SUPPRESSION"
)
||
...
...
mysql-test/mysql-test-run.pl
View file @
f0831228
...
...
@@ -226,6 +226,7 @@ my @default_valgrind_args= ("--show-reachable=yes");
my
@valgrind_args
;
my
$opt_valgrind_path
;
my
$opt_callgrind
;
my
%
mysqld_logs
;
my
$opt_debug_sync_timeout
=
300
;
# Default timeout for WAIT_FOR actions.
our
$opt_warnings
=
1
;
...
...
@@ -741,6 +742,9 @@ sub run_worker ($) {
elsif
(
$line
eq
'
BYE
'){
mtr_report
("
Server said BYE
");
stop_all_servers
(
$opt_shutdown_timeout
);
if
(
$opt_valgrind_mysqld
)
{
valgrind_exit_reports
();
}
exit
(
0
);
}
else
{
...
...
@@ -1339,8 +1343,7 @@ sub command_line_setup {
push
(
@valgrind_args
,
@default_valgrind_args
)
unless
@valgrind_args
;
# Make valgrind run in quiet mode so it only print errors
push
(
@valgrind_args
,
"
--quiet
"
);
# Don't add --quiet; you will loose the summary reports.
mtr_report
("
Running valgrind with options
\"
",
join
("
",
@valgrind_args
),
"
\"
");
...
...
@@ -3697,7 +3700,7 @@ sub extract_warning_lines ($$) {
(
qr/^Warning:|mysqld: Warning|\[Warning\]/
,
qr/^Error:|\[ERROR\]/
,
qr/^==\d
*==
/
,
# valgrind errors
qr/^==\d
+==\s+\S
/
,
# valgrind errors
qr/InnoDB: Warning|InnoDB: Error/
,
qr/^safe_mutex:|allocated at line/
,
qr/missing DBUG_RETURN/
,
...
...
@@ -4303,6 +4306,8 @@ sub mysqld_start ($$) {
# see the exact location where valgrind complains
$output
=
"
$opt_vardir
/log/
"
.
$mysqld
->
name
()
.
"
.trace
";
}
# Remember this log file for valgrind error report search
$mysqld_logs
{
$output
}
=
1
if
$opt_valgrind
;
if
(
defined
$exe
)
{
...
...
@@ -5155,6 +5160,66 @@ sub valgrind_arguments {
}
}
#
# Search server logs for valgrind reports printed at mysqld termination
#
sub
valgrind_exit_reports
()
{
foreach
my
$log_file
(
keys
%
mysqld_logs
)
{
my
@culprits
=
();
my
$valgrind_rep
=
"";
my
$found_report
=
0
;
my
$err_in_report
=
0
;
my
$LOGF
=
IO::
File
->
new
(
$log_file
)
or
mtr_error
("
Could not open file '
$log_file
' for reading: $!
");
while
(
my
$line
=
<
$LOGF
>
)
{
if
(
$line
=~
/^CURRENT_TEST: (.+)$/
)
{
my
$testname
=
$1
;
# If we have a report, report it if needed and start new list of tests
if
(
$found_report
)
{
if
(
$err_in_report
)
{
mtr_print
("
Valgrind report from
$log_file
after tests:
\n
",
@culprits
);
mtr_print_line
();
print
("
$valgrind_rep
\n
");
$err_in_report
=
0
;
}
# Make ready to collect new report
@culprits
=
();
$found_report
=
0
;
$valgrind_rep
=
"";
}
push
(
@culprits
,
$testname
);
next
;
}
# This line marks the start of a valgrind report
$found_report
=
1
if
$line
=~
/ERROR SUMMARY:/
;
if
(
$found_report
)
{
$line
=~
s/^==\d+== //
;
$valgrind_rep
.=
$line
;
$err_in_report
=
1
if
$line
=~
/ERROR SUMMARY: [1-9]/
;
$err_in_report
=
1
if
$line
=~
/definitely lost: [1-9]/
;
$err_in_report
=
1
if
$line
=~
/possibly lost: [1-9]/
;
}
}
$LOGF
=
undef
;
if
(
$err_in_report
)
{
mtr_print
("
Valgrind report from
$log_file
after tests:
\n
",
@culprits
);
mtr_print_line
();
print
("
$valgrind_rep
\n
");
}
}
}
#
# Usage
...
...
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