Skip to content

Commit 056b65a

Browse files
shunghsiyugregkh
authored andcommitted
Revert "selftests/bpf: dummy_st_ops should reject 0 for non-nullable params"
This reverts commit e7d1930 which is commit 6a2d30d upstream. The dummy_st_ops/dummy_sleepable_reject_null test requires commit 980ca8c ("bpf: check bpf_dummy_struct_ops program params for test runs"), which in turn depends on "Support PTR_MAYBE_NULL for struct_ops arguments" series (see link below), neither are backported to stable 6.6. Link: https://lore.kernel.org/all/20240209023750.1153905-1-thinker.li@gmail.com/ Signed-off-by: Shung-Hsi Yu <shung-hsi.yu@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent c148b72 commit 056b65a

1 file changed

Lines changed: 0 additions & 27 deletions

File tree

tools/testing/selftests/bpf/prog_tests/dummy_st_ops.c

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -147,31 +147,6 @@ static void test_dummy_sleepable(void)
147147
dummy_st_ops_success__destroy(skel);
148148
}
149149

150-
/* dummy_st_ops.test_sleepable() parameter is not marked as nullable,
151-
* thus bpf_prog_test_run_opts() below should be rejected as it tries
152-
* to pass NULL for this parameter.
153-
*/
154-
static void test_dummy_sleepable_reject_null(void)
155-
{
156-
__u64 args[1] = {0};
157-
LIBBPF_OPTS(bpf_test_run_opts, attr,
158-
.ctx_in = args,
159-
.ctx_size_in = sizeof(args),
160-
);
161-
struct dummy_st_ops_success *skel;
162-
int fd, err;
163-
164-
skel = dummy_st_ops_success__open_and_load();
165-
if (!ASSERT_OK_PTR(skel, "dummy_st_ops_load"))
166-
return;
167-
168-
fd = bpf_program__fd(skel->progs.test_sleepable);
169-
err = bpf_prog_test_run_opts(fd, &attr);
170-
ASSERT_EQ(err, -EINVAL, "test_run");
171-
172-
dummy_st_ops_success__destroy(skel);
173-
}
174-
175150
void test_dummy_st_ops(void)
176151
{
177152
if (test__start_subtest("dummy_st_ops_attach"))
@@ -184,8 +159,6 @@ void test_dummy_st_ops(void)
184159
test_dummy_multiple_args();
185160
if (test__start_subtest("dummy_sleepable"))
186161
test_dummy_sleepable();
187-
if (test__start_subtest("dummy_sleepable_reject_null"))
188-
test_dummy_sleepable_reject_null();
189162

190163
RUN_TESTS(dummy_st_ops_fail);
191164
}

0 commit comments

Comments
 (0)