Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion container.te
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,6 @@ manage_sock_files_pattern(container_runtime_domain, container_var_run_t, contain
manage_lnk_files_pattern(container_runtime_domain, container_var_run_t, container_var_run_t)
files_pid_filetrans(container_runtime_domain, container_var_run_t, { dir file lnk_file sock_file })
files_tmp_filetrans(container_runtime_domain, container_var_run_t, { dir file lnk_file sock_file })
userdom_user_tmp_filetrans(container_runtime_domain, container_var_run_t, { dir file lnk_file sock_file })
allow container_runtime_domain container_var_run_t:dir_file_class_set relabelfrom;

allow container_runtime_domain container_devpts_t:chr_file { relabelfrom rw_chr_file_perms setattr_chr_file_perms };
Expand Down
20 changes: 20 additions & 0 deletions plans/main.fmf
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,23 @@ prepare:
fi
dnf -y upgrade --allowerasing
order: 20
- name: Disable installing everything from srpm
how: install
exclude:
- ".*"
- name: Install the main package
how: install
package:
- container-selinux

/basic_check:
discover+:
test: /test/basic_check

/podman_rootful_system:
discover+:
test: /test/podman_rootful_system

/podman_rootless_system:
discover+:
test: /test/podman_rootless_system
23 changes: 20 additions & 3 deletions test/main.fmf
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
require:
- attr
- bats
- container-selinux
- podman-tests
- policycoreutils
recommend:
- bats

/basic_check:
summary: Run basic checks
Expand All @@ -12,6 +13,22 @@ require:
semodule -B
rpm -Vqf /var/lib/selinux/*/active/modules/200/container

/podman_system_test:
/podman_rootful_system:
summary: Run SELinux specific Podman system tests
test: bash ./podman-tests.sh
test: bash ./podman-rootful-tests.sh

/podman_rootless_system:
summary: Run rootless Podman system tests
test: bash ./podman-rootless-tests.sh
require+:
- passt
- passt-selinux
environment:
ROOTLESS_USER: "fedora"
adjust:
- when: distro == centos-stream
environment+:
ROOTLESS_USER: "ec2-user"
- when: distro == rhel
environment+:
ROOTLESS_USER: "cloud-user"
File renamed without changes.
15 changes: 15 additions & 0 deletions test/podman-rootless-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash

set -exo pipefail

cat /etc/redhat-release

# Print versions of distro and installed packages
rpm -q bats container-selinux passt passt-selinux podman podman-tests policycoreutils selinux-policy

loginctl enable-linger "$ROOTLESS_USER"

# Run podman system tests
su - "$ROOTLESS_USER" -c "bats /usr/share/podman/test/system/410-selinux.bats"
su - "$ROOTLESS_USER" -c "bats /usr/share/podman/test/system/500-networking.bats"
su - "$ROOTLESS_USER" -c bats "/usr/share/podman/test/system/505-networking-pasta.bats"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That does not actually work I think

Suggested change
su - "$ROOTLESS_USER" -c bats "/usr/share/podman/test/system/505-networking-pasta.bats"
su - "$ROOTLESS_USER" -c "bats /usr/share/podman/test/system/505-networking-pasta.bats"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ugh my bad on that one. I'll leave it to @sbrivio-rh to accept the suggestion. But it shouldn't affect 500-networking.bats.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait, sorry, what should I review / accept exactly?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you see the option to Sign off and commit suggestion in @Luap99's comment ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well the "Sign off and commit suggestion" is just "garbage" commit message wise, it creates a new commit with a totally useless title. My recommendation is also apply the chnage locally squash it into the right commit and force push again