[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CA+FuTSc19dDYaRyJZV5qqwz7rFy+5KXHzX_0OkwAFFyJH6aU6Q@mail.gmail.com>
Date: Tue, 25 May 2021 09:56:12 -0400
From: Willem de Bruijn <willemdebruijn.kernel@...il.com>
To: Po-Hsu Lin <po-hsu.lin@...onical.com>
Cc: "open list:KERNEL SELFTEST FRAMEWORK"
<linux-kselftest@...r.kernel.org>,
Network Development <netdev@...r.kernel.org>,
bpf <bpf@...r.kernel.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
Shuah Khan <shuah@...nel.org>, skhan@...uxfoundation.org,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>, Martin Lau <kafai@...com>,
Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...nel.org>,
David Miller <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Jesper Dangaard Brouer <hawk@...nel.org>, nikolay@...dia.com,
Guillaume Nault <gnault@...hat.com>,
Vladimir Oltean <vladimir.oltean@....com>, idosch@...dia.com,
baowen.zheng@...igine.com, danieller@...dia.com, petrm@...dia.com
Subject: Re: [PATCH] selftests: Use kselftest skip code for skipped tests
On Tue, May 25, 2021 at 2:17 AM Po-Hsu Lin <po-hsu.lin@...onical.com> wrote:
>
> There are several test cases still using exit 0 when they need to be
> skipped. Use kselftest framework skip code instead so it can help us
> to distinguish the proper return status.
>
> Criterion to filter out what should be fixed in selftests directory:
> grep -r "exit 0" -B1 | grep -i skip
>
> This change might cause some false-positives if people are running
> these test scripts directly and only checking their return codes,
> which will change from 0 to 4. However I think the impact should be
> small as most of our scripts here are already using this skip code.
> And there will be no such issue if running them with the kselftest
> framework.
>
> Signed-off-by: Po-Hsu Lin <po-hsu.lin@...onical.com>
Perhaps it's a good time to mention this patch to add a kselftest
helper library for shell tests again:
[PATCH] tools/testing: add kselftest shell helper library
https://lore.kernel.org/linux-kselftest/20201123162508.585279-1-willemdebruijn.kernel@gmail.com/
That can avoid redefining this constant in every file.
Powered by blists - more mailing lists