Description:
As per the documentation there are 2 methods to run unit tests (https://dev.mysql.com/doc/mysqltest/2.0/en/unit-tests-google-test.html), make test-unit and ctest. These 2 methods seem to be running different set of tests
1. ctest -
100% tests passed, 0 tests failed out of 65
Total Test time (real) = 25.23 sec
2. make test-unit
Test Summary Report
-------------------
storage/perfschema/unittest/pfs-t (Wstat: 0 Tests: 328 Failed: 96)
Failed tests: 233-328
Parse errors: Bad plan. You planned 232 tests but ran 328.
storage/perfschema/unittest/pfs_host-oom-t (Wstat: 0 Tests: 7 Failed: 1)
Failed test: 7
Parse errors: Bad plan. You planned 6 tests but ran 7.
storage/perfschema/unittest/pfs_user-oom-t (Wstat: 0 Tests: 7 Failed: 1)
Failed test: 7
Parse errors: Bad plan. You planned 6 tests but ran 7.
Files=23, Tests=2557, 23 wallclock secs ( 0.33 usr 0.02 sys + 40.93 cusr 2.44 csys = 43.72 CPU)
Result: FAIL
As you can seen from the summary above number of tests run with each of these methods is different. make test-unit seems to run more tests and could be a superset of ctest.
How to repeat:
Run commands ctest and make test-unit
Suggested fix:
Two methods for running unit tests is confusing. Deprecate one of the methods and fix the one that is retained to run all tests.