Terminate JCStress on forbidden outcome?
Aleksey Shipilev
shade at redhat.com
Wed Mar 15 11:33:02 UTC 2017
Hi,
On 03/13/2017 06:43 PM, Michael Emmi wrote:
> Is there a way to get JCStress to terminate when a given outcome — e.g.,
> FORBIDDEN — is reached for the first time?
There is no way at the moment, and it is unlikely jcstress would support this in
future. There are both philosophical and technical reasons for this.
Philosophical reason: the failure of the particular test is not a good predictor
of correctness. The failure of one particular test *together* with other tests
passing or failing is a good predictor. It is quite often some test would be
just unfortunate to be caught in the tide of failures for which there are
targeted tests later.
Technical reason: jcstress is designed to survive forked VM failures nicely, and
the side effect of that comes with no possibility to break out of current
executing code on failures. That code is rather fragile, and we would not want
to introduce special code paths to break out of it. One could try something like
this, but then jcstress would just stall on failure:
http://cr.openjdk.java.net/~shade/scratch/jcstress-fail-on-error.patch
There is a middle-ground though: *if* you know that failures are contained, then
you can terminate jcstress in the middle of the run, and then re-parse the
binary log with -p.
Thanks,
-Aleksey
More information about the jcstress-dev
mailing list