Skip to content

Commit 06a7065

Browse files
authored
Merge pull request #35730 from lorentey/stdlib-abi-checking
[test] Reinstate stdlib ABI checks
2 parents 691ead3 + 70584f9 commit 06a7065

File tree

2 files changed

+40
-36
lines changed

2 files changed

+40
-36
lines changed

test/api-digester/stability-stdlib-abi-with-asserts.test

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,42 @@
1+
// RUN: %empty-directory(%t.tmp)
2+
// mkdir %t.tmp/module-cache && mkdir %t.tmp/dummy.sdk
3+
// RUN: %api-digester -diagnose-sdk -module Swift -o %t.tmp/changes.txt -module-cache-path %t.tmp/module-cache -sdk %t.tmp/dummy.sdk -abi -avoid-location
4+
// RUN: %clang -E -P -x c %S/stability-stdlib-abi-without-asserts.test -o - > %t.tmp/stability-stdlib-abi.swift.expected
5+
// RUN: %clang -E -P -x c %S/stability-stdlib-abi-with-asserts.test -o - >> %t.tmp/stability-stdlib-abi.swift.expected
6+
// RUN: %clang -E -P -x c %t.tmp/stability-stdlib-abi.swift.expected -o - | sed '/^\s*$/d' | sort > %t.tmp/stability-stdlib-abi.swift.expected.sorted
7+
// RUN: %clang -E -P -x c %t.tmp/changes.txt -o - | sed '/^\s*$/d' | sort > %t.tmp/changes.txt.tmp
8+
// RUN: diff -u %t.tmp/stability-stdlib-abi.swift.expected.sorted %t.tmp/changes.txt.tmp
9+
110
// Welcome, Build Wrangler!
211
//
312
// A failure in this test indicates that there is a potential ABI breaking
413
// change in the Standard Library. If you observe a failure, please reach out to
514
// the Standard Library team directly to make sure we resolve this quickly!
615
//
7-
// Instead of XFAILing this test, please consider extending the list of expected
8-
// changes at the bottom. (In addition to ignoring the current set of ABI breaks,
9-
// XFAILing this test also silences any future ABI breaks that may land on this
10-
// branch, which isn't ideal.)
16+
// Please DO NOT XFAIL THIS TEST. In addition to ignoring the current set of ABI
17+
// breaks, XFAILing this test also silences any future ABI breaks that may land
18+
// on this branch, which isn't ideal.
1119
//
12-
// You can find a diff of what needs to be added in the output of the failed
13-
// test run. The order of lines doesn't matter, and you can also include
14-
// comments to refer to any bugs you filed.
20+
// Instead, consider extending the list of expected changes at the bottom. You
21+
// can find a diff of what needs to be added in the output of the failed test
22+
// run. The order of lines doesn't matter, and you can also include comments to
23+
// refer to any bugs you filed.
1524
//
1625
// Thanks! -- Your friendly stdlib engineers
1726

18-
// REQUIRES: OS=macosx
1927
// REQUIRES: swift_stdlib_asserts
2028

2129
// SR-13362
22-
// This currently fails on non-Intel architectures due to no baseline being
23-
// available and it is not possible to filter across architectures in the
24-
// output.
25-
// XFAIL: CPU=arm64 || CPU=arm64e
26-
27-
// RUN: %empty-directory(%t.tmp)
28-
// mkdir %t.tmp/module-cache && mkdir %t.tmp/dummy.sdk
29-
// RUN: %api-digester -diagnose-sdk -module Swift -o %t.tmp/changes.txt -module-cache-path %t.tmp/module-cache -sdk %t.tmp/dummy.sdk -abi -avoid-location
30-
// RUN: %clang -E -P -x c %S/stability-stdlib-abi-without-asserts.test -o - > %t.tmp/stability-stdlib-abi.swift.expected
31-
// RUN: %clang -E -P -x c %S/stability-stdlib-abi-with-asserts.test -o - >> %t.tmp/stability-stdlib-abi.swift.expected
32-
// RUN: %clang -E -P -x c %t.tmp/stability-stdlib-abi.swift.expected -o - | sed '/^\s*$/d' | sort > %t.tmp/stability-stdlib-abi.swift.expected.sorted
33-
// RUN: %clang -E -P -x c %t.tmp/changes.txt -o - | sed '/^\s*$/d' | sort > %t.tmp/changes.txt.tmp
34-
// RUN: diff -u %t.tmp/stability-stdlib-abi.swift.expected.sorted %t.tmp/changes.txt.tmp
30+
// We currently only have a baseline for Intel CPUs on macOS.
31+
// REQUIRES: OS=macosx
32+
// REQUIRES: CPU=x86_64
3533

