-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Testing] Formalize stress tests #15211
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
[Testing] Formalize stress tests #15211
Conversation
@swift-ci please test |
Build failed |
@swift-ci please test |
@swift-ci please test linux |
Build failed |
@swift-ci please smoke test linux |
Build failed |
@swift-ci please smoke test osx |
@swift-ci please smoke test macos |
Hi @gottesmm, @shahmishal, and @jrose-apple – Is there anybody else at Apple that should review this? |
I'm not sure how I feel about adding another category of tests, rather than just using |
Personally, I feel that If it were up to me, I'd ditch
|
validation-test is for "low signal-to-cost ratio" already—even though they're fast, we don't expect compiler_crashers to provide much information 90% of the time. |
If you want long tests and stress tests under validation-test, that sounds fine. Personally speaking, 99.99% of the validation suite is fast enough that I run it all of the time and then Ctrl-C at the end when the stress tests are fighting with each other and the latent unmarked |
Hey @jrose-apple – I've consolidated the stress/long tests into validation-test as you requested. I did not mark the latent Should anybody else sign off on this PR before it is merged? @swift-ci please smoke test |
Ah, don't forget to move the inputs to the tests too!
I'd like all three of the other people to get a chance to look at this before you merge, sorry. |
78760d3
to
466352c
Compare
Nothing to be sorry for, this is a nontrivial testing change and it needs signing off. :-) I moved the test inputs that I forgot. This just happened to work on my machine because I don't have the sanitizers setup and the command-line stress tests already had a copy of the inputs in validation-test. |
@jrose-apple I need to do after-commit review of this. I need to focus on +0 right now... sorry = (. |
@swift-ci please smoke test |
Hi @jrose-apple – I posted to the compiler forum over the weekend in an effort to give people a heads up. Do think that if nobody responds by Friday, we can merge this? We can always revert this if people complain. |
Someone else should look at it; I'd be fine with either @Rostepher or @shahmishal signing off. |
@jrose-apple – Is there any specific question or concern that you have about this change? Or do you want review out of an abundance of caution? For whatever it may be worth, this change is basically just copy-and-pasted from the |
It's not about the implementation at all. It's just making sure that someone else besides you and me knows that it's happening and what it means for the buildbots. |
@davezarzycki @jrose-apple I landed +0. I can spend some time reviewing this now. |
@davezarzycki Just from thinking about this in the abstract, I think that this is fine as long as we make sure that the long test bots (e.g.: https://ci.swift.org/job/oss-swift-incremental-RA-linux-ubuntu-14_04-long-test/) also run the stress tests. As long as that is true, I think this is fine. |
Hi @gottesmm – Right. That's the idea. The least among of work would be for the long test bot to run the (Someday, the bots should be changed to check the stress tests serially, but that isn't urgent right now.) How will I know when the bots have been updated? |
@davezarzycki I would just update all of the long test presets to invoke the right flag for stress testing as well. See ./utils/build-presets.ini. I may need to update a few things internally, but I do not think that this will /break/ anything (we just won't run all of the tests that we need to). But I can fix/take care of that after this is merged. |
Right. The stress tests will no longer be run on the build bots after this change. If you're willing to update the build bots, that's great! Thanks! If you could mark this as reviewed, and maybe nudge @Rostepher or @shahmishal to review this as well, I'd be happy to merge this. Thanks again! |
@davezarzycki Can you update the following preset with the new stress test flag? otherwise, it looks good.
|
Please let me know if I updated |
@swift-ci please smoke test |
You will need to add support for stress test flag in build-script, after that you want to add the flag in presets. I would look at how long-test flag was added in the build-script. |
@swift-ci please smoke test |
I think the point was to keep the preset names the same but change the flags they pass. |
@jrose-apple – I don't think I fully appreciate the |
You can check out |
@davezarzycki You can see how presents translate to arguments by using the flag --expand-build-script-invocation. For instance:
|
Stress tests are, by definition, stressful. They intentionally burn a lot of resources by using randomness to hopefully surface state machine bugs. Additionally, many stress tests are multi-threaded these days and they may attempt to use all of the available CPUs to better uncover bugs. In isolation, this is not a problem, but the test suite as a whole assumes that individual tests are single threaded and therefore running multiple stress tests at once can quickly spiral out of control. This change formalizes stress tests and then treats them like long tests, i.e. tested via 'check-swift-all' and otherwise opt-in. Finally, with this change, the CI build bots might need to change if they are still only testing 'validation' instead of all of the tests. I see three options: 1) Run all of the tests. -- There are very few long tests left these days, and the additional costs seems small relative to the cost of the whole validation test suite before this change. 2) Continue checking 'validation', now sans stress tests. 3) Check 'validation', *then* the stress tests. If the former doesn't pass, then there is no point in the latter, and by running the stress tests separately, they stand a better chance of uncovering bugs and not overwhelming build bot resources.
7af2f8c
to
cc7ac38
Compare
I've rebased and dropped the unintentional preset rename. I think this should be good to go now. @swift-ci please smoke test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks!
cc7ac38
to
dc22a4d
Compare
A test is determined to make 79 columns be the new "80 columns". @swift-ci please smoke test |
Stress tests are, by definition, stressful. They intentionally burn a lot of resources by using randomness to hopefully surface state machine bugs. Additionally, many stress tests are multi-threaded these days and they may attempt to use all of the available CPUs to better uncover bugs. In isolation, this is not a problem, but the test suite as a whole assumes that individual tests are single threaded and therefore running multiple stress tests at once can quickly spiral out of control.
This change formalizes stress tests and then treats them like long tests, i.e. tested via 'check-swift-all' and otherwise opt-in.
Finally, with this change, the CI build bots might need to change if they are still only testing 'validation' instead of all of the tests. I see three options: