Skip to content

Various tests break if optimize-tests = false in config.toml #55757

Closed

Description

@pnkfelix

Some number of tests in the test suite will break if you turn off optimization. (The breakage is usually not terrible; e.g. sometimes its mild difference in diagnostic output.)

This is nonetheless a real problem because there is no good way to work around it. For example, there is no way for a test to specify that it requires a certain opt-level.

Activity

  1. pnkfelix commented on Nov 7, 2018

    @pnkfelix
    ContributorAuthor

    Hmm, @oli-obk points out (#55532 (comment)) that one can add // compile-flags: -O to such tests to sidestep the behavior.

    And that's true: One can pass -O multiple times to the compiler.

    I had thought you couldn't, because what you cannot do is pass -O -C opt-level=0. I.e., there's a still a problem in that tests cannot specify that they require optimizations to be turned off.

  2. pnkfelix commented on Dec 13, 2018

    @pnkfelix
    ContributorAuthor

    The main symptom of this problem on OS X will be resolved if #54153 is closed by PR #56772

    I'll go look if Linux has any similar issues.

    If it doesn't... then I may close this. I'm tempted to still leave it open because tests should have some way to override the setting in config.toml. But that might be better left for a broader compiletest overhaul.

  3. pnkfelix commented on Dec 14, 2018

    @pnkfelix
    ContributorAuthor

    Linux didn't have any analogous issues here. And I think PR #56772 will (eventually) go through. So I'm closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions