treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / tools / testing / selftests / bpf / progs / test_pinning.c
blob4ef2630292b261de9ea78e41583bbe7fe337af28
1 // SPDX-License-Identifier: GPL-2.0
3 #include <linux/bpf.h>
4 #include <bpf/bpf_helpers.h>
6 int _version SEC("version") = 1;
8 struct {
9 __uint(type, BPF_MAP_TYPE_ARRAY);
10 __uint(max_entries, 1);
11 __type(key, __u32);
12 __type(value, __u64);
13 __uint(pinning, LIBBPF_PIN_BY_NAME);
14 } pinmap SEC(".maps");
16 struct {
17 __uint(type, BPF_MAP_TYPE_HASH);
18 __uint(max_entries, 1);
19 __type(key, __u32);
20 __type(value, __u64);
21 } nopinmap SEC(".maps");
23 struct {
24 __uint(type, BPF_MAP_TYPE_HASH);
25 __uint(max_entries, 1);
26 __type(key, __u32);
27 __type(value, __u64);
28 __uint(pinning, LIBBPF_PIN_NONE);
29 } nopinmap2 SEC(".maps");
31 char _license[] SEC("license") = "GPL";