-
Notifications
You must be signed in to change notification settings - Fork 121
Closed
Labels
bug🪲 Something isn't working🪲 Something isn't working
Description
Description
I have a large test case (18k LOC) that validates some constants generated by a SwiftPM plugin for Bluetooth SIG companies. This test code was previously working fine with XCTest and was recently migrated to Swift Testing. While the test runs fine on Linux, it crashes on macOS.
Expected behavior
The test case should not crash on macOS and should be consistent with Linux.
Actual behavior
The test case crashes at ___chkstk_darwin
Thread 1 Crashed:
0 libsystem_pthread.dylib 0x18c75b13c ___chkstk_darwin + 60
1 BluetoothPackageTests 0x107a8afd8 CompanyIdentifierTests.companies() + 36 (GeneratedCompanyIdentifierTests.swift:15)
2 BluetoothPackageTests 0x108640318 closure #2 in static CompanyIdentifierTests.$s14BluetoothTests017CompanyIdentifierB0V9companies4TestfMp_15funccompanies__fMu0_@Sendable () + 48 (@__swiftmacro_14BluetoothTests017CompanyIdentifierB0V9companies4TestfMp_.swift:8)
3 Testing 0x104cd44b5 __ifMainActorIsolationEnforced<A>(_:else:) + 1
4 BluetoothPackageTests 0x107a8aba5 static CompanyIdentifierTests.$s14BluetoothTests017CompanyIdentifierB0V9companies4TestfMp_15funccompanies__fMu0_@Sendable () + 1 (@__swiftmacro_14BluetoothTests017CompanyIdentifierB0V9companies4TestfMp_.swift:3)
5 BluetoothPackageTests 0x1086406c9 implicit closure #1 in static CompanyIdentifierTests.$s14BluetoothTests017CompanyIdentifierB0V9companies4TestfMp_45__🟠$test_container__function__funccompanies__fMu_.__tests.getter + 1 (@__swiftmacro_14BluetoothTests017CompanyIdentifierB0V9companies4TestfMp_.swift:23)
6 Testing 0x104c66fed closure #1 in closure #1 in Runner._runTestCase(_:within:) + 1
7 Testing 0x104bf2449 partial apply for closure #1 in __checkClosureCall<A, B>(throws:performing:expression:comments:isRequired:sourceLocation:) + 1
8 Testing 0x104c3db95 specialized static Issue.withErrorRecording(at:configuration:isolation:_:) + 1
9 Testing 0x104c66505 closure #1 in Runner._runTestCase(_:within:) + 1
10 Testing 0x104bf2449 partial apply for closure #1 in __checkClosureCall<A, B>(throws:performing:expression:comments:isRequired:sourceLocation:) + 1
11 libswift_Concurrency.dylib 0x26cd3bc95 TaskLocal.withValueImpl<A>(_:operation:isolation:file:line:) + 1
12 libswift_Concurrency.dylib 0x26cd3b931 TaskLocal.withValue<A>(_:operation:isolation:file:line:) + 1
13 Testing 0x104c685b5 specialized static Test.Case.withCurrent<A>(_:perform:) + 1
14 Testing 0x104c65f75 Runner._runTestCase(_:within:) + 1
15 Testing 0x104c659f1 closure #2 in Runner._runTestCases<A>(_:within:) + 1
16 Testing 0x104bf2449 partial apply for closure #1 in __checkClosureCall<A, B>(throws:performing:expression:comments:isRequired:sourceLocation:) + 1
17 Testing 0x104c71e0d specialized closure #1 in closure #1 in Runner._forEach<A, B>(in:for:_:) + 1
18 Testing 0x104bf2449 partial apply for closure #1 in __checkClosureCall<A, B>(throws:performing:expression:comments:isRequired:sourceLocation:) + 1
19 libswift_Concurrency.dylib 0x26cd72035 completeTaskWithClosure(swift::AsyncContext*, swift::SwiftError*) + 1
[31/31] Compiling BluetoothTests BluetoothUUIDTests.swift
Build complete! (438.67s)
Test Suite 'All tests' started at 2025-01-11 10:19:32.886.
Test Suite 'All tests' passed at 2025-01-11 10:19:32.887.
Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.001) seconds
◇ Test run started.
↳ Testing Library Version: 102 (arm64e-apple-macos13.0)
◇ Suite UInt512Tests started.
◇ Suite DarwinTests started.
◇ Suite UInt48Tests started.
◇ Suite GATTTests started.
◇ Suite UInt256Tests started.
◇ Suite CompanyIdentifierTests started.
◇ Suite UUIDTests started.
◇ Suite GATTCharacteristicTests started.
◇ Suite UnitIdentifierTests started.
◇ Suite AttributeProtocolTests started.
◇ Suite BluetoothUUIDTests started.
◇ Suite iBeaconTests started.
◇ Suite DefinedUUIDTests started.
◇ Suite UInt24Tests started.
◇ Suite IntegerTests started.
◇ Suite HCITests started.
◇ Suite BluetoothTests started.
◇ Suite GATTDatabaseTests started.
◇ Suite GATTDescriptorTests started.
◇ Suite UInt40Tests started.
◇ Test bitWidth() started.
◇ Test hashable() started.
◇ Suite "Bluetooth Address Tests" started.
◇ Test data() started.
◇ Test expressibleByIntegerLiteral() started.
◇ Suite GAPTests started.
◇ Test expressibleByIntegerLiteral() started.
◇ Test hashable() started.
◇ Test hashable() started.
◇ Test bitWidth() started.
◇ Test comparable() started.
◇ Test coreBluetoothUUID() started.
◇ Test gapAppearance() started.
◇ Test expressibleByIntegerLiteral() started.
◇ Test companies() started.
◇ Test description() started.
◇ Test anyHashableContainingUUID() started.
◇ Test bitWidth() started.
◇ Test equality() started.
◇ Test byteValue() started.
◇ Test customMirror() started.
◇ Test companyIdentifiers() started.
◇ Suite UInt128Tests started.
◇ Test comparable() started.
◇ Test bloodPressureMeasurement() started.
◇ Test invalid() started.
◇ Test length() started.
◇ Test string() started.
◇ Test mtuExchange() started.
◇ Test data() started.
◇ Test locationName() started.
◇ Test systemID() started.
◇ Test softwareRevisionString() started.
◇ Test exactTime100() started.
◇ Test bodyCompositionMeasurement() started.
◇ Test barometricPressureTrend() started.
◇ Test supportedUnreadAlertCategory() started.
◇ Test units() started.
◇ Test localEastCoordinate() started.
◇ Test floorNumber() started.
◇ Test localTimeInformation() started.
◇ Test crossTrainerData() started.
◇ Test bootKeyboardOutputReport() started.
◇ Test dayDateTime() started.
◇ Test analogOutput() started.
◇ Test analog() started.
◇ Test alertLevel() started.
◇ Test altitude() started.
◇ Test aerobicThreshold() started.
◇ Test dateTime() started.
◇ Test serialNumberString() started.
◇ Test anaerobicHeartRateLowerLimit() started.
◇ Test bodySensorLocation() started.
◇ Test hardwareRevisionString() started.
◇ Test modelNumberString() started.
◇ Test newAlert() started.
◇ Test manufacturerNameString() started.
◇ Test timeUpdateControlPoint() started.
◇ Test cGMSessionRunTime() started.
◇ Test objectType() started.
◇ Test alertCategoryID() started.
◇ Test dayOfWeek() started.
◇ Test batteryLevel() started.
◇ Test dateUTC() started.
◇ Test scanIntervalWindow() started.
◇ Test objectName() started.
◇ Test timeSource() started.
◇ Test batteryPowerState() started.
◇ Test currentTime() started.
◇ Test aerobicHeartRateUpperLimit() started.
◇ Test unreadAlertStatus() started.
◇ Test exactTime256() started.
◇ Test readByTypeRequest() started.
◇ Test centralAddressResolution() started.
◇ Test timeUpdateState() started.
◇ Test timeWithDst() started.
◇ Test discovery() started.
◇ Test findInformation() started.
◇ Test readByGroupTypeRequest() started.
◇ Test handleValueIndication() started.
◇ Test aTTOpcode() started.
◇ Test dstOffset() started.
◇ Test referenceTimeInfomation() started.
◇ Test supportedNewAlertCategory() started.
◇ Test errorResponse() started.
◇ Test readMultiple() started.
◇ Test handleValueConfirmation() started.
◇ Test timeBroadcast() started.
◇ Test firmwareRevisionString() started.
◇ Test aTTError() started.
◇ Test secondaryTimeZone() started.
◇ Test findByType() started.
◇ Test objectSize() started.
◇ Test timeAccuracy() started.
◇ Test readByTypeResponse() started.
◇ Test objectID() started.
◇ Test scanRefresh() started.
◇ Test alertNotificationControlPoint() started.
◇ Test alertStatus() started.
◇ Test configureClientDescriptor() started.
◇ Test bootMouseInputReport() started.
◇ Test handleValueNotification() started.
◇ Test read() started.
◇ Test readByGroupTypeResponse() started.
◇ Test latitude() started.
◇ Test indoorPositioningConfiguration() started.
◇ Test uncertainty() started.
◇ Test pnPID() started.
◇ Test age() started.
◇ Test timeZone() started.
◇ Test localNorthCoordinate() started.
◇ Test alertCategoryIdBitMask() started.
◇ Test mTU() started.
◇ Test aerobicHeartRateLowerLimit() started.
◇ Test anaerobicHeartRateUpperLimit() started.
◇ Test longitude() started.
◇ Test bootKeyboardInputReport() started.
◇ Test foundation() started.
◇ Test command() started.
◇ Test primaryServiceUUID() started.
◇ Test test16BitBaseUUID() started.
◇ Test write() started.
◇ Test losslessStringConvertible() started.
◇ Test data() started.
◇ Test malformed() started.
◇ Test test128BitUUID() started.
◇ Test invalid() started.
◇ Test estimoteBeacon() started.
◇ Test definedUUID() started.
◇ Test data() started.
◇ Test hexadecimal() started.
◇ Test test32BitBaseUUID() started.
◇ Test codable() started.
◇ Test test2Bit() started.
◇ Test test32BitUUID() started.
◇ Test bitWidth() started.
◇ Test setAdvertiseEnableParameter() started.
◇ Test definedUUID() started.
◇ Test hashable() started.
◇ Test expressibleByIntegerLiteral() started.
◇ Test comparable() started.
◇ Test iOCapabilityRequestReply() started.
◇ Test setConnectionencryption() started.
◇ Test numberOfCompletedPackets() started.
◇ Test userConfirmationRequest() started.
◇ Test periodicInquiryModeAndCancel() started.
◇ Test pINCodeRequest() started.
◇ Test lEStartEncryption() started.
◇ Test readBufferSize() started.
◇ Test linkKeyRequestReply() started.
◇ Test extendedAdvertisingReport() started.
◇ Test disconnect() started.
◇ Test readLocalName() started.
◇ Test commandStatusEvent() started.
◇ Test readClassOfDevice() started.
◇ Test lEConnectionEvent() started.
◇ Test iOCapabilityRequest() started.
◇ Test readLocalSupportedFeatures() started.
◇ Test exitPeriodicInquiryMode() started.
◇ Test authenticationRequested() started.
◇ Test connectionRequest() started.
◇ Test readStoredLinkKey() started.
◇ Test inquiryCancel() started.
◇ Test readDataBlockSize() started.
◇ Test readRemoteExtendedFeatures() started.
◇ Test lEReadLocalSupportedFeatures() started.
◇ Test writeClassOfDevice() started.
◇ Test lEConnectionCreate() started.
◇ Test acceptConnectionRequest() started.
◇ Test inquiry() started.
◇ Test encryptionChangeEvent() started.
◇ Test readRemoteVersionInformation() started.
◇ Test readPageTimeout() started.
◇ Test simplePairingComplete() started.
◇ Test readDeviceAddress() started.
◇ Test connectionComplete() started.
◇ Test lERemoveDeviceFromWhiteList() started.
◇ Test modeChange() started.
◇ Test linkKeyNotification() started.
◇ Test lEAddDeviceToWhiteList() started.
◇ Test linkKeyRequestNegativeReply() started.
◇ Test maxSlotsChange() started.
◇ Test readRemoteSupportedFeatures() started.
◇ Test writeScanEnable() started.
◇ Test pINCodeRequestReply() started.
◇ Test lowEnergyScan() started.
◇ Test reset() started.
◇ Test advertisingReport() started.
◇ Test userConfirmationRequestReply() started.
◇ Test lEConnectionCancel() started.
◇ Test createConnectionCancel() started.
◇ Test writePageTimeout() started.
◇ Test writePageScanActivity() started.
◇ Test iOCapabilityResponse() started.
error: Exited with unexpected signal code 10
swiftpm-testing-helper-2025-01-11-101933.ips.zip
Steps to reproduce
- Download project Bluetooth-master.zip
swift test
swift-testing version/commit hash
102
Swift & OS version (output of swift --version ; uname -a
)
swift-driver version: 1.115.1 Apple Swift version 6.0.3 (swiftlang-6.0.3.1.10 clang-1600.0.30.1)
Target: arm64-apple-macosx15.0
Darwin MacBookPro.localdomain 24.2.0 Darwin Kernel Version 24.2.0: Fri Dec 6 19:01:59 PST 2024; root:xnu-11215.61.5~2/RELEASE_ARM64_T6000 arm64
Metadata
Metadata
Assignees
Labels
bug🪲 Something isn't working🪲 Something isn't working