Skip to content

[tests] Enable several test cases on non-Darwin platforms #2544

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 7 commits into from
May 17, 2016

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented May 16, 2016

What's in this pull request?

Enable several test cases on non-Darwin platforms.

  • test/1_stdlib/ManagedBuffer.swift
  • test/1_stdlib/Mirror.swift
  • test/Interpreter/SDK/libc.swift
  • validation-test/stdlib/ArrayNew.swift.gyb
  • validation-test/stdlib/Dictionary.swift
  • validation-test/stdlib/Unicode.swift

Before merging this pull request to apple/swift repository:

  • Test pull request on Swift continuous integration.

@gribozavr
Copy link
Contributor

@swift-ci Please test and merge

@gribozavr
Copy link
Contributor

@rintaro Thank you!

@gribozavr
Copy link
Contributor

@rintaro Seems like Linux tests failed, could you take a look?

@rintaro
Copy link
Member Author

rintaro commented May 17, 2016

I'm looking into it.

https://ci.swift.org/job/swift-PR-Linux/1551/console

[ RUN      ] ManagedBuffer.basic
stdout>>> check failed at /home/buildnode/jenkins/workspace/swift-PR-Linux@2/swift/test/1_stdlib/ManagedBuffer.swift, line 149
stdout>>> 12 >= 13
[     FAIL ] ManagedBuffer.basic
tests.test("basic") {                                                             
  do {                                                                            
    let s = TestManagedBuffer<LifetimeTracked>.create(0)                          
    expectEqual(1, LifetimeTracked.instances)                                     
  }                                                                               

  expectEqual(0, LifetimeTracked.instances)                                       
  do {                                                                            
    let s = TestManagedBuffer<LifetimeTracked>.create(10)                         
    expectEqual(0, s.count)                                                       
    expectLE(10, s.myCapacity)                                                    
    expectGE(12, s.myCapacity)  // allow some over-allocation but not too much 
    // ^ Failing test

@gribozavr
Copy link
Contributor

If we need to relax the bounds by a little bit, feel free to do so.

@gparker42
Copy link
Contributor

That capacity test is dependent on the malloc implementation. It is likely that 13 is the expected result on that Linux version.

@rintaro
Copy link
Member Author

rintaro commented May 17, 2016

@gparker42
The problem is, I'm not sure what should be the acceptable max capacity 😅

@gribozavr
Copy link
Contributor

@rintaro Bump it to what's needed on your system, and we can bump it further if it is needed for other systems. We just don't want to set it too high, since what's the point in checking at all then.

@rintaro
Copy link
Member Author

rintaro commented May 17, 2016

@gribozavr OK, updated to 13 for now :)

@gribozavr
Copy link
Contributor

@swift-ci Please test and merge

@swift-ci swift-ci merged commit 9af514f into swiftlang:master May 17, 2016
@rintaro rintaro deleted the test-nondarwin-1 branch June 4, 2016 14:07
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.

4 participants