diff --git a/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/file_size.pass.cpp b/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/file_size.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/file_size.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/file_size.pass.cpp @@ -83,7 +83,9 @@ std::errc expected_err; } TestCases[] = { {env.create_dir("dir"), std::errc::is_a_directory}, +#ifndef _WIN32 {env.create_fifo("fifo"), std::errc::not_supported}, +#endif {env.create_directory_symlink("dir", "sym"), std::errc::is_a_directory}}; for (auto const& TC : TestCases) { diff --git a/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/file_type_obs.pass.cpp b/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/file_type_obs.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/file_type_obs.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/file_type_obs.pass.cpp @@ -65,9 +65,8 @@ scoped_test_env env; path f = env.create_file("foo", 42); path d = env.create_dir("dir"); - path fifo = env.create_fifo("fifo"); path hl = env.create_hardlink("foo", "hl"); - for (auto p : {hl, f, d, fifo}) { + auto test_path = [=](const path &p) { directory_entry e(p); file_status st = status(p); file_status sym_st = symlink_status(p); @@ -83,7 +82,14 @@ TEST_CHECK(e.is_regular_file() == is_regular_file(st)); TEST_CHECK(e.is_socket() == is_socket(st)); TEST_CHECK(e.is_symlink() == is_symlink(sym_st)); - } + }; + test_path(f); + test_path(d); + test_path(hl); +#ifndef _WIN32 + path fifo = env.create_fifo("fifo"); + test_path(fifo); +#endif } TEST_CASE(test_with_ec) { @@ -95,9 +101,8 @@ scoped_test_env env; path f = env.create_file("foo", 42); path d = env.create_dir("dir"); - path fifo = env.create_fifo("fifo"); path hl = env.create_hardlink("foo", "hl"); - for (auto p : {hl, f, d, fifo}) { + auto test_path = [=](const path &p) { directory_entry e(p); std::error_code status_ec = GetTestEC(); std::error_code sym_status_ec = GetTestEC(1); @@ -141,7 +146,14 @@ TEST_CHECK(e.is_symlink(ec) == is_symlink(sym_st)); TEST_CHECK(CheckEC(sym_status_ec)); - } + }; + test_path(f); + test_path(d); + test_path(hl); +#ifndef _WIN32 + path fifo = env.create_fifo("fifo"); + test_path(fifo); +#endif } TEST_CASE(test_with_ec_dne) { diff --git a/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/hard_link_count.pass.cpp b/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/hard_link_count.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/hard_link_count.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/hard_link_count.pass.cpp @@ -84,13 +84,10 @@ scoped_test_env env; const path dir = env.create_dir("dir"); const path dir2 = env.create_dir("dir/dir2"); - const path fifo = env.create_fifo("dir/fifo"); - const path sym_to_fifo = env.create_symlink("dir/fifo", "dir/sym"); const perms old_perms = status(dir).permissions(); - for (auto p : {dir2, fifo, sym_to_fifo}) { - permissions(dir, old_perms); + auto test_path = [=](const path &p) { std::error_code dummy_ec = GetTestEC(); directory_entry ent(p, dummy_ec); TEST_CHECK(!dummy_ec); @@ -103,7 +100,15 @@ TEST_CHECK(ent.hard_link_count(ec) == expect); TEST_CHECK(!ec); TEST_CHECK_NO_THROW(ent.hard_link_count()); - } + permissions(dir, old_perms); + }; + test_path(dir2); +#ifndef _WIN32 + const path fifo = env.create_fifo("dir/fifo"); + const path sym_to_fifo = env.create_symlink("dir/fifo", "dir/sym"); + test_path(fifo); + test_path(sym_to_fifo); +#endif } TEST_CASE(error_reporting) { diff --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy/copy.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy/copy.pass.cpp --- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy/copy.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy/copy.pass.cpp @@ -67,8 +67,10 @@ scoped_test_env env; const path file = env.create_file("file1", 42); const path dir = env.create_dir("dir"); +#ifndef _WIN32 const path fifo = env.create_fifo("fifo"); TEST_REQUIRE(is_other(fifo)); +#endif const auto test_ec = GetTestEC(); @@ -96,6 +98,7 @@ TEST_REQUIRE(ec != test_ec); TEST_CHECK(checkThrow(dir, file, ec)); } +#ifndef _WIN32 { // is_other(from) std::error_code ec = test_ec; fs::copy(fifo, dir, ec); @@ -110,6 +113,7 @@ TEST_REQUIRE(ec != test_ec); TEST_CHECK(checkThrow(file, fifo, ec)); } +#endif } TEST_CASE(from_is_symlink) diff --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_file/copy_file.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_file/copy_file.pass.cpp --- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_file/copy_file.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_file/copy_file.pass.cpp @@ -73,6 +73,7 @@ } } +#ifndef _WIN32 TEST_CASE(non_regular_file_test) { scoped_test_env env; const path fifo = env.create_fifo("fifo"); @@ -94,6 +95,7 @@ } } +#endif TEST_CASE(test_attributes_get_copied) { scoped_test_env env; diff --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.equivalent/equivalent.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.equivalent/equivalent.pass.cpp --- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.equivalent/equivalent.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.equivalent/equivalent.pass.cpp @@ -97,6 +97,7 @@ TEST_CHECK(equivalent(hl1, hl2)); } +#ifndef _WIN32 TEST_CASE(equivalent_is_other_succeeds) { scoped_test_env env; path const file = env.create_file("file", 42); @@ -109,5 +110,6 @@ TEST_CHECK(!equivalent(fifo1, fifo2)); TEST_CHECK(equivalent(fifo1, fifo1)); } +#endif TEST_SUITE_END() diff --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_empty/is_empty.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_empty/is_empty.pass.cpp --- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_empty/is_empty.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_empty/is_empty.pass.cpp @@ -95,6 +95,7 @@ } +#ifndef _WIN32 TEST_CASE(test_fifo_fails) { scoped_test_env env; @@ -107,5 +108,6 @@ TEST_CHECK_THROW(filesystem_error, is_empty(fifo)); } +#endif TEST_SUITE_END() diff --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.status/status.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.status/status.pass.cpp --- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.status/status.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.status/status.pass.cpp @@ -114,7 +114,9 @@ #if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(_WIN32) // No support for domain sockets {env.create_socket("socket"), file_type::socket}, #endif +#ifndef _WIN32 {env.create_fifo("fifo"), file_type::fifo} +#endif }; for (const auto& TC : cases) { // test non-throwing case diff --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.symlink_status/symlink_status.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.symlink_status/symlink_status.pass.cpp --- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.symlink_status/symlink_status.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.symlink_status/symlink_status.pass.cpp @@ -123,7 +123,9 @@ #if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(_WIN32) // No support for domain sockets {env.create_socket("socket"), file_type::socket}, #endif +#ifndef _WIN32 {env.create_fifo("fifo"), file_type::fifo} +#endif }; for (const auto& TC : cases) { // test non-throwing case