On 12/09/2013 12:18 PM, Pádraig Brady wrote:
> On 12/09/2013 06:43 PM, Andreas Schwab wrote:
>> Pádraig Brady <[email protected]> writes:
>>
>>> diff --git a/tests/readlink/multi.sh b/tests/readlink/multi.sh
>>> index 3b91544..dc4ba87 100755
>>> --- a/tests/readlink/multi.sh
>>> +++ b/tests/readlink/multi.sh
>>> @@ -40,7 +40,7 @@ compare exp out || fail=1
>>>  # Note the edge case that the last xargs run may not have a delimiter
>>>  rm out || framework_failure_
>>>  printf '/1\0/1\0/1' > exp || framework_failure_
>>> -printf '/1 /1 /1' | xargs -n2 readlink -n -m --zero >> out || fail=1
>>> +printf '/1 /1 /1 ' | xargs -n2 readlink -n -m --zero >> out || fail=1
>>
>> Still wrong.
>>
>> <http://pubs.opengroup.org/onlinepubs/9699919799/utilities/xargs.html>:
>>
>>     The standard input shall be a text file.
> 
> A "text file" doesn't have to have a new line AFAIK,
> so the above should be fine.

A text file must either end in newline or be empty; your approach does
neither.

Why not just:

readlink -n -m --zero /1 /1 >> out || fail=1
readlink -n -m --zero /1 >> out || fail=1

and just avoid the printf and xargs altogether?

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to