RFR (S): 8024634 - gc/startup_warnings tests can fail due to unrelated warnings
tao.mao at oracle.com
Mon Sep 23 14:04:05 PDT 2013
Changes look good. Ship it!
On 9/23/13 5:54 AM, Per Liden wrote:
> Thanks Jesper!
> On 2013-09-23 14:23, Jesper Wilhelmsson wrote:
>> The change look OK.
>> Would the tests be more "stable" if they were checking for more than
>> one word in the warning?
> Problem is that the test wants to check that "nothing" is printed.
> Where "nothing" here is a bit undefined, but at least it shouldn't say
> anything about this or that GC option being deprecated. Checking for
> more than one word doesn't help much because we actually don't know
> what we are looking for. The whole test is a bit questionable, but
> with this change it at least doesn't fail because of random unrelated
>> Are there any tests that checks that we do get the deprecated warning
>> for deprecated flag combinations? If so, they should probably be
>> changed in the same way so that they don't pass because some other
>> non related warning is issued.
> Yes, there are such tests, but they are stable because unlike the
> other tests these are checking that a specific warning _is_ printed,
> for example:
> TestDefaultMaxRAMFraction.java: output.shouldContain("warning:
> DefaultMaxRAMFraction is deprecated and will likely be removed in a
> future release. Use MaxRAMFraction instead.");
> TestDefNewCMS.java: output.shouldContain("warning: Using the DefNew
> young collector with the CMS collector is deprecated and will likely
> be removed in a future release");
> TestCMSIncrementalMode.java: output.shouldContain("warning: Using
> incremental CMS is deprecated and will likely be removed in a future
> TestParNewSerialOld.java: output.shouldContain("warning: Using the
> ParNew young collector with the Serial old collector is deprecated and
> will likely be removed in a future release");
>> Per Liden skrev 23/9/13 1:15 PM:
>>> Could I please have a couple of reviews on this small test fix.
>>> Summary: Some tests check that no warnings are printed when a
>>> specific GC is
>>> used. These test are a bit too generic and can catch and fail on all
>>> sorts of
>>> non-GC related warnings. What we actually want to test is that we
>>> don't print
>>> any message about these GCs being deprecated (as is the case for
>>> some other GC
>>> combinations). This isn't exactly bullet proof either since some non-GC
>>> component could print something containing "deprecated", but if that
>>> starts to
>>> become a problem we'll have to reconsider the usefulness of these
>>> Testing: Have run the jtreg tests for GC
More information about the hotspot-gc-dev