Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hotspot_container tests to the openjdk test group #4143

Closed
smlambert opened this issue Nov 11, 2022 · 3 comments · Fixed by #4147
Closed

Add hotspot_container tests to the openjdk test group #4143

smlambert opened this issue Nov 11, 2022 · 3 comments · Fixed by #4147
Assignees

Comments

@smlambert
Copy link
Contributor

We should be adding the hotspot_containers target to the openjdk/playlist nearby the other hotspot_misc targets that we already have (see hotspot_compiler, hotspot_gc, hotspot_runtime, hotspot_serviceability)

	<test>
		<testCaseName>hotspot_container</testCaseName>
		<variations>
			<variation>Mode150</variation>
			<variation>Mode650</variation>
			<variation>Mode1000</variation>
		</variations>
		<command>$(JAVA_COMMAND) -Xmx512m -jar $(Q)$(TEST_RESROOT)$(D)jtreg$(D)lib$(D)jtreg.jar$(Q) \
	$(JTREG_BASIC_OPTIONS) $(JVM_NATIVE_OPTIONS) -vmoptions:$(Q)-Xmx512m $(JVM_OPTIONS) $(VMOPTION_HEADLESS)$(Q) \
	-w $(Q)$(REPORTDIR)$(D)work$(Q) \
	-r $(Q)$(REPORTDIR)$(D)report$(Q) \
	-jdk:$(Q)$(TEST_JDK_HOME)$(Q) \
	-exclude:$(Q)$(JTREG_HOTSPOT_TEST_DIR)$(D)ProblemList.txt$(Q) \
	-exclude:$(Q)$(TEST_RESROOT)$(D)$(PROBLEM_LIST_FILE)$(Q) \
	${FEATURE_PROBLEM_LIST_FILE} \
	${VENDOR_PROBLEM_LIST_FILE} \
	$(Q)$(JTREG_HOTSPOT_TEST_DIR):hotspot_container$(Q); \
	$(TEST_STATUS)</command>
		<versions>
			<version>17+</version>
		</versions>
		<levels>
			<level>extended</level>
		</levels>
		<groups>
			<group>openjdk</group>
		</groups>
		<impls>
			<impl>hotspot</impl>
		</impls>
	</test>

There may be an implication here that we need the test machines to have Docker installed, so presume we may need to check whether we need an infrastructure issue also created and of course disable these container tests from the appropriate platforms where it is not available). For now we can create a PR and run some tests across platforms to see how these tests behave.

The tests may skip themselves from running if machine canTestDocker in which case we may not need to add restrictions in the playlist as to where they can run, TBD.

@jerboaa
Copy link
Contributor

jerboaa commented Nov 11, 2022

These tests verify that the container detection code in OpenJDK works as expected. They'd be relevant for JDK 8, 11, 17 and latest. The basic mode of operation of those tests is that they build a Dockerfile (for the specific test) and then run the test JDK inside a container expecting specific behaviour. There will be some setup required (I think) as it's probably not a wise idea to run those tests already in a container (container in container?). Also, it would be good to know the setup where those tests run. In particular its useful to know which cgroup version the test-host is using (cgroup v1 vs cgroup v2). This is mostly useful for failure analysis. A basic test for this could be:

cg v1:

$ stat -f --format '%T' /sys/fs/cgroup
tmpfs

cg v2:

$ stat -f --format '%T' /sys/fs/cgroup
cgroup2fs

Those container tests are relevant for Linux only. Other OSes don't have the (cgroup kernel) feature.

@jerboaa
Copy link
Contributor

jerboaa commented Nov 15, 2022

I've opened an infra request ticket for cg v1 and cg v2 setups for Linux (x86_64 should be fine for starters): adoptium/infrastructure#2817

jerboaa added a commit to jerboaa/aqa-tests that referenced this issue Nov 15, 2022
@jerboaa
Copy link
Contributor

jerboaa commented Nov 16, 2022

Once this is fixed, we should remove excluded tests for JDK 8 done by #3885. I see that those are excluded not only for linux-aarch64, but for linux-all by now.

The real fix is to use a base image which is available on those architectures. The proposed UBI 8 image is available for x86_64, ppc64, aarch64 and s390x (s390x for JDK 11+)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants