Skip to content
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

Hundreds of ignore'd tests are bitrotting in the test suite #3965

Closed
bstrie opened this issue Nov 14, 2012 · 18 comments
Closed

Hundreds of ignore'd tests are bitrotting in the test suite #3965

bstrie opened this issue Nov 14, 2012 · 18 comments
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc C-cleanup Category: PRs that clean code up or issues documenting cleanup. P-low Low priority

Comments

@bstrie
Copy link
Contributor

bstrie commented Nov 14, 2012

git grep -l xfail -- src/test/ | wc -l shows 235 xfail'd tests. Some of these are using ancient language features; e.g. https://github.com/mozilla/rust/blob/master/src/test/run-fail/too-much-recursion-unwinding.rs is still making use of classes. Surely some of these tests can be updated and made to work with the current compiler.

@ghost ghost assigned catamorphism Nov 15, 2012
@catamorphism
Copy link
Contributor

I'll see how far I can get with this.

@catamorphism
Copy link
Contributor

Down to 217! This can be an ongoing "brain is too dead to do anything else" project.

@catamorphism
Copy link
Contributor

Down to 140, not counting ones that are marked xfail-fast.

Nominating for milestone 4, "well-covered". This could be an easy starter project for many people: pick a few tests that are xfailed, and either fix them so they work, or file a bug saying that the test is still broken.

@ghost
Copy link

ghost commented Jun 8, 2013

I have been suggested this bug by cmr on IRC as a very good first bug as it shall enable me to see lot of code and I wish to work on this

@bstrie
Copy link
Contributor Author

bstrie commented Jun 8, 2013

@rajul-iitkgp be warned, this may not be so simple. You must be very careful to ensure that every test is still exercising the same code paths today as it was originally. In addition, many concepts from ancient Rust have no direct equivalent in modern Rust. Some tests may simply not be salvageable and may need to be deleted. When in doubt, ask a developer.

@emberian
Copy link
Member

Up to 374 ;(

@graydon
Copy link
Contributor

graydon commented Jul 18, 2013

accepted for well-covered milestone

@astrieanna
Copy link
Contributor

What is the right thing to do with xfailed tests that are for issues that have been closed as won't fix?
For example, #912 and its test run-pass/issue-912.rs.
The test now fails for a different reason (the [{id: 20}] syntax), but it seems like it should just be removed.

Additionally, there are (well, at least one) tests that are xfailed because they aren't tests. For example, run-pass/mod_file_aux.rs, which says xfail-test Not a test. Used by other tests. Is there a better way to indicate "not a test" than xfail-test? (It's reasonable for there not to be, since it's probably a very small category; just annoying for the uninitiated looking for tests to fix.)

@alexcrichton
Copy link
Member

The test files like mod_file_aux as xfail-test are fine, they're just used by other tests when exercising parser features.

As for tests like issue-912.rs, I think that the idea here is to update as many as possible to the current "today syntax" while jettisoning those which are broken beyond repair or are simply never going to get fixed. For the one in the case of 912, it sounds like it just needs to get removed.

@pnkfelix
Copy link
Member

Assigning P-low.

@steveklabnik
Copy link
Member

$ git grep -l ignore -- src/test | wc -l
327

@tamird
Copy link
Contributor

tamird commented May 12, 2015

$ git grep -l '//\s*ignore' -- src/test | wc -l
321

bors added a commit that referenced this issue May 14, 2015
We don't have any pending snapshot-requiring changes. Closes #20184.

Works toward #3965.
@klutzy
Copy link
Contributor

klutzy commented May 27, 2015

cc #13745

@steveklabnik steveklabnik changed the title Hundreds of xfail'd tests are bitrotting in the test suite Hundreds of ignore'd tests are bitrotting in the test suite Jun 12, 2015
@steveklabnik
Copy link
Member

Looking at my previous attempts to tackle this issue, I now realize that my regular expression may have been a bit too lose: we have ignore-test, ignore-pretty, and such. It seems to me that this ticket is mostly about ignore-test.

In that case,

$ git grep -l '//\s*ignore-test' -- src/test head | wc -l
57

Still a ways to go, but much shorter :)

steveklabnik added a commit to steveklabnik/rust that referenced this issue Jun 12, 2015
Most of these are old, but some specific messages for specific tests:

* trait-contravariant-self.rs: failed due to a soundess hole:
  rust-lang@05e3248

* process-detatch: rust-lang@15966c3
  says "this test is being ignored until signals are implemented" That's
  not happening for a long time, and when it is, we'll write tests for
  it.

* deep-vector{,2}.rs: "too big for our poor macro infrastructure", and has
  been ignored over a year.

* borrowck-nested-calls.rs's FIXME rust-lang#6268 was closed in favor of
  rust-lang/rfcs#811

* issue-15167.rs works properly now
* issue-9737.rs works properly now
* match-var-hygiene.rs works properly now

Addresses a chunk of rust-lang#3965
@steveklabnik
Copy link
Member

@bstrie now that #26253 has landed, does that address your original ticket? we're never going to get to zero of these issues, but it seems to me the more specific ignores aren't nearly as bad as the straight-up ignored ones.

@tamird
Copy link
Contributor

tamird commented Jun 13, 2015

@steveklabnik I think this issue is asking for a systematic way to keep these tests from rotting. In the rspec terminology these tests are currently skipped, while they should be pending.

@tshepang
Copy link
Member

git grep -l '//\s*ignore-test' -- src/test | wc -l

now outputs

18

@bstrie
Copy link
Contributor Author

bstrie commented Oct 4, 2015

@tamird I'm actually fine closing this now. Not only have we excised the rotten cases from the test suite, but Rust is no longer breaking and so tests have no good reason to be ignored in the future. As @tshepang notes we still have a handful left, but this number is entirely manageable.

@bstrie bstrie closed this as completed Oct 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc C-cleanup Category: PRs that clean code up or issues documenting cleanup. P-low Low priority
Projects
None yet
Development

No branches or pull requests

12 participants