Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • CMake CMake
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,813
    • Issues 3,813
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 7
    • Merge requests 7
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • CMake
  • CMakeCMake
  • Issues
  • #17167
Closed
Open
Created Aug 14, 2017 by dublet@dubletContributor

Misleading CTest WAITING message

We have a project that has a large number of tests. Some of them are marked with RUN_SERIAL.

Some of the normal tests take some time, leading to ctest printing out the ***** WAITING message.

However, when only the RUN_SERIAL tests are left, and it's still executing one of the "normal" tests, it will print out System Load: 1, Max Allowed Load: 9, Smallest test requires 8, if it's executed with -l 9 -j 8 for instance.

Now this is of course not quite correct. It's unable to launch any new tests because the remaining ones are RUN_SERIAL, not because the load is too high.

Looking at cmCTestMultiProcessHandler::StartNextTests(), when it does the check in if (allTestsFailedTestLoadCheck), the logic appears to need a further case, like so:

    bool OnlyRunSerialTestsLeft = ...;
    if (this->SerialTestRunning) {
      cmCTestLog(this->CTest, HANDLER_OUTPUT,
                 "Waiting for RUN_SERIAL test to finish.");
    } else if (OnlyRunSerialTestsLeft)  {
      cmCTestLog(this->CTest, HANDLER_OUTPUT,
                 "Waiting for tests to complete, so RUN_SERIAL test can start.");
    } else {
      /* clang-format off */
      cmCTestLog(this->CTest, HANDLER_OUTPUT,
                 "System Load: " << systemLoad << ", "
                 ...)

I'm not entirely sure how to determine this case, I guess it requires looping over all of the tests.

It makes the load balancing look broken when in fact it's working entirely as expected.

Thanks

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking