[PATCH] D55576: [libcxx] [test] [support] Use socket()+bind() to create unix sockets portably

Dimitry Andric via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Dec 16 07:42:16 PST 2018


dim added a comment.

In D55576#1332370 <https://reviews.llvm.org/D55576#1332370>, @mgorny wrote:

> @dim, thanks for the review. Should I also try removing the following restriction?
>
>   #if !defined(__APPLE__) && !defined(__FreeBSD__) // No support for domain sockets
>           {env.create_socket("socket"), file_type::socket},
>   #endif


Well, `test/support/filesystem_test_helper.hpp` also has this comment:

    // OS X and FreeBSD doesn't support socket files so we shouldn't even
    // allow tests to call this unguarded.
  #if !defined(__FreeBSD__) && !defined(__APPLE__)
      std::string create_socket(std::string file) {
          file = sanitize_path(std::move(file));
          fs_helper_run(fs_make_cmd("create_socket", file));
          return file;
      }
  #endif

but it looks like you now fixed it with this change to `filesystem_dynamic_test_helper.py`.  So I guess after this, it should be safe to remove the FreeBSD specific exception.  I don't know about macOS, though.


Repository:
  rCXX libc++

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55576/new/

https://reviews.llvm.org/D55576





More information about the cfe-commits mailing list