From 660f8744883563aaad7a36b31b5ab45d9d4c539c Mon Sep 17 00:00:00 2001 From: Auke Kok Date: Tue, 13 May 2025 16:10:46 -0700 Subject: [PATCH] Use T_D0/1 instead of T_M0 here. Use of T_M0 and variants should be reserved for e.g. scoutfs -p type of usages. Tests should create individual content files in the assigned subdirectory. Signed-off-by: Auke Kok --- tests/tests/renameat2-noreplace.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/tests/renameat2-noreplace.sh b/tests/tests/renameat2-noreplace.sh index 78045e8a..4a5be5ce 100644 --- a/tests/tests/renameat2-noreplace.sh +++ b/tests/tests/renameat2-noreplace.sh @@ -8,19 +8,19 @@ t_require_mounts 2 echo "=== renameat2 noreplace flag test" # give each mount their own dir (lock group) to minimize create contention -mkdir $T_M0/dir0 -mkdir $T_M1/dir1 +mkdir $T_D0/dir0 +mkdir $T_D1/dir1 echo "=== run two asynchronous calls to renameat2 NOREPLACE" for i in $(seq 0 100); do # prepare inputs in isolation - touch "$T_M0/dir0/old0" - touch "$T_M1/dir1/old1" + touch "$T_D0/dir0/old0" + touch "$T_D1/dir1/old1" # race doing noreplace renames, both can't succeed - dumb_renameat2 -n "$T_M0/dir0/old0" "$T_M0/dir0/sharednew" 2> /dev/null & + dumb_renameat2 -n "$T_D0/dir0/old0" "$T_D0/dir0/sharednew" 2> /dev/null & pid0=$! - dumb_renameat2 -n "$T_M1/dir1/old1" "$T_M1/dir0/sharednew" 2> /dev/null & + dumb_renameat2 -n "$T_D1/dir1/old1" "$T_D1/dir0/sharednew" 2> /dev/null & pid1=$! wait $pid0 @@ -31,7 +31,7 @@ for i in $(seq 0 100); do test "$rc0" == 0 -a "$rc1" == 0 && t_fail "both renames succeeded" # blow away possible files for either race outcome - rm -f "$T_M0/dir0/old0" "$T_M1/dir1/old1" "$T_M0/dir0/sharednew" "$T_M1/dir1/sharednew" + rm -f "$T_D0/dir0/old0" "$T_D1/dir1/old1" "$T_D0/dir0/sharednew" "$T_D1/dir1/sharednew" done t_pass