Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

llvm-project Mega-Update #4263

Merged
merged 45 commits into from
Dec 15, 2023
Merged

Conversation

StephanTLavavej
Copy link
Member

@StephanTLavavej StephanTLavavej commented Dec 15, 2023

Overview

This updates our llvm-project submodule for the first time in almost a year (previously #3344 on 2023-01-21).

This revealed a lot of issues in our product code, most of which have been fixed by separate PRs that have landed in main so this PR can focus on updating the test suite. This also revealed a lot of issues in libc++'s tests (and a few in libc++'s product code!), most of which have been fixed upstream. See below for lists of commits in both repos, and thanks to everyone who's helped with this project!

Overall, I've tried to fix as many tests as possible, and partially analyze the remaining failures to make future fixes easier.

Commits

When I talk about "skips", I'm usually referring to FAIL lines. I explicitly mention SKIPPED when I mean that.

  • Update llvm-project main.
    • As has been the case for quite some time (including the entire history of the microsoft/STL GitHub repo), we're directly using the upstream sources, not a mutant branch or fork.
  • Add substitutions.
    • Upstream changes to LLVM lit require us to add these lines to lit.site.cfg.in for all of our test suites, otherwise they will completely fail to run.
  • Because we have separate implementations of some upstream functionality, after my [libc++][test] ADDITIONAL_COMPILE_FLAGS should be a space-separated list llvm/llvm-project#73541 we need to use ParserKind.SPACE_LIST here.
  • Add has-64-bit-atomics to DEFAULT_FEATURES as we always support std::atomic_uint64_t.
  • float_h.pass.cpp was renamed to float_h.compile.pass.cpp by llvm/llvm-project@dafeb97.
  • Remove skips for "unexpectedly passed" tests, plus tests that have been deleted or moved out of std.
    • I'm preserving the "ASAN runtime warns about an overlarge allocation" section as we'll need to fill it with other tests.
    • The tests in the ADDITIONAL_COMPILE_FLAGS and _Array_iterator sections have either been fixed upstream or are affected by different issues now.
  • Some tests now pass for one compiler but not the other.
  • default_initializable.compile.pass.cpp now fails for both compilers for the same reason.
  • Reported [libc++][test] Should avoid preprocessor directives in macro argument lists llvm/llvm-project#73836.
  • Reported [libc++][test] Streaming out floating-point sys_time and local_time is bogus llvm/llvm-project#73849.
  • Reported [libc++][test] nasty_char_traits::move is incompatible with constexpr llvm/llvm-project#74221.
  • Reported [libc++][test] overload_compare_iterator doesn't support its claimed iterator_category llvm/llvm-project#74756.
  • Skip tests for missing features in MSVC's STL.
  • Skip a feature-test macro test for a feature that libc++ hasn't implemented.
  • Skip tests that inherently involve missing MSVC compiler features.
  • Skip tests that are affected by C1XX compiler bugs.
  • Skip tests that are affected by UCRT bugs.
  • Skip tests that are affected by STL bugs.
  • Skip tests that are affected by VCRuntime bugs.
  • Skip tests for likely STL bugs.
  • Skip the Standard Library Modules tests which would need special machinery.
  • Skip tests affected by the ASAN new_handler bugs.
  • Skip tests that haven't been fully analyzed.
  • Cleanup: Partially analyze the skipped CTAD tests.
  • Cleanup: Pre-existing duplication.
    • [libc++] P2602R2 Poison Pills are Too Toxic llvm/llvm-project#74534 was recently opened, so I'm discarding its entries that are duplicated for WG21-P2278R4 "cbegin should always return a constant iterator".
    • I'm discarding the entries for DevCom-1638496 "C1XX doesn't properly reject int <=> unsigned" that are duplicated for DevCom-1626139 "compile-time NaN comparison", as I consider the former to be more likely to be fixed soon.
    • range.join.view/end.pass.cpp and range.join.view/sentinel/eq.pass.cpp were listed under "libc++ doesn't implement P2770R0" as FAIL for all configurations.
  • Cleanup: Move version.version.compile.pass.cpp to the "known upstream" section and explain why.
    • generate_feature_test_macro_components.py works fine now.
  • Cleanup: variant's operator<=> is missing a requires-clause llvm/llvm-project#58192 was fixed on 2022-10-17.
    • This test is now blocked by -Wundefined-inline for Clang. I added :2 because it's blocked by DevCom-1626139 "compile-time NaN comparison" for MSVC.
  • Cleanup: libc++ implemented WG21-P2505R5 "Monadic Functions for std::expected", now we're missing WG21-P2833R2 "Freestanding Library: inout expected span".
  • Cleanup: libc++ implemented WG21-P2273R3 "constexpr unique_ptr", but this is still blocked by other macros including __cpp_lib_ranges.
  • Cleanup: Move the filesystem tests from "upstream likely won't fix" to "not analyzed".
    • Notes:
      • Task VSO-593630 "<filesystem> Enable libcxx filesystem tests" was cut. We don't care about that tracking issue - expected_results.txt is the source of truth for todos.
      • rapid-cxx-test.hpp no longer exists with any extension.
      • The error "STATIC TESTS DISABLED" no longer exists anywhere.
      • string/wstring assumptions no longer appear to be an issue.
    • I'm changing SKIPPED to FAIL, so we'll notice if anything starts passing.
    • I'm also consolidating fs.op.remove_all/toctou.pass.cpp which was in a "not analyzed" section. (Given the name, that's likely the issue that we consider to be by design according to the Standard's lack of guarantees regarding filesystem races.)
  • Cleanup: Consolidate "Too many constexpr operations" from the "known upstream" section to the "not analyzed" section.
  • Cleanup: ranges_partial_sort_copy.pass.cpp was marked as FAIL for all compilers above.
    • In the section for WG21-P2404R3: "Move-Only Types For Comparison Concepts".
  • Cleanup: Move from "not analyzed" to "missing STL features", WG21-P0533R9 constexpr For <cmath> And <cstdlib>.
  • Cleanup: Partially analyze test failures.
    • "Not analyzed" isn't totally accurate anymore.
  • Cleanup: Consolidate sections.
  • Cleanup: List libc++ missing features contiguously and sort them.
  • Cleanup: Add VSO bug numbers and sort.
  • Cleanup: Sort STL bugs.
  • Update skips after [libc++] P2770R0: "Stashing stashing iterators for proper flattening" llvm/llvm-project#66033 partially implemented WG21-P2770R0.
    • std/ranges/range.adaptors/range.join.view was renamed. I've added partially analyzed skips for the new paths, so we can simply drop the old paths.
  • Use SKIPPED for // XFAIL: msvc tests that compile for ARM and ARM64.
    • This adds a lengthy comment explaining my current understanding of what's happening, although I could be wrong.
  • I had to undo an attempted change and go back to using SKIPPED for the big group of filesystem tests. I'm adding a comment that these tests are SKIPPED due to unknown differences between local test runs (where they fail normally) and Azure Pipelines (where they fail mysteriously in a way that FAIL doesn't handle, and that doesn't result in usable test logs.)
  • Fix MSVC-internal failures.
  • Thanks to @cpplearner for identifying the following cleanups:
    • Consolidate test_format_context.h skips.
    • Group together bogus tests involving to_address().
    • Add an explanation of the month_day_last failure.

