Skip to content
  1. Jan 16, 2019
  2. Jan 14, 2019
  3. Jan 11, 2019
  4. Jan 03, 2019
  5. Dec 25, 2018
  6. Dec 23, 2018
  7. Dec 07, 2018
  8. Dec 06, 2018
  9. Dec 04, 2018
  10. Dec 03, 2018
  11. Nov 26, 2018
  12. Nov 16, 2018
  13. Nov 10, 2018
    • Frediano Ziglio's avatar
      test-display-base: Avoid spurious errors due to listen failures · 34a44d3e
      Frediano Ziglio authored
      
      
      To set up a listening socket usually you call in sequence:
      - socket;
      - bind;
      - listen.
      If you try to bind() to a port when another socket is already
      listening on that port, the bind() will fail.
      However, it is possible that the bind() may succeed and the listen()
      will fail, as demonstrated in the following sequence:
      - socket() create socket 1;
      - bind() to port N on socket 1;
      - socket() create socket 2;
      - bind() to port N on socket 2;
      - listen() on socket 1;
      - listen() on socket 2 <-- failure.
      
      When running tests (especially multiple tests running in parallel), it
      may sometimes happen that there are other tests already listening on
      the port that we are trying to use. In this case, we want to ignore
      this error and simply try to listen on a different port. We already
      attempted to handle this scenario, but we were only ignoring bind()
      errors and not listen() errors. So in the scenario mentioned above,
      the listen() error was causing the entire test to fail instead of
      allowing us to try to listen on another port.
      
      Signed-off-by: default avatarFrediano Ziglio <fziglio@redhat.com>
      Acked-by: default avatarJonathon Jongsma <jjongsma@redhat.com>
      34a44d3e
  14. Nov 08, 2018
Loading