Commit 50a7cedb authored by Joanne Koong's avatar Joanne Koong Committed by Alexei Starovoitov

selftests/bpf: Clean up dynptr prog_tests

Clean up prog_tests/dynptr.c by removing the unneeded "expected_err_msg"
in the dynptr_tests struct, which is a remnant from converting the fail
tests cases to use the generic verification tester.
Signed-off-by: default avatarJoanne Koong <joannelkoong@gmail.com>
Link: https://lore.kernel.org/r/20230214051332.4007131-2-joannelkoong@gmail.comSigned-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent 8032cad1
...@@ -5,14 +5,10 @@ ...@@ -5,14 +5,10 @@
#include "dynptr_fail.skel.h" #include "dynptr_fail.skel.h"
#include "dynptr_success.skel.h" #include "dynptr_success.skel.h"
static struct { static const char * const success_tests[] = {
const char *prog_name; "test_read_write",
const char *expected_err_msg; "test_data_slice",
} dynptr_tests[] = { "test_ringbuf",
/* success cases */
{"test_read_write", NULL},
{"test_data_slice", NULL},
{"test_ringbuf", NULL},
}; };
static void verify_success(const char *prog_name) static void verify_success(const char *prog_name)
...@@ -53,11 +49,11 @@ void test_dynptr(void) ...@@ -53,11 +49,11 @@ void test_dynptr(void)
{ {
int i; int i;
for (i = 0; i < ARRAY_SIZE(dynptr_tests); i++) { for (i = 0; i < ARRAY_SIZE(success_tests); i++) {
if (!test__start_subtest(dynptr_tests[i].prog_name)) if (!test__start_subtest(success_tests[i]))
continue; continue;
verify_success(dynptr_tests[i].prog_name); verify_success(success_tests[i]);
} }
RUN_TESTS(dynptr_fail); RUN_TESTS(dynptr_fail);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment