[MDEV-27148] running multiple instances of mtr with different var directories can cause .reject and generated from .rdiff .result files overwriting Created: 2021-12-01 Updated: 2023-04-27 |
|
| Status: | Stalled |
| Project: | MariaDB Server |
| Component/s: | Tests |
| Affects Version/s: | 10.2, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8 |
| Fix Version/s: | 10.4, 10.5, 10.6 |
| Type: | Bug | Priority: | Major |
| Reporter: | Vladislav Lesin | Assignee: | Vladislav Lesin |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
mysqltest writes .reject file to the same location as .result file. It can confuse when we start several instances of mtr with different var directories, and all those instances write to the same .reject file, or when we use different build directories to test binaries built with different options. |
| Comments |
| Comment by Sergei Golubchik [ 2022-01-12 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
f1b35c7f3eb0 is ok to push, presuming you've tested it and verified that mtr can still find the reject file and prints diffs of failed tests just the same. And that tests with the same name in different suites do not overwrite each others' rejects. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Vladislav Lesin [ 2022-02-11 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I have updated the branch, pushed also the fix for tmp directory to avoid generated from .rdiff .result files overwriting. The following is code research for the case with the same test names in different suites. As we can see from
.reject file name is formed from opt_logdir and result_file_name. Both are passed to mysqltest from mysql-test-run.pl. The arguments for mysqltest are formed here:
is formed here:
As we can see the "result_name" contains suite name. So the fix for .reject files is safe for the case of the same test names in different suites. If .rdiff file extension is found, the .result file is generated to the following location:
i.e. $dest contains suite name too: my $dest = "$base_file$suites.result~"; In the case of several workers, $opt_tmpdir is for formed as following:
That is why tmp dirs of different workers must not intersect. So the fix for .rdiff files as also safe for the case of the same test name in different suites. |