Re: [RFC PATCH v1 3/3] liburing: add test programs for napi busy poll

Stefan Roesch
2022-11-07T18:02:28Z

Ammar Faizi <ammarfaizi2@gnuweeb.org> writes:

> On 11/4/22 3:40 AM, Stefan Roesch wrote:
>> +struct option longopts[] =
>> +{
>> + {"address" , 1, NULL, 'a'},
>> + {"busy" , 0, NULL, 'b'},
>> + {"help" , 0, NULL, 'h'},
>> + {"num_pings", 1, NULL, 'n'},
>> + {"port" , 1, NULL, 'p'},
>> + {"sqpoll" , 0, NULL, 's'},
>> + {"timeout" , 1, NULL, 't'},
>
> Inconsistent indentation.
>

Version 2 of the patch fixes this.

>> + if (strlen(opt.addr) == 0) {
>> + fprintf(stderr, "address option is mandatory\n");
>> + printUsage(argv[0]);
>> + exit(-1);
>> + }
> Don't use integer literal like 0 or -1 as the exit code in tests, use the
> exit code protocol:
>
> T_EXIT_PASS
> T_EXIT_FAIL
> T_EXIT_SKIP
>
> They are defined in test/helpers.h.

Version 2 of the patch uses the above constants.