8222299: [TESTBUG] move hotspot container tests to hotspot/containers

Moved the tests, updated relevant files

Reviewed-by: dholmes, iignatyev
This commit is contained in:
Mikhailo Seledtsov 2019-04-12 12:26:29 -07:00
parent dcc0a38e8a
commit 66c817134f
18 changed files with 20 additions and 13 deletions

View File

@ -191,8 +191,8 @@ TEST FAILURE</code></pre>
<h2 id="notes-for-specific-tests">Notes for Specific Tests</h2>
<h3 id="docker-tests">Docker Tests</h3>
<p>Docker tests with default parameters may fail on systems with glibc versions not compatible with the one used in the default docker image (e.g., Oracle Linux 7.6 for x86). For example, they pass on Ubuntu 16.04 but fail on Ubuntu 18.04 if run like this on x86:</p>
<pre><code>$ make test TEST=&quot;jtreg:test/hotspot/jtreg/runtime/containers/docker&quot;</code></pre>
<pre><code>$ make test TEST=&quot;jtreg:test/hotspot/jtreg/containers/docker&quot;</code></pre>
<p>To run these tests correctly, additional parameters for the correct docker image are required on Ubuntu 18.04 by using <code>JAVA_OPTIONS</code>.</p>
<pre><code>$ make test TEST=&quot;jtreg:test/hotspot/jtreg/runtime/containers/docker&quot; JTREG=&quot;JAVA_OPTIONS=-Djdk.test.docker.image.name=ubuntu -Djdk.test.docker.image.version=latest&quot;</code></pre>
<pre><code>$ make test TEST=&quot;jtreg:test/hotspot/jtreg/containers/docker&quot; JTREG=&quot;JAVA_OPTIONS=-Djdk.test.docker.image.name=ubuntu -Djdk.test.docker.image.version=latest&quot;</code></pre>
</body>
</html>

View File

@ -381,12 +381,12 @@ Docker tests with default parameters may fail on systems with glibc versions not
compatible with the one used in the default docker image (e.g., Oracle Linux 7.6 for x86).
For example, they pass on Ubuntu 16.04 but fail on Ubuntu 18.04 if run like this on x86:
$ make test TEST="jtreg:test/hotspot/jtreg/runtime/containers/docker"
$ make test TEST="jtreg:test/hotspot/jtreg/containers/docker"
To run these tests correctly, additional parameters for the correct docker image are
required on Ubuntu 18.04 by using `JAVA_OPTIONS`.
$ make test TEST="jtreg:test/hotspot/jtreg/runtime/containers/docker" JTREG="JAVA_OPTIONS=-Djdk.test.docker.image.name=ubuntu -Djdk.test.docker.image.version=latest"
$ make test TEST="jtreg:test/hotspot/jtreg/containers/docker" JTREG="JAVA_OPTIONS=-Djdk.test.docker.image.name=ubuntu -Djdk.test.docker.image.version=latest"
---
# Override some definitions in the global css file that are not optimal for

View File

@ -79,7 +79,7 @@ gc/metaspace/CompressedClassSpaceSizeInJmapHeap.java 8193639 solaris-all
# :hotspot_runtime
runtime/SharedArchiveFile/SASymbolTableTest.java 8193639 solaris-all
runtime/containers/docker/TestCPUSets.java 8220672 generic-all
containers/docker/TestCPUSets.java 8220672 generic-all
runtime/jni/terminatedThread/TestTerminatedThread.java 8219652 aix-ppc64
#############################################################################

View File

@ -43,6 +43,7 @@ hotspot_gc = \
gc \
-gc/nvdimm
# By design this group should include ALL tests under runtime sub-directory
hotspot_runtime = \
runtime
@ -65,6 +66,9 @@ hotspot_misc = \
hotspot_native_sanity = \
native_sanity
hotspot_containers = \
containers
tier1_common = \
sanity/BasicVMTest.java \
gtest/GTestWrapper.java
@ -296,7 +300,6 @@ tier1_runtime = \
-runtime/Thread/CancellableThreadTest.java \
-runtime/Thread/TestThreadDumpMonitorContention.java \
-runtime/Unsafe/RangeCheck.java \
-runtime/containers/ \
sanity/ \
testlibrary_tests/TestMutuallyExclusivePlatformPredicates.java \
-:tier1_runtime_appcds_exclude \
@ -365,7 +368,6 @@ hotspot_tier2_runtime = \
-runtime/CommandLine/OptionsValidation/TestOptionsWithRanges.java \
-runtime/CompressedOops/UseCompressedOops.java \
-runtime/Thread/TestThreadDumpMonitorContention.java \
-runtime/containers/ \
-:tier1_runtime \
-:tier1_serviceability \
-:hotspot_tier2_runtime_platform_agnostic \
@ -379,7 +381,6 @@ hotspot_tier2_runtime_platform_agnostic = \
hotspot_tier3_runtime = \
runtime/ \
serviceability/ \
-runtime/containers/ \
-:tier1_runtime \
-:tier1_serviceability \
-:hotspot_tier2_runtime_platform_agnostic \

View File

@ -169,11 +169,17 @@ public class DockerTestUtils {
generateDockerFile(buildDir.resolve("Dockerfile"),
DockerfileConfig.getBaseImageName(),
DockerfileConfig.getBaseImageVersion());
// Build the docker
execute(DOCKER_COMMAND, "build", "--no-cache", "--tag", imageName, buildDir.toString())
.shouldHaveExitValue(0)
.shouldContain("Successfully built");
try {
// Build the docker
execute(DOCKER_COMMAND, "build", "--no-cache", "--tag", imageName, buildDir.toString())
.shouldHaveExitValue(0)
.shouldContain("Successfully built");
} catch (Exception e) {
// If docker image building fails there is a good chance it happens due to environment and/or
// configuration other than product failure. Throw jtreg skipped exception in such case
// instead of failing the test.
throw new SkippedException("Building docker image failed. Details: \n" + e.getMessage());
}
}