Skip to content

Commit 836bf61

Browse files
committed
Adding temporary root owned file in tmp folder for eperm test
1 parent 821c674 commit 836bf61

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

util/build-gnu.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,3 +355,10 @@ test \$n_stat1 -ge \$n_stat2 \\' tests/ls/stat-free-color.sh
355355
# * the selinux crate is handling errors
356356
# * the test says "maybe we should not fail when no context available"
357357
"${SED}" -i -e "s|returns_ 1||g" tests/cp/no-ctx.sh
358+
359+
# Create a file not owned by current user in the /tmp folder. This is because
360+
# the tests/rm/fail-eperm.xpl test will skip the test if it cannot find a file that
361+
# the runas user did not create. This file needs to be created outside of the tests.
362+
if command -v sudo >/dev/null 2>&1; then
363+
sudo touch /tmp/root-owned-file 2>/dev/null || true
364+
fi

0 commit comments

Comments
 (0)