Files
Carl Peto a6f148efc0 [Testing] Split off friendly tests.
rdar://181843264 relates on this, we had disabled all unit tests for remote running for any tests using preset=friendly on the backtracer anywhere in the test.
This is because friendly needs access to source code files which are not present when doing remote run.
Split unit tests into a bit that can be run remotely like most tests, and a bit that uses preset=friendly that can't.
2026-07-22 13:22:39 +01:00

33 lines
2.0 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// RUN: %empty-directory(%t)
// RUN: %target-build-swift %S/Inputs/Overflow.swift -parse-as-library -Onone %swift-debug-flags -o %t/Overflow.exe
// RUN: %target-codesign %t/Overflow.exe
// RUN: ! env %env-SWIFT_BACKTRACE=enable=yes,cache=no %target-run %t/Overflow.exe %t/Overflow.exe.dSYM > %t/Overflow.out 2>&1
// RUN: %FileCheck %s --ignore-case < %t/Overflow.out
// UNSUPPORTED: use_os_stdlib
// UNSUPPORTED: back_deployment_runtime
// REQUIRES: executable_test
// REQUIRES: backtracing
// REQUIRES: OS=macosx || OS=linux-gnu || OS=windows-msvc
// CHECK: *** Swift runtime failure: arithmetic overflow ***
// CHECK: Thread 0 {{(".*" )?}}crashed:
// CHECK: 0 [inlined] [system] 0x{{[0-9a-f]+}} Swift runtime failure: arithmetic overflow in Overflow.exe at {{.*[\\/]}}<compiler-generated>
// CHECK-NEXT: 1 0x{{[0-9a-f]+}} level5() + {{[0-9]+}} in Overflow.exe at {{.*[\\/]}}Overflow.swift:22:5
// CHECK-NEXT: 2 [ra] 0x{{[0-9a-f]+}} level4() + {{[0-9]+}} in Overflow.exe at {{.*[\\/]}}Overflow.swift:16:3
// CHECK-NEXT: 3 [ra] 0x{{[0-9a-f]+}} level3() + {{[0-9]+}} in Overflow.exe at {{.*[\\/]}}Overflow.swift:12:3
// CHECK-NEXT: 4 [ra] 0x{{[0-9a-f]+}} level2() + {{[0-9]+}} in Overflow.exe at {{.*[\\/]}}Overflow.swift:8:3
// CHECK-NEXT: 5 [ra] 0x{{[0-9a-f]+}} level1() + {{[0-9]+}} in Overflow.exe at {{.*[\\/]}}Overflow.swift:4:3
// CHECK-NEXT: 6 [ra] 0x{{[0-9a-f]+}} static Overflow.main() + {{[0-9]+}} in Overflow.exe at {{.*[\\/]}}Overflow.swift:28:5
// CHECK-NEXT: 7 [ra] [system] 0x{{[0-9a-f]+}} static Overflow.$main() + {{[0-9]+}} in Overflow.exe at {{.*[\\/]}}<compiler-generated>
// CHECK-NEXT: 8 [ra] [system] 0x{{[0-9a-f]+}} main + {{[0-9]+}} in Overflow.exe at {{.*[\\/]}}Overflow.swift
// CHECK: Registers:
// CHECK: Images ({{[0-9]+}} omitted):
// CHECK: {{0x[0-9a-f]+}}–{{0x[0-9a-f]+}}{{ +}}{{[0-9a-f]+|<no build ID>}}{{ +}}Overflow.exe{{ +}}{{.*[\\/]}}Overflow.exe