-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[skip-ci] TMT: run system tests on Fedora #24369
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
discover: | ||
how: fmf | ||
execute: | ||
how: tmt | ||
adjust: | ||
when: "initiator == packit" | ||
because: "We need to test with updated packages from rhcontainerbot/podman-net copr" | ||
prepare+: | ||
how: shell | ||
script: sed -i -n '/^priority=/!p;$apriority=5' /etc/yum.repos.d/*:rhcontainerbot:podman-next.repo | ||
|
||
/upstream: | ||
summary: Run tests on upstream PRs | ||
discover+: | ||
filter: tag:upstream | ||
adjust+: | ||
enabled: false | ||
when: revdeps == yes or initiator is not defined or initiator != packit | ||
|
||
/downstream: | ||
summary: Run tests on bodhi / errata and dist-git PRs | ||
discover+: | ||
filter: tag:downstream | ||
adjust+: | ||
enabled: false | ||
when: initiator == packit |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- !Policy | ||
product_versions: | ||
- fedora-* | ||
decision_contexts: | ||
- bodhi_update_push_stable | ||
- bodhi_update_push_testing | ||
subject_type: koji_build | ||
rules: | ||
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional} | ||
|
||
# recipients: jnovy, lsm5, santiago | ||
--- !Policy | ||
product_versions: | ||
- rhel-* | ||
decision_context: osci_compose_gate | ||
rules: | ||
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,23 +7,12 @@ | |
%global debug_package %{nil} | ||
%endif | ||
|
||
# RHEL's default %%gobuild macro doesn't account for the BUILDTAGS variable, so we | ||
# set it separately here and do not depend on RHEL's go-[s]rpm-macros package | ||
# until that's fixed. | ||
# c9s bz: https://bugzilla.redhat.com/show_bug.cgi?id=2227328 | ||
%if %{defined rhel} && 0%{?rhel} < 10 | ||
%define gobuild(o:) go build -buildmode pie -compiler gc -tags="rpm_crashtraceback libtrust_openssl ${BUILDTAGS:-}" -ldflags "-linkmode=external -compressdwarf=false ${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags'" -a -v -x %{?**}; | ||
%endif | ||
|
||
%global gomodulesmode GO111MODULE=on | ||
|
||
%if %{defined rhel} | ||
# _user_tmpfiles.d currently undefined on rhel | ||
%global _user_tmpfilesdir %{_datadir}/user-tmpfiles.d | ||
%endif | ||
|
||
%if %{defined fedora} | ||
%define build_with_btrfs 1 | ||
# No machine stuff for rhel | ||
%define machine 1 | ||
%endif | ||
|
||
%if %{defined copr_username} | ||
|
@@ -43,6 +32,10 @@ | |
# podman-machine subpackage will be present only on these architectures | ||
%global machine_arches x86_64 aarch64 | ||
|
||
%if %{defined fedora} | ||
%define qemu 1 | ||
%endif | ||
|
||
Name: podman | ||
%if %{defined copr_build} | ||
Epoch: 102 | ||
|
@@ -187,7 +180,11 @@ when `%{_bindir}/%{name}sh` is set as a login shell or set as os.Args[0]. | |
Summary: Metapackage for setting up %{name} machine | ||
Requires: %{name} = %{epoch}:%{version}-%{release} | ||
Requires: gvisor-tap-vsock | ||
%if %{defined qemu} | ||
Requires: qemu | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note that "qemu" is a really awkward dependency - it pulls in tons of emulators, spice-server, GTK, vte291 etc. -- all stuff that you really don't want on servers. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We do not use emulation, AFAICT we call qemu-system-x86_64 on x86_64 and qemu-system-aarch64 on aarch64.
|
||
%else | ||
Requires: qemu-kvm | ||
%endif | ||
Requires: virtiofsd | ||
ExclusiveArch: x86_64 aarch64 | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -exo pipefail | ||
|
||
uname -r | ||
|
||
loginctl enable-linger "$ROOTLESS_USER" | ||
|
||
rm -rf /home/$ROOTLESS_USER/.local/share/containers | ||
|
||
rpm -q \ | ||
aardvark-dns \ | ||
buildah \ | ||
conmon \ | ||
container-selinux \ | ||
containers-common \ | ||
crun \ | ||
netavark \ | ||
passt \ | ||
podman \ | ||
podman-tests \ | ||
skopeo \ | ||
slirp4netns \ | ||
systemd |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
require: | ||
- bats | ||
- podman-remote | ||
- podman-tests | ||
- slirp4netns | ||
|
||
environment: | ||
PODMAN: /usr/bin/podman | ||
PODMAN_TESTING: /usr/bin/podman-testing | ||
QUADLET: /usr/libexec/podman/quadlet | ||
ROOTLESS_USER: "fedora" | ||
adjust+: | ||
environment+: | ||
ROOTLESS_USER: "ec2-user" | ||
when: distro == centos-stream | ||
|
||
/local-root: | ||
tag: [ downstream, upstream ] | ||
summary: local rootful test | ||
test: bash ./system.sh | ||
duration: 60m | ||
|
||
/local-rootless: | ||
tag: [ downstream, upstream ] | ||
summary: rootless test | ||
test: bash ./system.sh rootless | ||
duration: 60m | ||
|
||
/remote-root: | ||
tag: [ downstream, upstream ] | ||
summary: remote rootful test | ||
test: bash ./system.sh | ||
duration: 60m | ||
adjust+: | ||
environment+: | ||
PODMAN: /usr/bin/podman-remote | ||
|
||
/remote-rootless: | ||
tag: [ downstream, upstream ] | ||
summary: remote rootless test | ||
test: bash ./system.sh rootless | ||
duration: 60m | ||
adjust+: | ||
environment+: | ||
PODMAN: /usr/bin/podman-remote |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -exo pipefail | ||
|
||
. setup.sh | ||
|
||
export test_cmd="whoami && cd /usr/share/podman/test/system && bats ." | ||
|
||
if [[ -z $1 ]]; then | ||
eval $test_cmd | ||
elif [[ $1 == "rootless" ]]; then | ||
su --whitelist-environment=$(cat ./tmt-envvars | tr '\n' ',') - "$ROOTLESS_USER" -c "eval $test_cmd" | ||
fi | ||
exit 0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
TMT_TREE | ||
TMT_PLAN_DATA | ||
TMT_VERSION | ||
TMT_TEST_NAME | ||
TMT_TEST_DATA | ||
TMT_TEST_SERIAL_NUMBER | ||
TMT_TEST_ITERATION_ID | ||
TMT_TEST_METADATA | ||
TMT_SOURCE_DIR | ||
TMT_REBOOT_COUNT | ||
TMT_TEST_RESTART_COUNT | ||
TMT_TOPOLOGY_BASH | ||
TMT_TOPOLOGY_YAML | ||
TMT_TEST_PIDFILE | ||
TMT_TEST_PIDFILE_LOCK | ||
TMT_TEST_PIDFILE_ROOT | ||
PODMAN_TESTING | ||
QUADLET | ||
ROOTLESS_USER |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -exo pipefail | ||
|
||
. setup.sh | ||
|
||
rpm -q containers-common-extra podman toolbox | ||
|
||
su --whitelist-environment=$(cat ./tmt-envvars | tr '\n' ',') - "$ROOTLESS_USER" -c "whoami && cd /usr/share/toolbox/test/system && bats ." |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
require: | ||
- toolbox-tests | ||
|
||
/rootless: | ||
tag: [ downstream ] | ||
summary: rootless test | ||
test: bash ./toolbox-test.sh | ||
duration: 60m |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps you want
qemu-kvm
? Publishing podman-machine in RHEL without QEMU otherwise feels rather moot?