the Compartmented Robust Posix C++ Unit Test system

Chapter 3. Problems

3.1. My test is killed by crpcut, what gives?

3.1.

My test is killed by crpcut, what gives?

A message like this, eh?


     FAILED: name_of_my_test
     phase="running"  --------------------------------------------------------------
     Timed out - killed

          

By default, tests are given 2s to complete. Your test consumed at least 3s. Most probably your code waits for something that doesn't happen, or is stuck in a no-progress loop (infinite, that is.)

If, however, your test legitimately needs more time than that, you can easily raise the limit. Just use the DEADLINE_REALTIME_MS(n) modifier and set a suitably long deadline.