Skip to content

[test] Re-add crash tests for getObjects:andKeys:count: #17907

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 31, 2018

Conversation

lorentey
Copy link
Member

On some platforms, when a new process is started, ARC’s autoreleased return value optimization is expected to fail the first time it is used in each linked dylib. StdlibUnittest takes care of warming up ARC for the stdlib (libswiftCore.dylib), but for Dictionary.swift, we also need to do it for Foundation, or there will be spurious leaks reported for tests immediately following a crash test.

Add the necessary dummy operations to setUp, and re-add the crash tests that were removed in #17862. (As separate tests this time, so they don’t hide leaks in non-crashing test parts.)

rdar://problem/42069800

@lorentey
Copy link
Member Author

cc @moiseev

@lorentey
Copy link
Member Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 58ea56c3277a23945521977f13f3a1072028c15d

// dylib. StdlibUnittest takes care of warming up ARC for the stdlib
// (libswiftCore.dylib), but for this particular test we also need to do it
// for Foundation, or there will be spurious leaks reported for tests
// immediately following a crash test.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😱

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, maybe StdlibUnittest should do this instead, for every test. However, the relevant file doesn't import Foundation, and I hesitate to add the import there, for fear of even more unintended consequences.

@lorentey
Copy link
Member Author

Linux failure was in lldb; let's retry for good luck.

@swift-ci please clean smoke test linux platform

On some platforms, when a new process is started, ARC’s autoreleased return value optimization is expected to fail the first time it is used in each linked dylib. StdlibUnittest takes care of warming up ARC for the stdlib (libswiftCore.dylib), but for Dictionary.swift, we also need to do it for Foundation, or there will be spurious leaks reported for tests immediately following a crash test.

Add the necessary dummy operations to setUp, and re-add the crash tests that were removed in swiftlang#17862. (As separate tests this time, so they don’t hide leaks in non-crashing test parts.)
@lorentey lorentey force-pushed the crashes-scare-counters2 branch from 58ea56c to d2861f7 Compare July 13, 2018 14:33
@lorentey
Copy link
Member Author

@swift-ci please test

@lorentey lorentey merged commit 517e780 into swiftlang:master Jul 31, 2018
@lorentey lorentey deleted the crashes-scare-counters2 branch July 31, 2018 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants