eclipse-openj9 / openj9

Eclipse OpenJ9: A Java Virtual Machine for OpenJDK that's optimized for small footprint, fast start-up, and high throughput. Builds on Eclipse OMR (https://github.com/eclipse/omr) and combines with the Extensions for OpenJDK for OpenJ9 repo.
Other
3.28k stars 722 forks source link

Include libj9ben.so native test lib in native test image #5520

Closed smlambert closed 5 years ago

smlambert commented 5 years ago

Some new vmTests will be added by @tajila that require this native test library to be included with the other native test libraries. It is currently being built, but not copied/included in native test image.

tajila commented 5 years ago

Some background info:

I am currently running the tests with these env variables after building openj9 locally.

export JAVA_BIN=/some/path/to/openj9/build/linux-x86_64-normal-server-release/images/jdk/bin
export PATH=$JAVA_BIN:$PATH
export JDK_VERSION=11
export SPEC=linux_x86-64_cmprssptrs
export BUILD_LIST=functional/Java8andUp
export JDK_IMPL=openj9
make -f run_configure.mk && make compile && make _sanity

After running the test I got unsatisfied link errors because libj9ben.so is not in a dir listed in the -Djava.library.path

I manually copy over ..build/linux-x86_64-normal-server-release/vm/libj9ben.so to the ..build/linux-x86_64-normal-server-release/images/jdk/lib/compressedrefs/ dir and the issues are resolved.

tajila commented 5 years ago

@smlambert It looks like /test/functional/Java8andUp/src/j9vm/test/jni/PthreadTest.java and /test/functional/Java8andUp/src/org/openj9/test/osthread/ReattachAfterExit.java both make use of j9ben

llxia commented 5 years ago

local runs need to set NATIVE_TEST_LIBS=<path to native test libraries> (default to native-test-libs folder at same level as JDK_HOME)

https://github.com/eclipse/openj9/blob/master/test/docs/OpenJ9TestUserGuide.md#1-configure-environment

llxia commented 5 years ago

I have an issue opened to change the default location for NATIVE_TEST_LIBS to make this more user-friendly. https://github.com/eclipse/openj9/issues/3701

pshipton commented 5 years ago

j9ben is included in the image. Perhaps the title of this Issue needs to be changed?

https://github.com/ibmruntimes/openj9-openjdk-jdk11/blob/5c13382d6b3c1a1e2ef5dd48128957adef7a60bc/closed/OpenJ9.gmk#L296

smlambert commented 5 years ago

Yes, I misunderstood @tajila 's original request. I believe the original request should be covered by #3701. I would like to confirm this with Tobi and @llxia - if it is the case, then I will close this issue.

tajila commented 5 years ago

Yes #3701 addresses my concerns. This issue can be closed

smlambert commented 5 years ago

Very good, thanks for clarifying. :)