[RFR]: Update/add some tests

Arthur Eubanks aeubanks at google.com
Wed Apr 3 18:59:14 UTC 2019


New webrev: http://cr.openjdk.java.net/~aeubanks/tsantests/webrev.02

On Wed, Apr 3, 2019 at 11:30 AM Man Cao <manc at google.com> wrote:

> I wonder if it is cleaner to put the native method declaration and System.loadLibrary() call in a subclass of AbstractLoop, say "abstract class AbstractNativeLoop extends AbstractLoop".
>
> This will avoid having "@run main/othervm/native" for the TSAN tests that do not test native code.
>
> I had considered that, but was too lazy to do it. But now that you've
mentioned it I've gone ahead and done that.

>
>
> In TsanRunner.java:
>
> 35 public class TsanRunner {
>
> 36   protected native void writeNative();
>
> Is this writeNative() necessary? Seems unused.
>
Oops, removed.

>
>
> -Man
>
>
> On Wed, Apr 3, 2019 at 9:45 AM Arthur Eubanks <aeubanks at google.com> wrote:
>
>> Done.
>> http://cr.openjdk.java.net/~aeubanks/tsantests/webrev.01
>>
>> On Wed, Apr 3, 2019 at 9:20 AM Jean Christophe Beyler <
>> jcbeyler at google.com>
>> wrote:
>>
>> > Hi Arthur,
>> >
>> > Looks good to me, slight nit:
>> >
>> >
>> http://cr.openjdk.java.net/~aeubanks/tsantests/webrev.00/test/hotspot/jtreg/tsan/NonRacyNativeLoopTest.java.html
>> >
>> > The documentation of the class is wrong, it should say it is for a non
>> > racy test, no?
>> >
>> > Thanks,
>> > Jc
>> >
>> > On Tue, Apr 2, 2019 at 3:40 PM Arthur Eubanks <aeubanks at google.com>
>> wrote:
>> >
>> >> http://cr.openjdk.java.net/~aeubanks/tsantests/webrev.00/index.html
>> >>
>> >> I'll let the commit message do the talking:
>> >>
>> >> 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 some 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.
>> >>
>> >
>> >
>> > --
>> >
>> > Thanks,
>> > Jc
>> >
>>
>


More information about the tsan-dev mailing list