[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: coreutils-8.15.74-be17e3 on OpenBSD
From: |
Pádraig Brady |
Subject: |
Re: coreutils-8.15.74-be17e3 on OpenBSD |
Date: |
Sat, 17 Mar 2012 10:16:46 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0 |
On 03/17/2012 10:11 AM, Jim Meyering wrote:
> Pádraig Brady wrote:
>> This is from the dd/sparse failure:
>>
>> On 03/17/2012 02:31 AM, Bruno Haible wrote:
>>> + alloc_equal file.in file.out
>>> + : 4
>>> +++ stat -c %b file.in
>>> +++ stat -c %b file.out
>>> ++ expr 4160 - 4128
>>> + alloc_diff=32
>>> ++ echo 32
>>> ++ tr -d -- -
>>> + alloc_diff=32
>>> + test 32 -le 4
>>> + fail=1
>>
>> That confirms that sparse granularity is
>> coarser than I assumed on the BSDs.
>>
>> Perhaps this is appropriate:
>>
>> diff --git a/tests/dd/sparse b/tests/dd/sparse
>> index 17aa94b..203e103 100755
>> --- a/tests/dd/sparse
>> +++ b/tests/dd/sparse
>> @@ -51,10 +51,10 @@ dd if=/dev/urandom of=file.in bs=1M count=1 conv=notrunc
>> oflag=append
>> # but can vary by a file system block due to alignment,
>> # which was seen on XFS at least.
>> alloc_equal() {
>> - : ${sectors_per_block:=$(expr $(stat -f -c "%S" .) / 512)}
>> + : ${sectors_per_sparse_block:=$(expr $(stat -f -c "%S" .) / 64)}
>> alloc_diff=$(expr $(stat -c %b "$1") - $(stat -c %b "$2"))
>> alloc_diff=$(echo $alloc_diff | tr -d -- -) # abs()
>> - test $alloc_diff -le $sectors_per_block
>> + test $alloc_diff -le $sectors_per_sparse_block
>> }
>
> Thanks. That looks fine.
> I've just confirmed that it passes on gcc66 (sparc64 OpenBSD 5.1)
Or maybe `stat -c %o` is less arbitrary and seemed
to work previously in another test even though
it doesn't seem like it should directly correlate.
Anyway signing off now.
cheers,
Pádraig
- coreutils-8.15.74-be17e3: testsuite failures on NetBSD, (continued)
- coreutils-8.15.74-be17e3: testsuite failures on NetBSD, Stefano Lattarini, 2012/03/16
- coreutils-8.15.74-be17e3 on Linux/glibc, Bruno Haible, 2012/03/16
- coreutils-8.15.74-be17e3 on FreeBSD 6.4, Bruno Haible, 2012/03/16
- coreutils-8.15.74-be17e3 on NetBSD 5.1, Bruno Haible, 2012/03/16
- coreutils-8.15.74-be17e3 on OpenBSD, Bruno Haible, 2012/03/16
- Re: coreutils-8.15.74-be17e3 on OpenBSD, Jim Meyering, 2012/03/17
- Re: coreutils-8.15.74-be17e3 on OpenBSD, Jim Meyering, 2012/03/17
coreutils-8.15.74-be17e3 on AIX, Bruno Haible, 2012/03/16
coreutils-8.15.74-be17e3 on HP-UX 11, Bruno Haible, 2012/03/16
coreutils-8.15.74-be17e3 on Solaris, Bruno Haible, 2012/03/16