[LTP] [PATCH v2 2/2] Rewrite utsname testing suite

Andrea Cervesato andrea.cervesato@suse.com
Mon Oct 31 14:14:21 CET 2022


Hi
On 10/31/22 13:59, Petr Vorel wrote:
> Hi Andrea,
>
>> +#define _GNU_SOURCE
>> +
>> +#include "tst_test.h"
>> +#include "utsname.h"
>> +
>> +#define HLEN 100
> Could this definition be in utsname.h?
> Also, although getconf HOST_NAME_MAX returns 64 on my machine, maybe using from
> HOST_NAME_MAX would be safer (that can be up to 255).
> Also maybe HOSTLEN (readability)?

It makes sense to use HOST_NAME_MAX. I will use it in the next patches

>
> Kind regards,
> Petr

Andrea



More information about the ltp mailing list