-
Notifications
You must be signed in to change notification settings - Fork 713
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add valgrind error check for mysqltest client
Summary: Currently, mysql-test-run.pl does not check mysqltest.log for valgrind errors. This fixes that by adding mysqltest.log to the list of files to check for valgrind errors. The current valgrind_exit_reports will only check the summary lines for leaks after server shutdown. This is okay for the mysqld processes, since we check at the end of every test case for valgrind errors. For mysqltest, we need report all valgrind errors that have occurred since no check is done. This also fixes the way valgrind errors are outputted. Unlike usual tests, the error output for valgrind_report failures occurs before test case line. This is because mysql-test-run will output valgrind errors to stdout as they are encountered. This is especially problematic in parallel runs, as multiple children processes are sharing the same stdout descriptor which means that some of the valgrind output may get interleaved. The fix here is instead of printing directly to stdout, we save the output to a .valgrind file. Then, the parent process will check and print these files at the end of the test run. That way, the valgrind output occurs after the test case line is printed, and since we're only outputting from a single process, we should get no interleaving output. Test Plan: Added a my_malloc (without corresponding my_free) to mysqltest.cc. Test fails with with --valgrind and --valgrind-mysqltest. Test passes with --valgrind-mysqld. arc diff --big-test-queue Reviewers: jtolmer Reviewed By: jtolmer Subscribers: webscalesql-eng Differential Revision: https://reviews.facebook.net/D49779
- Loading branch information
Showing
2 changed files
with
86 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters