hg: tsan/dev: Update/clean/add TSAN tests

aeubanks at google.com aeubanks at google.com
Wed Apr 3 19:58:20 UTC 2019


Changeset: b09ef0dcf54c
Author:    aeubanks
Date:      2019-04-02 15:28 -0700
URL:       http://hg.openjdk.java.net/tsan/dev/rev/b09ef0dcf54c

Update/clean/add TSAN tests

Add native code that can be called by TSAN tests.
Add runTsanTestExpectFailure/Success to TsanRunner so tests don't have to repeat the success/failure checks.
Add two native tests, one racy, one not. (right now unrelated JVM races are reported so the non-racy one fails)

"make test" doesn't work since it doesn't work with LD_PRELOAD. Instead, run:
$ make jdk-image test-image
$ JTREG=path/to/jtreg
$ JDK_ROOT=path/to/tsan_jdk
$ $JTREG -e:LD_PRELOAD=/usr/lib/gcc/x86_64-linux-gnu/8/libtsan.so -jdk:$JDK_ROOT/build/images/jdk/ -nativepath:$JDK_ROOT/build/images/test/hotspot/jtreg/native/ $JDK_ROOT/test/hotspot/jtreg/tsan/
where $JDK_ROOT must be an absolute path because -nativepath only works with an absolute path.

! make/test/JtregNativeHotspot.gmk
+ test/hotspot/jtreg/tsan/AbstractNativeLoop.java
+ test/hotspot/jtreg/tsan/NonRacyNativeLoopTest.java
! test/hotspot/jtreg/tsan/RacyIntMemberLoopTest.java
+ test/hotspot/jtreg/tsan/RacyNativeLoopTest.java
! test/hotspot/jtreg/tsan/TsanRunner.java
+ test/hotspot/jtreg/tsan/libAbstractNativeLoop.c



More information about the tsan-dev mailing list