Re: [PATCH net-next v9 23/23] testing/selftest: add test tool and scripts for ovpn module

Antonio Quartulli
2024-10-17T07:56:53Z

On 16/10/2024 23:14, Shuah Khan wrote:
> On 10/15/24 19:03, Antonio Quartulli wrote:
>> The ovpn-cli tool can be compiled and used as selftest for the ovpn
>> kernel module.
>>
>> It implements the netlink API and can thus be integrated in any
>> script for more automated testing.
>>
>> Along with the tool, 2 scripts are added that perform basic
>> functionality tests by means of network namespaces.
>>
>> The scripts can be performed in sequence by running run.sh
>>
>> Cc: shuah@kernel.org
>> Cc: linux-kselftest@vger.kernel.org
>> Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
>
> I almost gave my Reviewed-by when I saw the very long argument parsing
> in the main() - please see comment below under main().
>
> Let's simply the logic using getopt() - it is way too long and
> complex.
>

[...]

>
> This is loooong arguments parsing. What's the reason to not use getopt()
> Doesn't it simplify all ofthie logic?
>
> I would like to see it simplified for maintainability.

This tool was originally very simple...then...this happened :-D

I agree getopt() could help making this whole function easier to read
and maintain.

I will include this change in v10.

Thanks!

Regards,

--
Antonio Quartulli
OpenVPN Inc.