1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright (c) 2023 Meta Platforms, Inc. and affiliates. */
5 #include <bpf/bpf_helpers.h>
6 #include <bpf/bpf_tracing.h>
10 char _license[] SEC("license") = "GPL";
12 SEC("struct_ops.s/test_2")
13 __failure __msg("attach to unsupported member test_2 of struct bpf_dummy_ops")
14 int BPF_PROG(test_unsupported_field_sleepable,
15 struct bpf_dummy_ops_state *state, int a1, unsigned short a2,
16 char a3, unsigned long a4)
18 /* Tries to mark an unsleepable field in struct bpf_dummy_ops as sleepable. */
23 struct bpf_dummy_ops dummy_1 = {
25 .test_2 = (void *)test_unsupported_field_sleepable,
26 .test_sleepable = (void *)NULL,