Randomize the Unix socket name in AsyncSocketTest.SendMessageAncillaryData test to...
authorMaxim Georgiev <maxgeorg@fb.com>
Thu, 23 Mar 2017 17:31:34 +0000 (10:31 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Thu, 23 Mar 2017 17:36:38 +0000 (10:36 -0700)
commit873d451128cf4aee2b8a7b7c460e24ed8e42c334
tree83e2f7536841fddcff95c85b81f7c7588039abcf
parent18f713a62244d4ad4606a3de9bc74a85ce5b8a5c
Randomize the Unix socket name in AsyncSocketTest.SendMessageAncillaryData test to avoid collisions.

Summary:
Our test framework reports frequent failures of AsyncSocketTest.SendMessageAncillaryData. According to the logs the socket fails to bind:

    folly/io/async/test/AsyncSocketTest2.cpp:3098: Failure
    Expected: (bind(lfd, (struct sockaddr*)&addr, sizeof(addr))) != (-1), actual: -1 vs -1
    Bind failed: 98

This diff adds the socket name randomization to avoid name collisions between tests running concurrently on the same test box.

Reviewed By: yfeldblum

Differential Revision: D4758942

fbshipit-source-id: 6066dbc18222a4521c40b2ff218cb7dab8bd789d
folly/io/async/test/AsyncSocketTest2.cpp