RFR (S): 6461635: [TESTBUG] BasicTests.sh test fails intermittently
mattias.tobiasson at oracle.com
Wed Nov 20 06:41:50 PST 2013
Each test requires 2 files, the actual test code and a helper file.
The helper file will launch a separate java process (called Application), and then start the actual test. The actual test will then attach to the Application.
PermissionTests.sh: Helper file that will launch Application instance and then start PermissionTest.java
PermissionTest.java: The actual test code that attaches to the Application.
It is the PermissionTests.sh that is started by jtreg (contains the "@test"-tag).
When I port PermissionTest.sh to java I would get 2 files called PermissionTest.java, so some name change is required.
I could have kept the old PermissionTest.java unchanged, but then I would need another name for the prevoius PermissionTest.sh. And I wanted a "clean" Test name for the file containing the "@test"-tag.
I used these names:
TestPermission.java: Helper file.
TestPermissionImpl.java: Actual test code.
I am still new to adding tests for open jdk. I am happy to change the names if they do not follow the naming convention.
----- Original Message -----
From: Alan.Bateman at oracle.com
To: mattias.tobiasson at oracle.com
Cc: serviceability-dev at openjdk.java.net
Sent: Wednesday, November 20, 2013 2:50:52 PM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna
Subject: Re: RFR (S): 6461635: [TESTBUG] BasicTests.sh test fails intermittently
Out of curiosity, what is the reason for the rename? I ask because we
use Basic and similar names in many areas. Also anything in the test
tree should be a test.
On 20/11/2013 13:47, Mattias Tobiasson wrote:
> Could you please review this fix.
> Summary of changes:
> 1. The real test bug fix is to add flag "-Xshare:off" when starting the "Application" instance. Without that flag, the test for ClassFileTransformer in RedefineAgent.java fails intermittently. The flag is added in function startApplication() in RunnerUtil.java.
> 2. Ported the following bash scripts to java:
> BasicTests.sh -> TestBasic.java
> PermissionTests.sh -> TestPermission.java
> ProviderTests.sh -> TestProvider.java
> 3. Renamed the java test code to avoid name clash with new java classes ported from bash script:
> BasicsTest.java -> TestBasicImpl.java
> PermissionTest.java -> TestPermissionImpl.java
> ProviderTest.java -> TestProviderImpl.java
> 4. Added some utility functions to jdk/testlibrary.
> 5. Moved exit code check from the common utility function in ProcessThread.java to the test JstatdTest.java. The check is moved to the test because other tests in the future may have other expected exit codes.
More information about the serviceability-dev