lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <3361ec99-d880-1155-f10a-13dd6a10e626@gnuweeb.org>
Date:   Tue, 8 Nov 2022 16:47:03 +0700
From:   Ammar Faizi <ammarfaizi2@...weeb.org>
To:     Stefan Roesch <shr@...kernel.io>,
        Facebook Kernel Team <kernel-team@...com>
Cc:     Jens Axboe <axboe@...nel.dk>,
        Olivier Langlois <olivier@...llion01.com>,
        netdev Mailing List <netdev@...r.kernel.org>,
        io-uring Mailing List <io-uring@...r.kernel.org>,
        Jakub Kicinski <kuba@...nel.org>
Subject: Re: [RFC PATCH v2 3/4] liburing: add test programs for napi busy poll

On 11/8/22 2:01 PM, Ammar Faizi wrote:
> On 11/8/22 12:53 AM, Stefan Roesch wrote:
>> This adds two test programs to test the napi busy poll functionality. It
>> consists of a client program and a server program. To get a napi id, the
>> client and the server program need to be run on different hosts.
>>
>> To test the napi busy poll timeout, the -t needs to be specified. A
>> reasonable value for the busy poll timeout is 100. By specifying the
>> busy poll timeout on the server and the client the best results are
>> accomplished.
>>
>> Signed-off-by: Stefan Roesch <shr@...kernel.io>
>> ---
>>   test/Makefile                |   2 +
>>   test/napi-busy-poll-client.c | 422 +++++++++++++++++++++++++++++++++++
>>   test/napi-busy-poll-server.c | 372 ++++++++++++++++++++++++++++++
>>   3 files changed, 796 insertions(+)
>>   create mode 100644 test/napi-busy-poll-client.c
>>   create mode 100644 test/napi-busy-poll-server.c
> 
> Hi Stefan,
> 
> We don't write liburing tests this way. Your new tests break the "make runtests"
> command:
> 
>    ...
>    ...
>    Running test napi-busy-poll-client.t                                address option is mandatory
>    Usage: ./napi-busy-poll-client.t [-l|--listen] [-a|--address ip_address] [-p|--port port-no] [-s|--sqpoll] [-b|--busy] [-n|--num pings] [-t|--timeout busy-poll-timeout] [-h|--help]
>    ... snip ...
> 
>    Test napi-busy-poll-client.t failed with ret 1
>    Running test napi-busy-poll-server.t                                address option is mandatory
>    Usage: ./napi-busy-poll-server.t [-l|--listen] [-a|--address ip_address] [-p|--port port-no] [-s|--sqpoll] [-b|--busy] [-n|--num pings] [-t|--timeout busy-poll-timeout] [-h|--help]
>    ... snip ...
>    ...
>    ...
>    Tests failed (3): <napi-busy-poll-client.t> <napi-busy-poll-server.t> <pipe-bug.t>
>    make[1]: *** [Makefile:235: runtests] Error 1
>    make[1]: Leaving directory '/home/ammarfaizi2/app/liburing/test'
>    make: *** [Makefile:21: runtests] Error 2
> 
> All test programs in the "test/" directory are run by "make runtests" command.
> Please try to run them with "make runtests" command.
> 
> If you want to test several arguments combination variants, you can do something
> like this:
> 
>     https://github.com/axboe/liburing/blob/754bc068ec482/test/socket.c#L369-L409
> 
> Note: Since you're adding a new feature, your test program should check whether
> the running kernel supports the new feature. If the running kernel doesn't
> support it, use T_EXIT_SKIP as the exit code.

Note: In that example, it doesn't use T_EXIT_* as the exit code because this
exit code protocol is a new framework. We haven't finished to port the old
tests to follow this rule.

It's introduced in commit (in liburing-2.3):

    ed430fbeb3336 ("tests: migrate some tests to use enum-based exit codes")

New tests should follow the T_EXIT_* convention for exit code.

-- 
Ammar Faizi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