RFR (M): First JTREG Tsan test

Jean Christophe Beyler jcbeyler at google.com
Fri Mar 22 04:01:36 UTC 2019


Hi Man and Daniil,

Thanks for the review :-)

I inlined my answers Man:

On Thu, Mar 21, 2019 at 8:38 PM Man Cao <manc at google.com> wrote:

> 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?
>
>
Because I put the @requires Xint since it would not work otherwise for the
first step that we are going for, you need to tell JTREG to use Xint or it
skips the test :)
make run-test JTREG="VM_OPTIONS=-Xint"
TEST="jtreg:test/hotspot/jtreg/tsan/RacyIntMemberLoopTest.java"

Later down the road, maybe we could remove it but I'd like for now to leave
the @requires since really we should not try to run it without...



> 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.+"?
>
>
Good point, I had just simplified it compared to what we had but missed the
hexa letters. I added them (I rather that then the . version we had.


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

True, there are some but also some without the name at all. Removed it.

New webrev is here:

Thanks,
Jc


More information about the tsan-dev mailing list