3634
// The digester can incorrectly register a generic signature change when
3735
// declarations are shuffled. rdar://problem/46618883
3836
// UNSUPPORTED: swift_evolve
3937

38+
// *** DO NOT XFAIL THIS TEST *** (See comment above.)
39+
4040
Func _collectReferencesInsideObject(_:) is a new API without @available attribute
4141
Func _loadDestroyTLSCounter() is a new API without @available attribute
4242
Func _measureRuntimeFunctionCountersDiffs(objects:_:) is a new API without @available attribute

test/api-digester/stability-stdlib-abi-without-asserts.test

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,38 @@
1+
// RUN: %empty-directory(%t.tmp)
2+
// mkdir %t.tmp/module-cache && mkdir %t.tmp/dummy.sdk
3+
// RUN: %api-digester -diagnose-sdk -module Swift -o %t.tmp/changes.txt -module-cache-path %t.tmp/module-cache -sdk %t.tmp/dummy.sdk -abi -avoid-location -v
4+
// RUN: %clang -E -P -x c %S/stability-stdlib-abi-without-asserts.test -o - | sed '/^\s*$/d' | sort > %t.tmp/stability-stdlib-abi.swift.expected
5+
// RUN: %clang -E -P -x c %t.tmp/changes.txt -o - | sed '/^\s*$/d' | sort > %t.tmp/changes.txt.tmp
6+
// RUN: diff -u %t.tmp/stability-stdlib-abi.swift.expected %t.tmp/changes.txt.tmp
7+
18
// Welcome, Build Wrangler!
29
//
310
// A failure in this test indicates that there is a potential ABI breaking
411
// change in the Standard Library. If you observe a failure, please reach out to
512
// the Standard Library team directly to make sure we resolve this quickly!
613
//
7-
// Instead of XFAILing this test, please consider extending the list of expected
8-
// changes at the bottom. (In addition to ignoring the current set of ABI breaks,
9-
// XFAILing this test also silences any future ABI breaks that may land on this
10-
// branch, which isn't ideal.)
14+
// Please DO NOT XFAIL THIS TEST. (In addition to ignoring the current set of
15+
// ABI breaks, XFAILing this test also silences any future ABI breaks that may
16+
// land on this branch, which isn't ideal.)
1117
//
12-
// You can find a diff of what needs to be added in the output of the failed
13-
// test run. The order of lines doesn't matter, and you can also include
14-
// comments to refer to any bugs you filed.
18+
// Instead, consider extending the list of expected changes at the bottom. You
19+
// can find a diff of what needs to be added in the output of the failed test
20+
// run. The order of lines doesn't matter, and you can also include comments to
21+
// refer to any bugs you filed.
1522
//
1623
// Thanks! -- Your friendly stdlib engineers
1724

18-
// REQUIRES: OS=macosx
1925
// REQUIRES: swift_stdlib_no_asserts
20-
// RUN: %empty-directory(%t.tmp)
21-
// mkdir %t.tmp/module-cache && mkdir %t.tmp/dummy.sdk
22-
// RUN: %api-digester -diagnose-sdk -module Swift -o %t.tmp/changes.txt -module-cache-path %t.tmp/module-cache -sdk %t.tmp/dummy.sdk -abi -avoid-location -v
23-
// RUN: %clang -E -P -x c %S/stability-stdlib-abi-without-asserts.test -o - | sed '/^\s*$/d' | sort > %t.tmp/stability-stdlib-abi.swift.expected
24-
// RUN: %clang -E -P -x c %t.tmp/changes.txt -o - | sed '/^\s*$/d' | sort > %t.tmp/changes.txt.tmp
25-
// RUN: diff -u %t.tmp/stability-stdlib-abi.swift.expected %t.tmp/changes.txt.tmp
26+
27+
// SR-13362
28+
// We currently only have a baseline for Intel CPUs on macOS.
29+
// REQUIRES: OS=macosx && CPU=x86_64
2630

2731
// The digester can incorrectly register a generic signature change when
2832
// declarations are shuffled. rdar://problem/46618883
2933
// UNSUPPORTED: swift_evolve
3034

31-
// REQUIRES: rdar72856256
35+
// *** DO NOT XFAIL THIS TEST. *** See comment above.
3236

3337
Func _prespecialize() is a new API without @available attribute
3438
Func _stdlib_isOSVersionAtLeastOrVariantVersionAtLeast(_:_:_:_:_:_:) is a new API without @available attribute

0 commit comments

Comments
 (0)