From 621e98a31b982ca32f288c2b7ff6388a33233bfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20Bl=C3=A5udd?= Date: Thu, 24 Sep 2009 16:09:11 +0200 Subject: [PATCH] Bug#47612 mtr - improving the report for valgrind erorrs - Improve the report produced when a valgrind error is detected --- mysql-test/include/check-warnings.test | 2 +- mysql-test/include/mtr_warnings.sql | 2 +- mysql-test/mysql-test-run.pl | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/mysql-test/include/check-warnings.test b/mysql-test/include/check-warnings.test index 5295dd51a85..da6b7a7e92e 100644 --- a/mysql-test/include/check-warnings.test +++ b/mysql-test/include/check-warnings.test @@ -57,5 +57,5 @@ if (`select @result = 0`){ skip OK; } --enable_query_log -echo ^ Found warnings!!; +echo ^ Found warnings in $log_error!!; exit; diff --git a/mysql-test/include/mtr_warnings.sql b/mysql-test/include/mtr_warnings.sql index b99402c8031..c14d84ef0c8 100644 --- a/mysql-test/include/mtr_warnings.sql +++ b/mysql-test/include/mtr_warnings.sql @@ -207,7 +207,7 @@ BEGIN WHERE suspicious=1; IF @num_warnings > 0 THEN - SELECT file_name, line + SELECT line FROM error_log WHERE suspicious=1; --SELECT * FROM test_suppressions; -- Return 2 -> check failed diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 2a6a069d81c..4260af75fd3 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -1307,6 +1307,9 @@ 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" ); + mtr_report("Running valgrind with options \"", join(" ", @valgrind_args), "\""); } @@ -3588,7 +3591,7 @@ sub extract_warning_lines ($) { # qr/^Error:|\[ERROR\]/, qr/^Warning:|mysqld: Warning/, qr/^Error:/, - qr/^==.* at 0x/, + qr/^==\d*==/, # valgrind errors qr/InnoDB: Warning|InnoDB: Error/, qr/^safe_mutex:|allocated at line/, qr/missing DBUG_RETURN/,