[security-dev 01436]: Re: hg: jdk7/tl/jdk: 6907177: Update jdk tests to remove unncessary -source and -target options
Joseph D. Darcy
Joe.Darcy at Sun.COM
Fri Dec 4 18:03:17 UTC 2009
Jonathan Gibbons wrote:
> Andrew John Hughes wrote:
>> 2009/12/4 <joe.darcy at sun.com>:
>>
>>> Changeset: 1755493c5774
>>> Author: darcy
>>> Date: 2009-12-03 18:19 -0800
>>> URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/1755493c5774
>>>
>>> 6907177: Update jdk tests to remove unncessary -source and -target options
>>> Reviewed-by: ohair
>>>
>>> ! test/demo/jvmti/hprof/CpuOldTest.java
>>>
>>>
[snip]
>>> ! test/sun/tools/jconsole/ResourceCheckTest.sh
>>>
>>>
>>>
>>
>> Was this really necessary? The options, as far as I can see, were
>> doing no harm but this change means that a compiler that defaults to a
>> version < 1.5 (e.g. ecj) will now fail to compile the tests.
>>
> This is a JDK test suite and there is no guarantee that any other
> compiler can be used. All sorts of JDK-specific options may be passed
> to the compiler, runtime and other tools in these tests.
>
Yes, these tests are part of the JDK 7 regression test suite.
Interoperability with other compilers, even other compilers from related
code bases like OpenJDK 6, is a non-goal.
Having the old -source options in the tests was at least in a small way
reducing the effectiveness of the test suite since the default -source
setting is now 7. Using of new language features in tests, even tests
not targeting those language features is certainly encouraged.
As explained in my code review request on corelib-dev, many of the
-source directives dated to back in JDK 5 before the default sourced was
upped from 1.4 to 5. Tests written later in JDK 5 that use JDK 5
language features didn't have explicit -source settings.
While the build environment for most programs should explicitly set
source, target, and encoding,
"Build Advice: Set Source, Target, and Encoding"
http://blogs.sun.com/darcy/entry/build_advice_set_source_target
the regressions tests of the JDK itself are (usually) an exception.
-Joe
More information about the security-dev
mailing list