[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] tests: sync: also test that -d and -f don't block on a FIFO
|
From: |
Collin Funk |
|
Subject: |
Re: [PATCH] tests: sync: also test that -d and -f don't block on a FIFO |
|
Date: |
Mon, 19 Jan 2026 11:29:51 -0800 |
|
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Pádraig Brady <P@draigBrady.com> writes:
> On 18/01/2026 22:06, Collin Funk wrote:
>> * tests/misc/sync.sh: Check 'sync fifo' with no arguments, -d, and -f
>> separately.
>> ---
>> tests/misc/sync.sh | 4 +++-
>> 1 file changed, 3 insertions(+), 1 deletion(-)
>> diff --git a/tests/misc/sync.sh b/tests/misc/sync.sh
>> index b3785e0f3..a7cace6fd 100755
>> --- a/tests/misc/sync.sh
>> +++ b/tests/misc/sync.sh
>> @@ -52,7 +52,9 @@ fi
>> if test "$fail" != '1'; then
>> # Ensure a fifo doesn't block
>> mkfifo_or_skip_ fifo
>> - returns_ 124 timeout 10 sync fifo && fail=1
>> + for opt in '' '-f' '-d'; do
>> + returns_ 124 timeout 10 sync $opt fifo && fail=1
>> + done
>> fi
>> Exit $fail
>
> sync -f is potentially expensive.
> Perhaps add this line as the first in the loop?
>
> test "$opt" = '-f' && test "$RUN_EXPENSIVE_TESTS" != yes && continue
Good point. Pushed it with that change and my other patch [1] [2].
Collin
[1]
https://github.com/coreutils/coreutils/commit/aac817f34b8c0c6fec7854a01928930f416c2949
[2]
https://github.com/coreutils/coreutils/commit/521a389635b40c674db685271d17743d647cfd60