[LTP] [PATCH] tst_rtnetlink: pass error codes using rtnl_errno variable
Richard Palethorpe
rpalethorpe@suse.de
Tue Jun 22 18:11:20 CEST 2021
Hello Martin,
Martin Doucha <mdoucha@suse.cz> writes:
> Signed-off-by: Martin Doucha <mdoucha@suse.cz>
> ---
> include/tst_rtnetlink.h | 2 ++
> lib/tst_netdevice.c | 26 +++++++++++++++-----------
> lib/tst_rtnetlink.c | 6 ++++--
> 3 files changed, 21 insertions(+), 13 deletions(-)
>
> diff --git a/include/tst_rtnetlink.h b/include/tst_rtnetlink.h
> index 12ec258f2..7c28f795d 100644
> --- a/include/tst_rtnetlink.h
> +++ b/include/tst_rtnetlink.h
> @@ -21,6 +21,8 @@ struct tst_rtnl_message {
> size_t payload_size;
> };
>
> +extern int rtnl_errno;
This is polluting the name space. I suppose it can be prepended
with tst_, but does the test author need to see this? Or you could even
just merge tst_netdevice and tst_rtnetlink.
Otherwise I think this approach is fine.
--
Thank you,
Richard.
More information about the ltp
mailing list