[MDEV-30344] MTR tests fail when built without WSREP Created: 2023-01-05 Updated: 2023-01-06 Resolved: 2023-01-06 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Packaging, Tests |
| Affects Version/s: | None |
| Fix Version/s: | 10.11.2, 11.0.1, 10.5.19, 10.6.12, 10.7.8, 10.8.7, 10.9.5, 10.10.3 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Robin Newhouse | Assignee: | Daniel Black |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
When building with -DWITH_WSREP=OFF, files required for MTR tests are excluded and several tests fail. This is cause by a recent commit 7b44d0ba which attempted to solve Failures can be seen in GitLab CI, or by building/installing/testing in the fedora:latest Docker container with the -DWITH_WSREP=OFF CMake flag enabled. It appears this issue happened before (see !2196 and Perhaps there should be a CI build with WSREP/Galera disabled to catch this mistake sooner. |
| Comments |
| Comment by Robin Newhouse [ 2023-01-05 ] | |||||||||||||
|
I suggest the following change in the CMake install macros which will avoid excluding the MTR test .inc files. This fixes the (relevant) failing tests. I'll make a PR if this change is appropriate.
| |||||||||||||
| Comment by Daniel Lenski [ 2023-01-05 ] | |||||||||||||
Specifically, it is this specific change which causes the failure, right robinnew?
Agreed. | |||||||||||||
| Comment by Robin Newhouse [ 2023-01-05 ] | |||||||||||||
@dlenski Correct | |||||||||||||
| Comment by Daniel Black [ 2023-01-05 ] | |||||||||||||
|
Robin, I think you patch is right for the fault observed in gitlab, please do a PR. Daniel, there might be different problem here. wsrep includes in sql/*.h (for non-wsrep files are):
So remove EXCL_WSREP parts of include/CMakeLists.txt for wsrep.h to be there. and in sql/CMakeList -
maybe? to keep the wsrep_on.h, which happens to be the only wsrep_o*.h file. On CI, seems to be getting more common so a build at least so probably soon. Do you know of a test that links against the server headers? Happy to take this as one or two PRs, whatever is easiest. | |||||||||||||
| Comment by Robin Newhouse [ 2023-01-05 ] | |||||||||||||
|
Thanks Daniel. PR created here: https://github.com/MariaDB/server/pull/2411 | |||||||||||||
| Comment by Chris Ross [ 2023-01-05 ] | |||||||||||||
|
I have no issues with the change if it's right. I'm not sure what the MTR tests are, and why they need the wsrep/galera includes if wsrep isn't to be used. Shouldn't the tests instead be changed to not use need them when building without WSREP, similar to what was done to fix | |||||||||||||
| Comment by Daniel Lenski [ 2023-01-05 ] | |||||||||||||
|
cross wrote:
Yes, agreed. If tests aren't actually using Galera/WSREP (and clearly if they're passing when it's not built… they're not | |||||||||||||
| Comment by Daniel Black [ 2023-01-05 ] | |||||||||||||
|
The test Robin tripped on Gitlab was missing include/wait_wsrep_ready.inc called from ./include/start_mysqld.inc (more widely used on many tests that restart the server) which has inbuilt tests which detects galera missing, which results in it being largely a no-op, but mtr can't tell that unless the file is there. Both wsrep.h and wsrep_on.h contain no-op macros needed in the without wsrep case. so hence https://github.com/MariaDB/server/pull/2417 which adds the two files to the Devel package. Thanks dlenski | |||||||||||||
| Comment by Chris Ross [ 2023-01-05 ] | |||||||||||||
|
Okay. Just wanted to make sure the earlier removal of that one pattern from `INSTALL_MYSQL_TEST`s `EXCL_GALERA` was still correct. | |||||||||||||
| Comment by Daniel Black [ 2023-01-06 ] | |||||||||||||
|
Yes. Resulting wsrep files (including both PRs) is per https://github.com/MariaDB/server/pull/2417#issue-1521525371. Two or three files might be excess to absolute minimal requirements but its better than going too far. |