[MDEV-10294] add options for other valgrind tools in MTR Created: 2016-06-28 Updated: 2020-12-08 Resolved: 2016-07-21 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Tests |
| Fix Version/s: | 10.1.17 |
| Type: | Task | Priority: | Major |
| Reporter: | Daniel Black | Assignee: | Daniel Black |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | contribution, foundation, patch, tests | ||
| Description |
|
Using other valgrind tools in MTR is a little difficult as the MTR ties the tool to memcheck or calllgrind. https://github.com/MariaDB/server/pull/194 provides a valgrind-tool option for easy selection. MTR_TEST_NAME is also exported for recording results per test run (using a custom --valgrind-path= wrapper script). |
| Comments |
| Comment by Elena Stepanova [ 2016-07-06 ] |
|
Hi Daniel, I see a few problems here. First of all, MTR already has "--valgrind-option" to pass parameters to valgrind, and "--tool" can be one of them. Wouldn't it be better to parse the array properly to check whether the tool was set? The new option introduces an alternative way to do the same thing, which means they can set different tools at the same time, which is just confusing. Further, the new option cannot be used by itself now, it still requires something in "--valgrind-option", because otherwise MTR adds "--show-reachable", which does not work with anything but memcheck. At the very least show-reachable should be moved from default_valgrind_args to the block where other options for memcheck are set. Finally, if we decide to do this, the callgrind logic needs to be cleaned up. It does not work anyway, as it sets the option --base=xxx which was apparently removed from valgrind years ago; and in a different place of the script it also sets trace-children, only for callgrind. Why is it so, probably nobody remembers. My suggestion is instead I have no objections against exporting MTR_TEST_NAME if it's anyhow useful. I expect the use will be limited, since in a general case the server is not restarted between separate test runs, so updated values can only be picked up by the wrapper if mysqltest itself is run under valgrind. But maybe it will become handy for some other purposes. |
| Comment by Elena Stepanova [ 2016-07-21 ] |
|
Merged into 10.1 tree as https://github.com/MariaDB/server/commit/e6a64e8f0ea36f12bd24ba906aa1f4e2e367a8e0 |