Skip to content

Commit d28b8ea

Browse files
committed
Add resilient_stdlib to available_features and XFAIL remaining failing tests
All unoptimized tests should now pass when Swift is built with 'build-script -- --swift-stdlib-enable-resilience=1'. There are still some issues when the tests themselves are built with optimizations via 'check-swift-validation-optimize'. Fixes <rdar://problem/28409189>.
1 parent fab574c commit d28b8ea

14 files changed

+42
-0
lines changed

test/DebugInfo/linetable-cleanups.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
// RUN: %target-swift-frontend %s -emit-ir -g -o - | %FileCheck %s
22

3+
// FIXME: https://bugs.swift.org/browse/SR-2808
4+
// XFAIL: resilient_stdlib
5+
36
func markUsed<T>(_ t: T) {}
47

58
class Person {

test/IRGen/vector_reduction.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
// REQUIRES: CPU=x86_64
44

5+
// FIXME: https://bugs.swift.org/browse/SR-2808
6+
// XFAIL: resilient_stdlib
7+
58
// We were missing target transform info and not vectorizing the loop below.
69

710
// CHECK: xor <2 x i64>

test/SILGen/unsafe_pointer_gen.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
// RUN: %target-swift-frontend -O -emit-sil -parse-as-library %s | %FileCheck %s
22

3+
// FIXME: https://bugs.swift.org/browse/SR-2808
4+
// XFAIL: resilient_stdlib
5+
36
// Test the absence of a 'strict' flag.
47
// CHECK-LABEL: _TF18unsafe_pointer_gen13test_raw_loadFT2rpSV_Si
58
// CHECK: pointer_to_address {{%.*}} : $Builtin.RawPointer to $*Int

test/SILOptimizer/DestructorAnalysis.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
// This test depends on asserts because we look at debug output.
44
// REQUIRES: asserts
55

6+
// FIXME: https://bugs.swift.org/browse/SR-2808
7+
// XFAIL: resilient_stdlib
8+
69
class Foo {}
710

811
var a: [Int] = []

test/SILOptimizer/bridged_casts_folding.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
// REQUIRES: objc_interop
44

5+
// FIXME: https://bugs.swift.org/browse/SR-2808
6+
// XFAIL: resilient_stdlib
7+
58
// Check that casts between bridged types are replaced by more
69
// efficient code sequences.
710
//

test/SILOptimizer/cast_folding_no_bridging.sil

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
// RUN: %target-swift-frontend -O -emit-sil %s | %FileCheck %s
22
// REQUIRES: objc_interop
33

4+
// FIXME: https://bugs.swift.org/browse/SR-2808
5+
// XFAIL: resilient_stdlib
6+
47
// We want to check that casts between two types which are both Swift types or
58
// both are ObjC types are not optimized by the cast optimizer into casts
69
// to/from ObjC.

test/SILOptimizer/prespecialize.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
// REQUIRES: optimized_stdlib
44

5+
// FIXME: https://bugs.swift.org/browse/SR-2808
6+
// XFAIL: resilient_stdlib
7+
58
// Check that pre-specialization works at -Onone.
69
// This test requires the standard library to be compiled with pre-specializations!
710

test/SILOptimizer/sil_combine_objc.sil

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
// RUN: %target-sil-opt -enable-sil-verify-all %s -sil-combine -verify-skip-unreachable-must-be-last | %FileCheck %s
22
// REQUIRES: objc_interop
33

4+
// FIXME: https://bugs.swift.org/browse/SR-2808
5+
// XFAIL: resilient_stdlib
6+
47
sil_stage canonical
58

69
import Builtin

test/SILOptimizer/stack_promotion_escaping.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
// RUN: %target-swift-frontend -parse-as-library -O -module-name=test %s -emit-sil | %FileCheck %s
22

3+
// FIXME: https://bugs.swift.org/browse/SR-2808
4+
// XFAIL: resilient_stdlib
5+
36
final class Item {}
47

58
final public class Escaper {

test/lit.site.cfg.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ if "@SWIFT_AST_VERIFIER@" == "TRUE":
6464
if "@SWIFT_OPTIMIZED@" == "TRUE":
6565
config.available_features.add("optimized_stdlib")
6666

67+
if "@SWIFT_STDLIB_ENABLE_RESILIENCE@" == "TRUE":
68+
config.available_features.add("resilient_stdlib")
69+
6770
if "@SWIFT_HAVE_WORKING_STD_REGEX@" == "FALSE":
6871
config.available_features.add('broken_std_regex')
6972

test/stdlib/FloatingPoint.swift.gyb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
// RUN: %line-directive %t/FloatingPoint.swift -- %target-run %t/a.out
44
// REQUIRES: executable_test
55

6+
// FIXME: https://bugs.swift.org/browse/SR-2808
7+
// XFAIL: resilient_stdlib
8+
69
%{
710
from gyb_stdlib_unittest_support import TRACE, stackTrace, trace
811
}%

validation-test/Reflection/reflect_Character.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
// REQUIRES: objc_interop
55
// REQUIRES: executable_test
66

7+
// FIXME: https://bugs.swift.org/browse/SR-2808
8+
// XFAIL: resilient_stdlib
9+
710
import SwiftReflectionTest
811

912
class TestClass {

validation-test/Reflection/reflect_multiple_types.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
// REQUIRES: objc_interop
55
// REQUIRES: executable_test
66

7+
// FIXME: https://bugs.swift.org/browse/SR-2808
8+
// XFAIL: resilient_stdlib
9+
710
import SwiftReflectionTest
811
import Foundation
912

validation-test/lit.site.cfg.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ else:
6060
if "@SWIFT_OPTIMIZED@" == "TRUE":
6161
config.available_features.add("optimized_stdlib")
6262

63+
if "@SWIFT_STDLIB_ENABLE_RESILIENCE@" == "TRUE":
64+
config.available_features.add("resilient_stdlib")
65+
6366
if "@CMAKE_GENERATOR@" == "Xcode":
6467
xcode_bin_dir = os.path.join(config.llvm_obj_root, "@LLVM_BUILD_TYPE@",
6568
'bin')

0 commit comments

Comments
 (0)