[PATCH] Request for Review: Override TESTDIRS correctly in tests

Erik Joelsson erik.joelsson at oracle.com
Fri Jan 4 13:54:13 UTC 2019


On 2019-01-04 13:36, Siddhesh Poyarekar wrote:
> On 04/01/19 5:57 PM, Erik Joelsson wrote:
>> I'm curious about what you are trying to do to end up needing this 
>> override. The old test makefiles have a very confusing UI and my 
>> guess is that you are using input variables (TESTDIRS) with a target 
>> they aren't meant for.
>
> I was originally using this for jdk8u and that's where I had to use 
> TESTDIRS to ensure that I was running all tests instead of a limited 
> set that the default make test was running in hotspot.
>
So what you want to achieve is running all the tests in hotspot/test? I 
doubt that's a very good idea, but you should be able to achieve that 
with this command line:

make test TEST=jtreg_tests TESTDIRS=../hotspot/test/.

The TESTDIRS parameter is only valid with the "jtreg_tests" target in 
test/Makefile, which you reach by setting the "TEST" variable on the 
command line to the top level target "test". Other targets in 
test/Makefile correspond to jtreg test groups.

The suggested patch looks like it risks breaking other use cases. I 
would avoid tinkering with those makefiles unless absolutely necessary 
as they are brittle (which is why we rewrote them).

/Erik

>> Instead of trying to fix this, I would strongly recommend moving away 
>> from using the makefiles in test/ as those are deprecated and will be 
>> removed eventually. We have a new makefile framework for running tests.
>
> Thanks, I'll use this for tip.
>
>> See doc/testing.md for details on how to use it. From a user 
>> perspective it's far easier to use and much more powerful, as well as 
>> reasonably well documented.
>
> I posted a patch to fix this for 8u[1] and was advised[2] to fix this 
> in tip too since the override existed there as well and then request a 
> backport.  If the fix is not required for tip, should I make a request 
> to only fix this in jdk8u?
>
> Thanks,
> Siddhesh
>
> [1] 
> https://mail.openjdk.java.net/pipermail/jdk8u-dev/2018-December/008340.html
> [2] 
> https://mail.openjdk.java.net/pipermail/jdk8u-dev/2019-January/008355.html



More information about the build-dev mailing list