Skip to content

RFC BPF testing

Petr Vorel ltp 1 version New

Get series with b4
b4 am 20190724093047.GC4917@dell5510

Versions newest first

  1. v1 RFC Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2Essential headers for BPF map creation+0 -01 reply
2/2BPF: Sanity check creating and updating maps+0 -01 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchPetr Vorel
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [LTP] [PATCH 0/2] [RFC] BPF testing

Hi Richie,

Quoted 6 lines

Hello,

This patch set introduces a very basic test which kicks the tires of the bpf system call. It doesn't actually load a eBPF program, I will create another test for that. However I have some concerns which I will discuss while doing that.

Good start, great.

Quoted 5 lines

There are already extensive BPF tests in the kernel selftests. These appear to be quite complex and test a variety of functionality. They also are far less structured than LTP's modern tests and are tied to the kernel tree which makes using them in QA a pain. There are also some tests in the BCC project, which may test the kernel as a byproduct.

Yep, this is true for other tests in kselftest tree.

Quoted 6 lines

So there are a number of options which are not necessarily mutually exclusive:

1) Port (some of) the selftests to the LTP.
2) Port the LTP library to the selftests.
3) Focus the LTP's BPF tests on reproducing specific high impact bugs.

Quoted 7 lines

This patch set copies in the necessary headers so that we have zero external dependencies.

I will also use raw byte code for the program test which is at least acceptable for trivial programs. So we do not need BCC or Clang/LLVM with eBPF support or matching kernel sources to generate offsets into internal structures.

+1

Quoted 3 lines

For the time being atleast my preference would be for (3) while avoiding taking on any dependencies to ensure those tests are run by users mostly ignorant of BPF, but are still exposed to critical bugs in the BPF stack.

+1

Kind regards,
Petr