From d08eb66adc1dafcbbda69d67a1800665a0cd6f7c Mon Sep 17 00:00:00 2001 From: Auke Kok Date: Thu, 8 May 2025 11:28:24 -0700 Subject: [PATCH] Give enospc test more time to commit unlink. The current test sequence performs the unlink and immediately tests whether enough resources are available to create new files again, and this consistently fails. One of my crummy VMs takes a good 12 seconds before the `touch` actually succeeds. We care about the filesystem eventually returning from ENOSPC, and certainly we don't want it to take forever, but there is a period after our first ENOSPC error and cleanup that we expect ENOSPC to fail for a bit longer. Make the timeout 120s. As soon as the `touch` completes, exit the wait loop. Signed-off-by: Auke Kok --- tests/tests/enospc.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/tests/enospc.sh b/tests/tests/enospc.sh index 277bfae0..f3ade8f0 100644 --- a/tests/tests/enospc.sh +++ b/tests/tests/enospc.sh @@ -88,6 +88,11 @@ rm -rf "$SCR/xattrs" echo "== make sure we can create again" file="$SCR/file-after" +C=120 +while (( C-- )); do + touch $file 2> /dev/null && break + sleep 1 +done touch $file setfattr -n user.scoutfs-enospc -v 1 "$file" sync