From 75c7a0dd27fa8f85ea31aad3df22cd947187ad76 Mon Sep 17 00:00:00 2001 From: Lokesh Mandvekar Date: Mon, 2 Feb 2026 21:26:49 +0530 Subject: [PATCH] test/system: skip "sdnotify : container" in rootless mode Skip the "sdnotify : container" test when running in rootless mode. This test uses socat to listen on the sdnotify socket and verify that READY=1 notifications are received from the container. In rootless mode on RHEL 9.2, the READY=1 notification is never received by socat, even with a 2-second sleep after systemd-notify to ensure message transmission. The test consistently sees only MAINPID (sent early in the container lifecycle) but never receives the READY=1 notification (sent after the /stop file is created). This indicates the sdnotify relay mechanism from container to podman to the external socket is not functioning properly in rootless mode in this environment. This is consistent with the other two sdnotify tests in 255-auto-update.bats that also require skipping in rootless mode due to similar notification delivery issues. Signed-off-by: Lokesh Mandvekar Signed-off-by: Chris Evich --- test/system/260-sdnotify.bats | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/test/system/260-sdnotify.bats b/test/system/260-sdnotify.bats index 59456de246..5f246700e8 100644 --- a/test/system/260-sdnotify.bats +++ b/test/system/260-sdnotify.bats @@ -132,20 +132,17 @@ READY=1" "sdnotify sent MAINPID and READY" # These tests can fail in dev. environment because of SELinux. # quick fix: chcon -t container_runtime_exec_t ./bin/podman @test "sdnotify : container" { - # Sigh... we need to pull a humongous image because it has systemd-notify. - # (IMPORTANT: fedora:32 and above silently removed systemd-notify; this - # caused CI to hang. That's why we explicitly require fedora:31) - # FIXME: is there a smaller image we could use? - local _FEDORA="$PODMAN_TEST_IMAGE_REGISTRY/$PODMAN_TEST_IMAGE_USER/fedora:31" - # Pull that image. Retry in case of flakes. - run_podman pull $_FEDORA || \ - run_podman pull $_FEDORA || \ - run_podman pull $_FEDORA + skip_if_rootless "READY=1 notification not received via socat in rootless mode" + + # Pull our systemd image. Retry in case of flakes. + run_podman pull $SYSTEMD_IMAGE || \ + run_podman pull $SYSTEMD_IMAGE || \ + run_podman pull $SYSTEMD_IMAGE export NOTIFY_SOCKET=$PODMAN_TMPDIR/container.sock _start_socat - run_podman run -d --sdnotify=container $_FEDORA \ + run_podman run -d --sdnotify=container $SYSTEMD_IMAGE \ sh -c 'printenv NOTIFY_SOCKET;echo READY;systemd-notify --ready;while ! test -f /stop;do sleep 0.1;done' cid="$output" wait_for_ready $cid