Skip to content
  • Michal 'vorner' Vaner's avatar
    Fix stats tests after merge of #2582 · 32973fce
    Michal 'vorner' Vaner authored
    The problem was, msgq started to open more file descriptors than before.
    Also, the changes meant the tests didn't shut down their internal copy
    of msgq properly, leaking more file descriptors.
    
    * Do the shutdown correctly.
    * Wait for msgq to terminate, so there are no race conditions between
      the old (shutting down one) and a new one for another test.
    * Close all the data sockets in msgq, to prevent further leaks. The
      other ends probably still leak, but at least the threads on the other
      ends terminate on EOF, so we don't leak the threads too.
    * Wait for the other threads too, so we don't spawn too many threads.
    * Unrelated cleanup: remove unneeded output-suppression workaround from
      the tests, it is no longer needed.
    * Unrelated cleanup: Initialize testing logger for the tests. But it
      still logs for no apparent reason, needs to be examined.
    32973fce