Message ID | 20240124185403.1104141-1-john.fastabend@gmail.com (mailing list archive) |
---|---|
Headers | show |
Series | transition sockmap testing to test_progs | expand |
John Fastabend wrote: > Its much easier to write and read tests than it was when sockmap was > originally created. At that time we created a test_sockmap prog that > did sockmap tests. But, its showing its age now. For example it reads > user vars out of maps, is hard to run targetted tests, has a different > format from the familiar test_progs and so on. > > I recently thought there was an issue with pop helpers so I created > some tests to try and track it down. It turns out it was a bug in the > BPF program we had not the kernel. But, I think it makes sense to > start deprecating test_sockmap and converting these to the nicer > test_progs. > > So this is a first round of test_prog tests for sockmap cork and > pop helpers. I'll add push and pull tests shortly. I think its fine, > maybe preferred to review smaller patchsets, to send these > incrementally as I get them created. > > Thanks! > > v2: fix unint vars in some branches from `make RELEASE=1` I'll wait a bit to see if there is any additional feedback, but on bpf-next these tests were stable. When we backported to 6.1 they became a bit flaky because recv() would sometimes only get part of the msg. I'll take a look, but this should be fine adding a retry logic to the recv() so it does a few recv's before giving up allows it to recv partial messages, but still pass the test. Thanks, John
On Wed, Jan 24, 2024 at 10:53 AM -08, John Fastabend wrote: > Its much easier to write and read tests than it was when sockmap was > originally created. At that time we created a test_sockmap prog that > did sockmap tests. But, its showing its age now. For example it reads > user vars out of maps, is hard to run targetted tests, has a different > format from the familiar test_progs and so on. > > I recently thought there was an issue with pop helpers so I created > some tests to try and track it down. It turns out it was a bug in the > BPF program we had not the kernel. But, I think it makes sense to > start deprecating test_sockmap and converting these to the nicer > test_progs. > > So this is a first round of test_prog tests for sockmap cork and > pop helpers. I'll add push and pull tests shortly. I think its fine, > maybe preferred to review smaller patchsets, to send these > incrementally as I get them created. Cool to see this transition starting.
Jakub Sitnicki wrote: > On Wed, Jan 24, 2024 at 10:53 AM -08, John Fastabend wrote: > > Its much easier to write and read tests than it was when sockmap was > > originally created. At that time we created a test_sockmap prog that > > did sockmap tests. But, its showing its age now. For example it reads > > user vars out of maps, is hard to run targetted tests, has a different > > format from the familiar test_progs and so on. > > > > I recently thought there was an issue with pop helpers so I created > > some tests to try and track it down. It turns out it was a bug in the > > BPF program we had not the kernel. But, I think it makes sense to > > start deprecating test_sockmap and converting these to the nicer > > test_progs. > > > > So this is a first round of test_prog tests for sockmap cork and > > pop helpers. I'll add push and pull tests shortly. I think its fine, > > maybe preferred to review smaller patchsets, to send these > > incrementally as I get them created. > > Cool to see this transition starting. Thanks for the review.