llvm-project/libcxx/test/support
Martin Storsjö c5a74c0890 [libcxx] [test] Simplify get_temp_file_name() for mingw
Use the same codepaths as for MSVC. Mingw-w64 does have the _mktemp_s
function; on Vista and newer, msvcrt.dll does contain the function,
which ends up called. (Same thing in the UCRT.) In older versions of
msvcrt.dll (older than what libc++ supports), mingw-w64 provides a
fallback implementation.

This effectively reverts 23323e25f8 (and
d07e5c23b4). That commit tried to fix
unspecified MinGW build breakage.

This reduces the risk of temp name collisions between processes (when
running multiple tests in parallel); the path returned by
GetTempFileName can easily collide with other similar paths.
(_mktemp_s on the other hand tries to avoid such clashes by using
the process id as part of the uniqueness seed.)

This avoids stray random failures in fstreams tests in mingw configurations.

Differential Revision: https://reviews.llvm.org/D98526
2021-09-08 10:24:34 +03:00
..
test.support [libc++] s/_LIBCPP_NO_HAS_CHAR8_T/_LIBCPP_HAS_NO_CHAR8_T/g 2021-04-21 12:49:07 -04:00
test.workarounds [libc++] Remove the c++98 Lit feature from the test suite 2020-06-03 09:37:22 -04:00
type_classification [libcxx][nfc] Global `constexpr friend` -> `friend constexpr`. 2021-07-23 09:08:50 -07:00
Counter.h
DefaultOnly.h [libc++] NFC: Normalize `#endif //` comment indentation 2021-04-20 12:03:32 -04:00
MoveOnly.h [libc++] NFC: Normalize `#endif //` comment indentation 2021-04-20 12:03:32 -04:00
allocators.h [libc++] NFC: Normalize `#endif //` comment indentation 2021-04-20 12:03:32 -04:00
any_helpers.h [libc++][NFC] Remove uses of 'using namespace std;' in the test suite 2021-09-03 13:15:10 -04:00
archetypes.h
archetypes.ipp
asan_testing.h [libc++] NFC: Normalize `#endif //` comment indentation 2021-04-20 12:03:32 -04:00
atomic_helpers.h [libc++] [test] Add a missing `()` in TestEachIntegralType. 2021-07-13 15:57:43 -04:00
callable_types.h [libc++] Add bind_front function (P0356R5). 2021-03-02 16:18:06 -08:00
charconv_test_helpers.h [libc++] Fixes std::to_chars for bases != 10. 2021-04-29 19:56:28 +02:00
cmpxchg_loop.h Update atomic feature macros, synopsis, signatures to match C++20. Improve test coverage for non-lock-free atomics. 2020-09-09 10:00:09 -07:00
compare_types.h [libc++] Remove random [[nodiscard]] in the test suite 2021-07-12 12:45:21 -04:00
constexpr_char_traits.h
container_debug_tests.h [libc++] Remove signal-based checkpoints in libc++ tests 2020-10-14 10:38:32 -04:00
container_test_types.h [libc++] s/insertible/insertable/g. NFCI. 2020-12-14 09:54:58 -05:00
controlled_allocators.h
coroutine_types.h [libcxx tests] Clang is more strict now about coroutines 2020-06-23 06:51:35 -04:00
count_new.h [libcxx] [test] Suppress MSVC++ warning 4640 under /Zc:threadSafeInit- 2020-02-22 06:57:37 -08:00
counting_predicates.h
debug_macros.h [libcxx][test] Attempt to make debug mode tests more bulletproof 2021-05-18 14:52:34 +02:00
debug_mode_helper.h [libc++] NFC: Fix several GCC warnings in the test suite 2020-10-30 12:48:05 -04:00
deleter_types.h [libc++] NFC: Normalize `#endif //` comment indentation 2021-04-20 12:03:32 -04:00
disable_missing_braces_warning.h
emplace_constructible.h [libc++] Make some testing utilities constexpr 2020-09-02 10:05:44 -04:00
experimental_any_helpers.h [libc++] Fix failures when running the test suite without RTTI 2020-09-21 20:17:24 -04:00
external_threads.cpp
filesystem_include.h
filesystem_test_helper.h [libcxx] [test] Fix fs.op.last_write_time for Windows 2021-05-12 22:23:01 +03:00
format_string.h
fp_compare.h
hexfloat.h
indirectly_readable.h [libc++] Add all indirect callable concepts and projected 2021-05-28 10:10:44 -04:00
is_transparent.h [libc++] NFC: Normalize `#endif //` comment indentation 2021-04-20 12:03:32 -04:00
iterator_traits_cpp17_iterators.h [libcxx] makes `iterator_traits` C++20-aware 2021-04-20 11:30:08 -04:00
make_implicit.h [libc++] [P0935] [C++20] Eradicating unnecessarily explicit default constructors from the standard library. 2021-01-19 08:22:06 +01:00
make_string.h [libc++] Improve make_string test support. 2021-05-14 17:42:17 +02:00
make_test_thread.h [libc++] Introduce an indirection to create threads in the test suite 2020-11-27 11:54:19 -05:00
min_allocator.h [libc++] [test] Update "test_compare.h" users to avoid removed-in-C++20 members. NFCI. 2021-05-29 16:54:24 -04:00
msvc_stdlib_force_include.h [libcxx] [test] Avoid conflicting definitions of _CRT_SECURE_NO_WARNINGS 2020-10-20 19:44:21 +03:00
nasty_containers.h [libc++] [test] Constexpr-ify a couple of insert-iterator tests. 2021-05-28 15:15:50 -04:00
nasty_macros.h [libc++][nfc] Add more nasty macros. 2021-06-03 18:22:52 +02:00
parse_integer.h [libc++] NFC: Normalize `#endif //` comment indentation 2021-04-20 12:03:32 -04:00
platform_support.h [libcxx] [test] Simplify get_temp_file_name() for mingw 2021-09-08 10:24:34 +03:00
pointer_comparison_test_helper.h [libcxx][nfc] Add license to `pointer_comparison_test_helper.h` 2021-04-23 12:37:47 -07:00
poisoned_hash_helper.h [libcxx][type_traits] remove `std::is_literal_type` and `std::result_of` for C++20 2021-07-02 17:10:19 +00:00
private_constructor.h [libc++] Remove unnecessary usage of <iostream> in the test suite 2020-10-02 13:00:34 -04:00
propagate_const_helpers.h
propagate_value_category.hpp [libc++] Fix tuple assignment from types derived from a tuple-like 2021-02-22 14:52:18 -05:00
rapid-cxx-test.h
read_write.h [libc++] Re-apply `std::indirectly_readable` and `std::indirectly_writable` 2021-04-22 11:24:04 -04:00
set_windows_crt_report_mode.h
template_cost_testing.h
test_allocator.h [libc++] NFC: Normalize `#endif //` comment indentation 2021-04-20 12:03:32 -04:00
test_basic_format_arg.h [libc++][format] Add __format_arg_store. 2021-09-01 19:45:02 +02:00
test_comparisons.h
test_constexpr_container.h [libc++] [P1032] Misc constexpr bits in <iterator>, <string_view>, <tuple>, <utility>. 2021-03-25 10:34:35 -04:00
test_convertible.h
test_format_context.h [libc++][format] Add __format_arg_store. 2021-09-01 19:45:02 +02:00
test_iterators.h [libcxx][ranges] Add `ranges::join_view`. 2021-08-13 11:31:08 -07:00
test_macros.h [libc++] Assume that compilers support extended constexpr in C++14 mode 2021-08-25 08:41:07 -04:00
test_memory_resource.h
test_range.h [libc++][NFC] Remove unused helper function in the test suite 2021-08-27 11:47:33 -04:00
test_standard_function.h [libc++] Workaround failures with modules on Clang ToT 2021-07-08 11:50:54 -04:00
test_transparent_unordered.h [libc++] Implement P0919R3: heterogenous lookup for unordered containers 2020-11-11 17:44:42 -05:00
test_workarounds.h [libc++] Remove more test-suite workarounds for unsupported GCC versions 2021-08-20 13:26:43 -04:00
tracked_value.h
truncate_fp.h
type_id.h [libc++][test] MSVC has no __PRETTY_FUNCTION__ 2020-10-19 17:20:47 -07:00
unique_ptr_test_helper.h [libc++] NFC: Fix several GCC warnings in the test suite 2020-10-30 12:48:05 -04:00
user_defined_integral.h
uses_alloc_types.h
variant_test_helpers.h [libc++] Implement P0655R1 visit<R>: Explicit Return Type for visit 2021-01-25 11:14:45 -05:00