aboutsummaryrefslogtreecommitdiff
path: root/tools/test/stress2/misc/rename18.sh
diff options
context:
space:
mode:
authorPeter Holm <pho@FreeBSD.org>2026-07-14 07:27:42 +0000
committerPeter Holm <pho@FreeBSD.org>2026-07-14 07:27:42 +0000
commit9c6ed9a88d3afb8bc9aba7cf852cc36e03bcd34c (patch)
tree7f1e0d287a85c8349e493376cc7c7fbc0bdb16c6 /tools/test/stress2/misc/rename18.sh
parent2e21f7e8140447c2dcbc964ff3482f12f9bd6683 (diff)
stress2: Added new test scenarios
Diffstat (limited to 'tools/test/stress2/misc/rename18.sh')
-rwxr-xr-xtools/test/stress2/misc/rename18.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/tools/test/stress2/misc/rename18.sh b/tools/test/stress2/misc/rename18.sh
new file mode 100755
index 000000000000..f71e29bb1bef
--- /dev/null
+++ b/tools/test/stress2/misc/rename18.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+# Test scenario from:
+# Bug 295826 - kern_renameat() infinite loop
+
+set -u
+root=/root
+cd $root
+mkdir -p $root/test_loop/a
+mkdir -p $root/test_loop/b
+echo '123' > $root/test_loop/b/file
+touch $root/test_loop/a/file
+mount_nullfs -o rw -o nocache -o noatime -o noexec -o nosuid $root/test_loop/b/file $root/test_loop/a/file
+echo '123' > /tmp/file
+
+# The "mv" would spin
+mv /tmp/file $root/test_loop/a/file
+
+umount $root/test_loop/a/file
+rm -rf /tmp/file $root/test_loop
+exit