spiegel_podman/test/e2e
rcmadhankumar 6f775c9091 [v5.4-rhel] Fix: Remove appending rw as the default mount option
The backstory for this is that runc 1.2 (opencontainers/runc#3967)
fixed a long-standing bug in our mount flag handling (a bug that crun
still has). Before runc 1.2, when dealing with locked mount flags that
user namespaced containers cannot clear, trying to explicitly clearing
locked flags (like rw clearing MS_RDONLY) would silently ignore the rw
flag in most cases and would result in a read-only mount. This is
obviously not what the user expects.

What runc 1.2 did is that it made it so that passing clearing flags
like rw would always result in an attempt to clear the flag (which was
not the case before), and would (in all cases) explicitly return an
error if we try to clear locking flags. (This also let us finally fix a
bunch of other long-standing issues with locked mount flags causing
seemingly spurious errors).

The problem is that podman sets rw on all mounts by default (even if
the user doesn't specify anything). This is actually a no-op in
runc 1.1 and crun because of a bug in how clearing flags were handled
(rw is the absence of MS_RDONLY but until runc 1.2 we didn't correctly
track clearing flags like that, meaning that rw would literally be
handled as if it were not set at all by users) but in runc 1.2 leads to
unfortunate breakages and a subtle change in behaviour (before, a ro
mount being bind-mounted into a container would also be ro -- though
due to the above bug even setting rw explicitly would result in ro in
most cases -- but with runc 1.2 the mount will always be rw even if
the user didn't explicitly request it which most users would find
surprising). By the way, this "always set rw" behaviour is a departure
from Docker and it is not necesssary.

Fixes: https://issues.redhat.com/browse/RHEL-152635,
https://issues.redhat.com/browse/RHEL-152631

Signed-off-by: rcmadhankumar <madhankumar.chellamuthu@suse.com>
(cherry picked from commit bf7dcd5619)
Signed-off-by: Tom Sweeney <tsweeney@redhat.com>
2026-03-05 16:29:45 -05:00
..
build prune: support clearing build cache using CleanCacheMount 2024-09-05 10:40:07 -07:00
cdi build(deps): bump github.com/container-orchestrated-devices/container-device-interface 2023-02-20 14:51:04 +01:00
config Read kube_generate_type from containers.conf 2023-04-11 09:15:05 -04:00
quadlet Merge pull request #25011 from AhmedMoalla/fix-wrongly-ported-cunescape_one 2025-01-15 11:44:56 +00:00
sign e2e: reduce dependency on /tmp for e2e tests 2023-01-26 22:20:15 +09:00
testdata CI: e2e: use distinct ports, not just 5000 2024-02-27 04:30:26 -07:00
artifact_test.go [v5.4-rhel] wire up --retry-delay for artifact pull 2025-03-05 14:35:48 -05:00
attach_test.go Use PodmanExitCleanly in attach_test.go 2025-01-09 18:47:37 +01:00
build_test.go Add nohosts option to /build and /libpod/build 2024-11-24 22:00:31 -05:00
checkpoint_image_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
checkpoint_test.go Pass all of PodmanExecOptions to various [mM]akeOptions functions 2025-01-23 00:03:52 +01:00
cleanup_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
commit_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
common_test.go test/e2e: improve write/removeConf() 2025-02-04 15:13:00 -05:00
config.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
config_amd64.go pasta udp tests: new bytecheck helper 2024-10-16 10:15:19 -06:00
config_arm64.go pasta udp tests: new bytecheck helper 2024-10-16 10:15:19 -06:00
config_ppc64le.go pasta udp tests: new bytecheck helper 2024-10-16 10:15:19 -06:00
container_clone_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
container_create_volume_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
container_iface_name_test.go Bump VMs. ShellCheck is now built-in 2024-09-09 06:16:20 -06:00
container_inspect_test.go Add ExposedPorts to Inspect's ContainerConfig 2024-10-01 07:54:52 -04:00
containers_conf_test.go Pass container hostname to netavark 2025-01-06 07:09:12 -07:00
cp_test.go Mount volumes before copying into a container 2024-11-27 08:09:50 -05:00
create_staticip_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
create_staticmac_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
create_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
diff_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
events_test.go Log network creation and removal events in Podman 2024-11-05 11:58:47 +00:00
exec_test.go oci: report empty exec path as ENOENT 2025-04-02 15:25:18 +02:00
exists_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
export_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
farm_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
generate_kube_test.go Add support for Job to kube generate & play 2024-09-05 11:36:38 -04:00
generate_spec_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
generate_systemd_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
healthcheck_run_test.go [v5.4-rhel] Fix: Ensure HealthCheck exec session terminates on timeout 2025-06-18 08:42:57 +02:00
history_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
image_scp_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
image_sign_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
images_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
import_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
info_test.go Add BuildOrigin field to podman info 2025-02-04 15:17:24 -05:00
init_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
inspect_test.go [v5.4-rhel] podman inspect: fix error difference between local... 2026-01-22 14:10:39 -05:00
kill_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
libpod_suite_remote_test.go Eliminate PodmanSystemdScope 2025-01-23 01:10:18 +01:00
libpod_suite_test.go Eliminate PodmanSystemdScope 2025-01-23 01:10:18 +01:00
load_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
login_logout_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
logs_test.go bump go to 1.22 2024-09-03 15:14:15 +02:00
manifest_test.go Pass all of PodmanExecOptions to various [mM]akeOptions functions 2025-01-23 00:03:52 +01:00
mount_rootless_test.go Pass all of PodmanExecOptions to various [mM]akeOptions functions 2025-01-23 00:03:52 +01:00
mount_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
negative_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
network_connect_disconnect_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
network_create_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
network_test.go Set network ID if available during container inspect 2025-01-20 15:55:26 +01:00
pause_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
play_build_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
play_kube_test.go [v5.4-rhel] Fix: Remove appending rw as the default mount option 2026-03-05 16:29:45 -05:00
pod_clone_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
pod_create_test.go Add --no-hostname option 2025-01-15 06:51:32 -05:00
pod_infra_container_test.go bump go to 1.22 2024-09-03 15:14:15 +02:00
pod_initcontainers_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
pod_inspect_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
pod_kill_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
pod_pause_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
pod_pod_namespaces_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
pod_prune_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
pod_ps_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
pod_restart_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
pod_rm_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
pod_start_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
pod_stats_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
pod_stop_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
pod_top_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
port_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
prune_test.go Clean up after unexpectedly terminated build 2025-01-27 14:21:27 +01:00
ps_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
pull_test.go Update expected errors when pulling encrypted images 2025-01-23 00:11:24 +01:00
push_test.go Add a test for forcing compression and v2s2 format 2024-11-29 12:40:49 +00:00
quadlet_test.go Add support to ShmSize in Pods with Quadlet 2024-12-30 12:33:00 -03:00
rename_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
restart_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
rm_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
rmi_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
run_aardvark_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
run_apparmor_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
run_cgroup_parent_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
run_cleanup_test.go Pass all of PodmanExecOptions to various [mM]akeOptions functions 2025-01-23 00:03:52 +01:00
run_cpu_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
run_device_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
run_dns_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
run_entrypoint_test.go oci: report empty exec path as ENOENT 2025-04-02 15:25:18 +02:00
run_env_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
run_exit_test.go oci: report empty exec path as ENOENT 2025-04-02 15:25:18 +02:00
run_memory_test.go bump go to 1.22 2024-09-03 15:14:15 +02:00
run_networking_test.go ps: fix display of exposed ports 2024-10-23 15:03:30 +02:00
run_ns_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
run_passwd_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
run_privileged_test.go Switch to moby/sys/capability 2024-10-01 12:52:18 -07:00
run_restart_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
run_seccomp_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
run_security_labels_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
run_selinux_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
run_signal_test.go test/e2e: fix default signal exit code test 2024-10-15 15:17:50 +02:00
run_staticip_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
run_test.go test: remove duplicate test 2025-04-02 15:25:04 +02:00
run_transient_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
run_userns_test.go namespaces: allow configuring keep-id userns size 2025-01-08 10:08:29 +01:00
run_volume_test.go [v5.4-rhel] do not pass [no]copy as bind mounts options to runtime 2025-12-19 14:22:43 -05:00
run_working_dir_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
runlabel_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
save_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
search_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
secret_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
start_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
stats_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
stop_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
system_connection_test.go New system connection add tests 2024-11-07 17:48:27 +01:00
system_df_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
system_dial_stdio_test.go test/system: remove system dial-stdio test 2024-12-17 17:04:17 +01:00
system_reset_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
systemd_activate_test.go Pass all of PodmanExecOptions to various [mM]akeOptions functions 2025-01-23 00:03:52 +01:00
systemd_test.go Merge pull request #23650 from Luap99/e2e-systemd-rm 2024-08-19 13:21:26 +00:00
tag_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
toolbox_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
top_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
tree_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
trust_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
unshare_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
untag_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
update_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
version_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
volume_create_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
volume_exists_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
volume_inspect_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
volume_ls_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
volume_plugin_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
volume_prune_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
volume_rm_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
wait_test.go wait: fix handling of multiple conditions with exited 2024-09-17 17:35:17 +02:00