[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEf4BzYWgnek1QYyQm4U0qakP=Si0vEJ2bLKHeJhambyX7EnCQ@mail.gmail.com>
Date: Fri, 1 Nov 2019 22:07:58 -0700
From: Andrii Nakryiko <andrii.nakryiko@...il.com>
To: Toke Høiland-Jørgensen <toke@...hat.com>
Cc: Daniel Borkmann <daniel@...earbox.net>,
Alexei Starovoitov <ast@...nel.org>,
Martin KaFai Lau <kafai@...com>,
Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
Jesper Dangaard Brouer <brouer@...hat.com>,
David Miller <davem@...emloft.net>,
Networking <netdev@...r.kernel.org>, bpf <bpf@...r.kernel.org>
Subject: Re: [PATCH bpf-next v5 5/5] selftests: Add tests for automatic map pinning
On Fri, Nov 1, 2019 at 2:53 AM Toke Høiland-Jørgensen <toke@...hat.com> wrote:
>
> From: Toke Høiland-Jørgensen <toke@...hat.com>
>
> This adds a new BPF selftest to exercise the new automatic map pinning
> code.
>
> Acked-by: Andrii Nakryiko <andriin@...com>
I don't believe I acked this patch before, must have been added by
mistake. But either way thanks for improving tests and testing a good
variety of scenarios, I appreciate the work. Please fix bpf_object
leak below and keep my Acked-by :)
> Signed-off-by: Toke Høiland-Jørgensen <toke@...hat.com>
> ---
> tools/testing/selftests/bpf/prog_tests/pinning.c | 208 ++++++++++++++++++++
> tools/testing/selftests/bpf/progs/test_pinning.c | 31 +++
> .../selftests/bpf/progs/test_pinning_invalid.c | 16 ++
> 3 files changed, 255 insertions(+)
> create mode 100644 tools/testing/selftests/bpf/prog_tests/pinning.c
> create mode 100644 tools/testing/selftests/bpf/progs/test_pinning.c
> create mode 100644 tools/testing/selftests/bpf/progs/test_pinning_invalid.c
>
[...]
> + /* should fail because of map parameter mismatch */
> + err = bpf_object__load(obj);
> + if (CHECK(err != -EINVAL, "param mismatch load", "err %d errno %d\n", err, errno))
> + goto out;
> +
You need to close obj here, before overwriting it below?
> + /* test auto-pinning at custom path with open opt */
> + obj = bpf_object__open_file(file, &opts);
> + if (CHECK_FAIL(libbpf_get_error(obj))) {
> + obj = NULL;
> + goto out;
> + }
[...]
Powered by blists - more mailing lists