RFR (M): First JTREG Tsan test

Man Cao manc at google.com
Fri Mar 22 03:38:26 UTC 2019


I couldn't run this test with "make run-test
TEST="jtreg:test/hotspot/jtreg/tsan/RacyIntMemberLoopTest.java"", I got the
following messages:

Test selection 'jtreg:test/hotspot/jtreg/tsan/RacyIntMemberLoopTest.java',
will run:
* jtreg:test/hotspot/jtreg/tsan/RacyIntMemberLoopTest.java
Running test 'jtreg:test/hotspot/jtreg/tsan/RacyIntMemberLoopTest.java'
Test results: no tests selected
Report written to
/usr/local/google/home/manc/ws/tsanBuild/test-results/jtreg_test_hotspot_jtreg_tsan_RacyIntMemberLoopTest_java/html/report.html
Results written to
/usr/local/google/home/manc/ws/tsanBuild/test-support/jtreg_test_hotspot_jtreg_tsan_RacyIntMemberLoopTest_java
Finished running test
'jtreg:test/hotspot/jtreg/tsan/RacyIntMemberLoopTest.java'
Test report is stored in
/usr/local/google/home/manc/ws/tsanBuild/test-results/jtreg_test_hotspot_jtreg_tsan_RacyIntMemberLoopTest_java

==============================
Test summary
==============================
   TEST                                              TOTAL  PASS  FAIL
ERROR
   jtreg:test/hotspot/jtreg/tsan/RacyIntMemberLoopTest.java
                                                         0     0     0
 0
==============================
TEST SUCCESS

If I run "make run-test
TEST="jtreg:test/hotspot/jtreg/gc/TestNoPerfCounter.java"", it will show
something like:

Running test 'jtreg:test/hotspot/jtreg/gc/TestNoPerfCounter.java'
Passed: gc/TestNoPerfCounter.java
Test results: passed: 1
...
   TEST                                              TOTAL  PASS  FAIL
ERROR
   jtreg:test/hotspot/jtreg/gc/TestNoPerfCounter.java
                                                         1     1     0
 0

Is there anything I'm missing here to run this test?

Below are code comments:

In RacyIntMemberLoopTest.java

48           .shouldMatch("(Read|Write) of size 4 at 0x[0-9]+ by
thread T[0-9]+")

"0x[0-9]+" might be wrong to match an address. Should it be
"0x[0-9a-fA-F]+" or just "0x.+"?

Nit:
The test name typically does not end in ".java".
/* @test RacyIntMemberLoopTest.java

-Man


More information about the tsan-dev mailing list