Skip to content

Commit bb43a0c

Browse files
committed
[libc++] Add a Buildkite job that tests back-deployment on Apple
The current way we test this is pretty cheap, i.e. we download previously released macOS dylibs and run against that. Ideally, we would require a full host running the appropriate version of macOS, and we'd execute the tests using SSH on that host. But since we don't have such hosts available easily for now, this is better than nothing. At the same time, also fix some tests that were failing when back deploying. Differential Revision: https://reviews.llvm.org/D90869
1 parent 99e6462 commit bb43a0c

File tree

12 files changed

+98
-16
lines changed

12 files changed

+98
-16
lines changed

libcxx/include/variant

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ struct __indices {
521521
};
522522

523523
template <size_t... _Ns, class _Fp, class _Rp, class... _Args>
524-
inline _LIBCPP_INLINE_VISIBILITY
524+
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
525525
static constexpr auto __make_vtable_impl(_Fp __f, _Rp (*)(_Args...)) {
526526
array<_Rp (*)(_Args...), (1 * ... * _Ns) + 1> __result = {
527527
[](_Args...) -> _Rp { __throw_bad_variant_access(); }
@@ -552,7 +552,7 @@ struct __base {
552552
};
553553

554554
template <class _Vis, class _Vp, class _Wp>
555-
inline _LIBCPP_INLINE_VISIBILITY
555+
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
556556
static constexpr decltype(auto)
557557
__visit_alt_at(size_t __index, _Vis&& __vis, _Vp&& __v, _Wp&& __w) {
558558
constexpr size_t __size = __uncvref_t<_Vp>::__size();
@@ -598,7 +598,7 @@ struct __base {
598598
}
599599

600600
template <size_t... _Is, class _Vis, class... _Vs>
601-
inline _LIBCPP_INLINE_VISIBILITY
601+
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
602602
static constexpr decltype(auto)
603603
__visit_alt_impl(index_sequence<_Is...>, _Vis&& __vis, _Vs&&... __vs) {
604604
using __multi = __multi<__uncvref_t<_Vs>::__size()...>;

libcxx/test/libcxx/thread/thread.condition/PR30202_notify_from_pthread_created_thread.pass.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,18 @@
1313
// unique_lock.
1414
// UNSUPPORTED: c++03
1515

16+
// PR30202 was fixed starting in macosx10.13.
17+
// UNSUPPORTED: with_system_cxx_lib=macosx10.12
18+
// UNSUPPORTED: with_system_cxx_lib=macosx10.11
19+
// UNSUPPORTED: with_system_cxx_lib=macosx10.10
20+
// UNSUPPORTED: with_system_cxx_lib=macosx10.9
21+
1622
// <condition_variable>
1723

18-
// void
19-
// notify_all_at_thread_exit(condition_variable& cond, unique_lock<mutex> lk);
24+
// void notify_all_at_thread_exit(condition_variable& cond, unique_lock<mutex> lk);
2025

2126
// Test that this function works with threads that were not created by
22-
// std::thread. See: https://bugs.llvm.org/show_bug.cgi?id=30202
27+
// std::thread. See https://llvm.org/PR30202
2328

2429

2530
#include <condition_variable>

libcxx/test/libcxx/thread/thread.threads/thread.thread.this/sleep_for.pass.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88

99
// UNSUPPORTED: libcpp-has-no-threads
1010

11-
// Until 58a0a70fb2f1, this_thread::sleep_for could get interrupted by
12-
// signals and this test would fail. Disable the test on the corresponding
13-
// system libraries.
14-
// XFAIL: with_system_cxx_lib=macosx10.11
15-
// XFAIL: with_system_cxx_lib=macosx10.10
16-
// XFAIL: with_system_cxx_lib=macosx10.9
11+
// Until 58a0a70fb2f1, this_thread::sleep_for could sometimes get interrupted
12+
// by signals and this test would fail spuriously. Disable the test on the
13+
// corresponding system libraries.
14+
// UNSUPPORTED: with_system_cxx_lib=macosx10.11
15+
// UNSUPPORTED: with_system_cxx_lib=macosx10.10
16+
// UNSUPPORTED: with_system_cxx_lib=macosx10.9
1717

1818
// <thread>
1919

libcxx/test/libcxx/thread/thread.threads/thread.thread.this/sleep_for.signals.pass.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
// This test uses the POSIX header <sys/time.h> which Windows doesn't provide
1212
// UNSUPPORTED: windows
1313

14-
// Until 58a0a70fb2f1, this_thread::sleep_for could get interrupted by
15-
// signals and this test would fail. Disable the test on the corresponding
16-
// system libraries.
14+
// Until 58a0a70fb2f1, this_thread::sleep_for misbehaves when interrupted by
15+
// a signal, as tested here. Disable the test on the corresponding system
16+
// libraries.
1717
// XFAIL: with_system_cxx_lib=macosx10.11
1818
// XFAIL: with_system_cxx_lib=macosx10.10
1919
// XFAIL: with_system_cxx_lib=macosx10.9

libcxx/test/std/utilities/variant/variant.hash/hash.pass.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@
99

1010
// UNSUPPORTED: c++03, c++11, c++14
1111

12+
// Throwing bad_variant_access is supported starting in macosx10.13
13+
// XFAIL: with_system_cxx_lib=macosx10.12 && !no-exceptions
14+
// XFAIL: with_system_cxx_lib=macosx10.11 && !no-exceptions
15+
// XFAIL: with_system_cxx_lib=macosx10.10 && !no-exceptions
16+
// XFAIL: with_system_cxx_lib=macosx10.9 && !no-exceptions
17+
1218
// <variant>
1319

1420
// template <class... Types> struct hash<variant<Types...>>;

libcxx/test/std/utilities/variant/variant.relops/relops.pass.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@
99

1010
// UNSUPPORTED: c++03, c++11, c++14
1111

12+
// Throwing bad_variant_access is supported starting in macosx10.13
13+
// XFAIL: with_system_cxx_lib=macosx10.12 && !no-exceptions
14+
// XFAIL: with_system_cxx_lib=macosx10.11 && !no-exceptions
15+
// XFAIL: with_system_cxx_lib=macosx10.10 && !no-exceptions
16+
// XFAIL: with_system_cxx_lib=macosx10.9 && !no-exceptions
17+
1218
// <variant>
1319

1420
// template <class ...Types>

libcxx/test/std/utilities/variant/variant.relops/relops_bool_conv.fail.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@
99

1010
// UNSUPPORTED: c++03, c++11, c++14
1111

12+
// Throwing bad_variant_access is supported starting in macosx10.13
13+
// XFAIL: with_system_cxx_lib=macosx10.12 && !no-exceptions
14+
// XFAIL: with_system_cxx_lib=macosx10.11 && !no-exceptions
15+
// XFAIL: with_system_cxx_lib=macosx10.10 && !no-exceptions
16+
// XFAIL: with_system_cxx_lib=macosx10.9 && !no-exceptions
17+
1218
// <variant>
1319

1420
// template <class ...Types>

libcxx/test/std/utilities/variant/variant.variant/variant.dtor/dtor.pass.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@
99

1010
// UNSUPPORTED: c++03, c++11, c++14
1111

12+
// Throwing bad_variant_access is supported starting in macosx10.13
13+
// XFAIL: with_system_cxx_lib=macosx10.12 && !no-exceptions
14+
// XFAIL: with_system_cxx_lib=macosx10.11 && !no-exceptions
15+
// XFAIL: with_system_cxx_lib=macosx10.10 && !no-exceptions
16+
// XFAIL: with_system_cxx_lib=macosx10.9 && !no-exceptions
17+
1218
// <variant>
1319

1420
// template <class ...Types> class variant;

libcxx/test/std/utilities/variant/variant.variant/variant.status/index.pass.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@
99

1010
// UNSUPPORTED: c++03, c++11, c++14
1111

12+
// Throwing bad_variant_access is supported starting in macosx10.13
13+
// XFAIL: with_system_cxx_lib=macosx10.12 && !no-exceptions
14+
// XFAIL: with_system_cxx_lib=macosx10.11 && !no-exceptions
15+
// XFAIL: with_system_cxx_lib=macosx10.10 && !no-exceptions
16+
// XFAIL: with_system_cxx_lib=macosx10.9 && !no-exceptions
17+
1218
// <variant>
1319

1420
// template <class ...Types> class variant;

libcxx/test/std/utilities/variant/variant.variant/variant.status/valueless_by_exception.pass.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@
99

1010
// UNSUPPORTED: c++03, c++11, c++14
1111

12+
// Throwing bad_variant_access is supported starting in macosx10.13
13+
// XFAIL: with_system_cxx_lib=macosx10.12 && !no-exceptions
14+
// XFAIL: with_system_cxx_lib=macosx10.11 && !no-exceptions
15+
// XFAIL: with_system_cxx_lib=macosx10.10 && !no-exceptions
16+
// XFAIL: with_system_cxx_lib=macosx10.9 && !no-exceptions
17+
1218
// <variant>
1319

1420
// template <class ...Types> class variant;

0 commit comments

Comments
 (0)