APPLIED/cmt: [SRU REGRESSION Eoan 1/1] selftests: Fix bpf reuseport test
Khaled Elmously
khalid.elmously at canonical.com
Wed Apr 22 01:15:08 UTC 2020
This was actually needed in disco as well. Applied it there too.
On 2020-04-09 14:32:39 , Khaled Elmously wrote:
> Applied as SAUCE - thanks for the quick fix Stefan
>
> On 2020-04-09 17:26:06 , Stefan Bader wrote:
> > The IF_ERR macro is not yet defined, replace it with CHECK.
> > Alternatively we would have to revert the following patch:
> >
> > commit 1740b79aed7b5a121bb07ce30e4473225545b9d2
> > Author: Lorenz Bauer <lmb at cloudflare.com>
> > Date: Fri Jan 24 11:27:54 2020 +0000
> >
> > selftests: bpf: Reset global state between reuseport test runs
> >
> > BugLink: https://bugs.launchpad.net/bugs/1871613
> >
> > Signed-off-by: Stefan Bader <stefan.bader at canonical.com>
> > ---
> > tools/testing/selftests/bpf/test_select_reuseport.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/tools/testing/selftests/bpf/test_select_reuseport.c b/tools/testing/selftests/bpf/test_select_reuseport.c
> > index 079d0f5a2909..567912df9c74 100644
> > --- a/tools/testing/selftests/bpf/test_select_reuseport.c
> > +++ b/tools/testing/selftests/bpf/test_select_reuseport.c
> > @@ -668,12 +668,12 @@ static void cleanup_per_test(void)
> >
> > for (i = 0; i < NR_RESULTS; i++) {
> > err = bpf_map_update_elem(result_map, &i, &zero, BPF_ANY);
> > - RET_IF(err, "reset elem in result_map",
> > + CHECK(err == -1, "reset elem in result_map",
> > "i:%u err:%d errno:%d\n", i, err, errno);
> > }
> >
> > err = bpf_map_update_elem(linum_map, &zero, &zero, BPF_ANY);
> > - RET_IF(err, "reset line number in linum_map", "err:%d errno:%d\n",
> > + CHECK(err == -1, "reset line number in linum_map", "err:%d errno:%d\n",
> > err, errno);
> >
> > for (i = 0; i < REUSEPORT_ARRAY_SIZE; i++)
> > --
> > 2.17.1
> >
> >
> > --
> > kernel-team mailing list
> > kernel-team at lists.ubuntu.com
> > https://lists.ubuntu.com/mailman/listinfo/kernel-team
More information about the kernel-team
mailing list