Skip to content

Commit eadd621

Browse files
committed
Adjust XFAIL for over_max_size test
1 parent e0e51a0 commit eadd621

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

libcxx/test/std/strings/basic.string/string.capacity/over_max_size.pass.cpp

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

99
// UNSUPPORTED: no-exceptions
1010

11+
// This test fails when using a built library that does not contain
12+
// 15860446a8c3, which changed the return value of max_size(). Without
13+
// that change, the built library believes the max size to be one greater
14+
// than it really is, and we fail to throw `length_error` from `string::resize()`,
15+
// which is explicitly instantiated in the built library.
16+
//
17+
// XFAIL: using-built-library-before-llvm-21
18+
1119
// <string>
1220

1321
// size_type max_size() const; // constexpr since C++20

libcxx/utils/libcxx/test/features.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -733,10 +733,24 @@ def check_gdb(cfg):
733733
# Helpers to define correspondances between LLVM versions and vendor system versions.
734734
# Those are used for backdeployment features below, do not use directly in tests.
735735
DEFAULT_FEATURES += [
736+
Feature(
737+
name="_target-has-llvm-22",
738+
when=lambda cfg: BooleanExpression.evaluate(
739+
"TBD",
740+
cfg.available_features,
741+
),
742+
),
743+
Feature(
744+
name="_target-has-llvm-21",
745+
when=lambda cfg: BooleanExpression.evaluate(
746+
"TBD",
747+
cfg.available_features,
748+
),
749+
),
736750
Feature(
737751
name="_target-has-llvm-20",
738752
when=lambda cfg: BooleanExpression.evaluate(
739-
"_target-has-llvm-21 || target={{.+}}-apple-macosx26.{{\d+(.\d+)?}}",
753+
"_target-has-llvm-21 || target={{.+}}-apple-macosx{{26.[0-9](.\d+)?}}",
740754
cfg.available_features,
741755
),
742756
),
@@ -835,7 +849,7 @@ def check_gdb(cfg):
835849
# a libc++ flavor that enables availability markup. Similarly, a test could fail when
836850
# run against the system library of an older version of FreeBSD, even though FreeBSD
837851
# doesn't provide availability markup at the time of writing this.
838-
for version in ("12", "13", "14", "15", "16", "17", "18", "19", "20"):
852+
for version in ("12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22"):
839853
DEFAULT_FEATURES.append(
840854
Feature(
841855
name="using-built-library-before-llvm-{}".format(version),

0 commit comments

Comments
 (0)