This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] sysconf: Fix missing definition of UIO_MAXIOV on Linux [BZ #22321]


On 10/19/2017 12:21 PM, Florian Weimer wrote:
> On 10/19/2017 09:13 PM, Carlos O'Donell wrote:
>>> +  TEST_VERIFY (IOV_MAX == uio_maxiov_value ());
>>> +  TEST_VERIFY (UIO_MAXIOV == uio_maxiov_value ());
>>> +  TEST_VERIFY (sysconf (_SC_UIO_MAXIOV) == uio_maxiov_value ());
>>> +  TEST_VERIFY (sysconf (_SC_IOV_MAX) == uio_maxiov_value ());
> 
>> Is there an expectation that the value, although consistent,
>> should not be -1?
>>
>> e.g.
>> TEST_VERIFY (IOV_MAX != -1);
>> TEST_VERIFY (UIOV_MAX != -1);
>>
>> Do we need to verify it is >= _XOPEN_IOV_MAX?
>>
>> e.g.
>> TEST_VERIFY (IOV_MAX >= _XOPEN_IOV_MAX);
>> TEST_VERIFY (UIOV_MAX >= _XOPEN_IOV_MAX);
> 
> Should I add
> 
>   TEST_VERIFY (uio_maxiov_value () >= _XOPEN_IOV_MAX);
> 
> ?
> 
> That would indirectly cover all the additional tests you suggest.

... unless _XOPEN_IOV_MAX is incorrectly defined to -1? :-)

-- 
Cheers,
Carlos.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]