From 6e4d1ca83aacdfc74144aa28530176304d0008c5 Mon Sep 17 00:00:00 2001 From: Nalin Dahyabhai Date: Wed, 10 Sep 2025 15:32:27 -0400 Subject: [PATCH] tests/run.bats: "run masks" test: accept "unreadable" masked directories When checking that certain directories are masked, treat the readable-but-empty case as acceptable, as before, and now also accept actually-unreadable case, which can happen with crun 1.24. Signed-off-by: Nalin Dahyabhai --- tests/run.bats | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/run.bats b/tests/run.bats index 72a2f5501..0697d49d6 100644 --- a/tests/run.bats +++ b/tests/run.bats @@ -981,10 +981,10 @@ _EOF run_buildah from --quiet --pull=false $WITH_POLICY_JSON alpine cid=$output - for mask in /proc/acpi /proc/kcore /proc/keys /proc/latency_stats /proc/sched_debug /proc/scsi /proc/timer_list /proc/timer_stats /sys/devices/virtual/powercap /sys/firmware /sys/fs/selinux; do + for mask in /proc/acpi /proc/interrupts /proc/kcore /proc/keys /proc/latency_stats /proc/sched_debug /proc/scsi /proc/timer_list /proc/timer_stats /sys/devices/virtual/powercap /sys/firmware /sys/fs/selinux; do if test -d $mask; then - run_buildah run $cid ls $mask - expect_output "" "Directories should be empty" + run_buildah run $cid sh -c "echo $mask/*" # globbing will fail whether it's simply unreadable, or readable but empty + expect_output "$mask/*" "Directories should be empty" fi if test -f $mask; then run_buildah run $cid cat $mask