Skip to content

<rdar://43955209> Attempt yet again to make overlong-argv test less flaky #19149

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

Conversation

graydon
Copy link
Contributor

@graydon graydon commented Sep 5, 2018

The last attempted fix relied on the assumption that lit was emulating shell
glob-expansion semantics, which it turns out it does not: lit looks at any 'cd'
command on a RUN line and then applies the specified directory as an absolute
prefix when resolving any subsequent non-absolute globs on the command line.
I.e. it will interpret the second line of:

 RUN: touch /tmp/foo{1,2,3}.swift
 RUN: cd /tmp && echo foo*.swift

as

 RUN: cd /tmp && echo /tmp/foo1.swift /tmp/foo2.swift /tmp/foo3.swift

whereas sh interprets it as (and I wrote the last attempt relying on):

 RUN: cd /tmp && echo foo1.swift foo2.swift foo3.swift

This new attempt therefore bypasses lit entirely and just delegates to sh.
While it might not be the most tasteful choice, it does what we want and in the
process lets us use loops to construct our testcase.

rdar://43955209

…laky.

The last attempted fix relied on the assumption that lit was emulating shell
glob-expansion semantics, which it turns out it does not: lit looks at any 'cd'
command on a RUN line and then applies the specified directory as an absolute
prefix when resolving any subsequent non-absolute globs on the command line.
I.e. it will interpret the second line of:

   RUN: touch /tmp/foo{1,2,3}.swift
   RUN: cd /tmp && echo foo*.swift

as

   RUN: cd /tmp && echo /tmp/foo1.swift /tmp/foo2.swift /tmp/foo3.swift

whereas sh interprets it as (and I wrote the last attempt relying on):

   RUN: cd /tmp && echo foo1.swift foo2.swift foo3.swift

This new attempt therefore bypasses lit entirely and just delegates to sh.
While it might not be the most tasteful choice, it does what we want and in the
process lets us use loops to construct our testcase.
@graydon
Copy link
Contributor Author

graydon commented Sep 5, 2018

@swift-ci please test and merge

@graydon graydon requested a review from jrose-apple September 5, 2018 23:01
@graydon
Copy link
Contributor Author

graydon commented Sep 5, 2018

For those following along, I posted a lit-side fix upstream too: https://reviews.llvm.org/D51709

@swift-ci swift-ci merged commit b79e23a into swiftlang:master Sep 6, 2018
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