Message ID | 20230914231123.193901-15-martin.kelly@crowdstrike.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | BPF |
Headers | show |
Series | add libbpf getters for individual ringbuffers | expand |
diff --git a/tools/testing/selftests/bpf/prog_tests/ringbuf.c b/tools/testing/selftests/bpf/prog_tests/ringbuf.c index 27149dee0e2c..ccf13f0e36c7 100644 --- a/tools/testing/selftests/bpf/prog_tests/ringbuf.c +++ b/tools/testing/selftests/bpf/prog_tests/ringbuf.c @@ -312,7 +312,11 @@ static void ringbuf_subtest(void) * samples, so consume them here to collect all the samples */ err = ring_buffer__consume(ringbuf); - CHECK(err < 0, "rb_consume", "failed: %d\b", err); + CHECK(err < 0, "ringbuffer_consume", "failed: %d\b", err); + + /* also consume using ring__consume to make sure it works the same */ + err = ring__consume(ring); + CHECK(err < 0, "ring_consume", "failed: %d\b", err); /* 3 rounds, 2 samples each */ cnt = atomic_xchg(&sample_cnt, 0);
Add tests for new API ring__consume. Signed-off-by: Martin Kelly <martin.kelly@crowdstrike.com> --- tools/testing/selftests/bpf/prog_tests/ringbuf.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)