From 4fcb997942660f02320f9965e1fd85155a1fb734 Mon Sep 17 00:00:00 2001 From: Christopher Dryden Date: Sat, 29 Nov 2025 23:30:25 +0000 Subject: [PATCH] Adding temporary root owned file in tmp folder for eperm test --- util/build-gnu.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/util/build-gnu.sh b/util/build-gnu.sh index c5bf3726710..803be39b111 100755 --- a/util/build-gnu.sh +++ b/util/build-gnu.sh @@ -355,3 +355,10 @@ test \$n_stat1 -ge \$n_stat2 \\' tests/ls/stat-free-color.sh # * the selinux crate is handling errors # * the test says "maybe we should not fail when no context available" "${SED}" -i -e "s|returns_ 1||g" tests/cp/no-ctx.sh + +# Create a file not owned by current user in the /tmp folder. This is because +# the tests/rm/fail-eperm.xpl test will skip the test if it cannot find a file that +# the run as user did not create. This file needs to be created outside of the tests. +if command -v sudo >/dev/null 2>&1; then + sudo touch /tmp/root-owned-file 2>/dev/null || true +fi