llvm/llvm-project PRs

This relies on the following upstream test fixes:

microsoft/STL PRs

This relies on the following product code fixes:

microsoft/STL PRs (In-Flight)

A few PRs are still in flight, so their affected tests are marked as known failures:

For LLVM-75317, parse `ADDITIONAL_COMPILE_FLAGS(feature)` and add 'gcc-style-warnings' and 'cl-style-warnings'.

This replaces the 'cl' feature - as far as I can tell, it was unused and isn't present upstream.
…en deleted or moved out of std.

I'm preserving the "ASAN runtime warns about an overlarge allocation" section in case we need to fill it with other tests.

The tests in the ADDITIONAL_COMPILE_FLAGS and _Array_iterator sections have either been fixed upstream or are affected by different issues now.
LLVM-74534 was recently opened to implement P2602R2 "Poison Pills Are Too Toxic", so I'm discarding its entries that are duplicated for P2278R4 "cbegin should always return a constant iterator".

I'm discarding the entries for DevCom-1638496 "C1XX doesn't properly reject int <=> unsigned" that are duplicated for DevCom-1626139 "compile-time NaN comparison", as I consider the former to be more likely to be fixed soon.

range.join.view/end.pass.cpp and range.join.view/sentinel/eq.pass.cpp were listed under "libc++ doesn't implement P2770R0" as FAIL for all configurations.
…" section and explain why.

generate_feature_test_macro_components.py works fine now.
This test is now blocked by -Wundefined-inline for Clang. I added `:2` because it's blocked by DevCom-1626139 "compile-time NaN comparison" for MSVC.
…ted", now we're missing P2833R2 "Freestanding Library: inout expected span".
…is still blocked by other macros including `__cpp_lib_ranges`.
…o "not analyzed".

* Task VSO-593630 "<filesystem> Enable libcxx filesystem tests" was cut.
* rapid-cxx-test.hpp no longer exists with any extension.
* The error "STATIC TESTS DISABLED" no longer exists anywhere.
* string/wstring assumptions no longer appear to be an issue.

I'm changing SKIPPED to FAIL, so we'll notice if anything starts passing.

I'm also consolidating fs.op.remove_all/toctou.pass.cpp which was in a "not analyzed" section.
@StephanTLavavej StephanTLavavej added the test Related to test code label Dec 15, 2023
@StephanTLavavej StephanTLavavej requested a review from a team as a code owner December 15, 2023 04:43
tests/libcxx/expected_results.txt Show resolved Hide resolved
tests/libcxx/expected_results.txt Outdated Show resolved Hide resolved
tests/libcxx/expected_results.txt Outdated Show resolved Hide resolved
@StephanTLavavej StephanTLavavej merged commit e077eb6 into microsoft:main Dec 15, 2023
35 checks passed
@StephanTLavavej StephanTLavavej deleted the update-libcxx branch December 15, 2023 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Related to test code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants