[all-commits] [llvm/llvm-project] 1b988f: [test] Use either `127.0.0.1` or `[::1]` to run in...

Jordan Rupprecht via All-commits all-commits at lists.llvm.org
Fri Sep 9 14:09:26 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1b988ff092a0a713f0bb4712bfe6cb5ba85b725c
      https://github.com/llvm/llvm-project/commit/1b988ff092a0a713f0bb4712bfe6cb5ba85b725c
  Author: Jordan Rupprecht <rupprecht at google.com>
  Date:   2022-09-09 (Fri, 09 Sep 2022)

  Changed paths:
    M lldb/unittests/TestingSupport/Host/SocketTestUtilities.cpp
    M lldb/unittests/TestingSupport/Host/SocketTestUtilities.h
    M lldb/unittests/tools/lldb-server/tests/CMakeLists.txt
    M lldb/unittests/tools/lldb-server/tests/TestClient.cpp

  Log Message:
  -----------
  [test] Use either `127.0.0.1` or `[::1]` to run in ipv6-only environments.

Test for both IPv4 and IPv6 support to determine if either `127.0.0.1` or `[::1]` are appropriate IP addresses to attempt to connect to. In an IPv6-only environment, `127.0.0.1` is not available.

Using `localhost` is problematic because we might not be able to get the same port on each IP flavor, and later try to connect to the wrong thing.

Reviewed By: labath

Differential Revision: https://reviews.llvm.org/D133393




More information about the All-commits mailing list