Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0
On 10/10/2011 08:40 AM, Jim Meyering wrote:
> Pádraig Brady wrote:
>> On 10/08/2011 03:46 PM, Bruno Haible wrote:
>>> On NetBSD 5.1/x86: 10 failures
>>>
>>> FAIL: split/l-chunk
>>
>> This one at least was due to missing /dev/zero
>> which is not required by POSIX so the attached
>> skips the tests requiring it.
>
> Thanks for the patch.
>
>> From 274a4bff32efb2fb483d19d9884e3f1be03cf849 Mon Sep 17 00:00:00 2001
>> From: =?UTF-8?q?P=C3=A1draig=20Brady?= <address@hidden>
>> Date: Sun, 9 Oct 2011 23:30:02 +0100
>> Subject: [PATCH] tests: don't assume the existence of /dev/zero
>>
>> /dev/zero is not defined by POSIX and is
>> not available on NetBSD at least.
>>
> ...
>> +# TODO: we might relax this requirement in some tests, if
>> +# for example, truncate --alloc (posix_fallocate) is implemented.
>> +require_dev_zero_()
>> +{
>> + test -c /dev/zero ||
>> + skip_ "This test requires /dev/zero support."
>> +}
>
> This TODO seems like good justification for adding the truncate option.
>
> However, just to be a little paranoid, it might be better
> to ensure that we can actually read from it, too.
>
> What do you think about a syntax-check that requires a use of
> require_dev_zero_ in each file under tests/ that uses /dev/zero?
>
I've updated the patch to do both of the above suggestions.
However it probably shouldn't be applied unless we're
targetting systems without /dev/zero.
cheers,
Pádraig.