/linux/tools/testing/selftests/powerpc/switch_endian/ |
H A D | check.S | 8 * r15: pattern to check registers against. 14 cmpd r9,r3 # check r3 16 addi r9,r15,4 # check r4 19 lis r9,0x00FF # check CR 26 addi r9,r15,32 # check LR 30 addi r9,r15,5 # check r5 33 addi r9,r15,6 # check r6 36 addi r9,r15,7 # check r7 39 addi r9,r15,8 # check r8 42 addi r9,r15,13 # check r13 [all …]
|
/linux/tools/testing/selftests/bpf/prog_tests/ |
H A D | pinning.c | 18 if (CHECK(!map, "find map", "NULL map")) in get_map_id() 23 CHECK(err, "get map info", "err %d errno %d", err, errno); in get_map_id() 45 /* check that opening fails with invalid pinning value in map def */ in test_pinning() 48 if (CHECK(err != -EINVAL, "invalid open", "err %d errno %d\n", err, errno)) { in test_pinning() 56 if (CHECK(err, "default open", "err %d errno %d\n", err, errno)) { in test_pinning() 62 if (CHECK(err, "default load", "err %d errno %d\n", err, errno)) in test_pinning() 65 /* check that pinmap was pinned */ in test_pinning() 67 if (CHECK(err, "stat pinpath", "err %d errno %d\n", err, errno)) in test_pinning() 70 /* check that nopinmap was *not* pinned */ in test_pinning() 72 if (CHECK(!err || errno != ENOENT, "stat nopinpath", in test_pinning() [all …]
|
H A D | hashmap.c | 60 if (CHECK(err != -ENOENT, "hashmap__update", in test_hashmap_generic() 68 if (CHECK(oldk != 0 || oldv != 0, "check_kv", in test_hashmap_generic() 73 if (CHECK(err, "elem_add", "failed to add k/v %ld = %ld: %d\n", k, v, err)) in test_hashmap_generic() 76 if (CHECK(!hashmap__find(map, k, &oldv), "elem_find", in test_hashmap_generic() 79 if (CHECK(oldv != v, "elem_val", "found value is wrong: %ld\n", oldv)) in test_hashmap_generic() 83 if (CHECK(hashmap__size(map) != ELEM_CNT, "hashmap__size", in test_hashmap_generic() 86 if (CHECK(hashmap__capacity(map) != exp_cap(hashmap__size(map)), in test_hashmap_generic() 97 if (CHECK(v - k != 1024, "check_kv", in test_hashmap_generic() 101 if (CHECK(found_msk != (1ULL << ELEM_CNT) - 1, "elem_cnt", in test_hashmap_generic() 110 if (CHECK(err != -EEXIST, "hashmap__add", in test_hashmap_generic() [all …]
|
H A D | cgroup_attach_override.c | 32 if (CHECK(allow_prog < 0, "prog_load_allow", in serial_test_cgroup_attach_override() 37 if (CHECK(drop_prog < 0, "prog_load_drop", in serial_test_cgroup_attach_override() 42 if (CHECK(foo < 0, "cgroup_join_foo", "cgroup setup failed\n")) in serial_test_cgroup_attach_override() 45 if (CHECK(bpf_prog_attach(drop_prog, foo, BPF_CGROUP_INET_EGRESS, in serial_test_cgroup_attach_override() 51 if (CHECK(!system(PING_CMD), "ping_fail", in serial_test_cgroup_attach_override() 56 if (CHECK(bar < 0, "cgroup_join_bar", "cgroup setup failed\n")) in serial_test_cgroup_attach_override() 59 if (CHECK(!system(PING_CMD), "ping_fail", in serial_test_cgroup_attach_override() 63 if (CHECK(bpf_prog_attach(allow_prog, bar, BPF_CGROUP_INET_EGRESS, in serial_test_cgroup_attach_override() 69 if (CHECK(system(PING_CMD), "ping_ok", "ping failed\n")) in serial_test_cgroup_attach_override() 72 if (CHECK(bpf_prog_detach(bar, BPF_CGROUP_INET_EGRESS), in serial_test_cgroup_attach_override() [all …]
|
H A D | skeleton.c | 30 if (CHECK(!skel, "skel_open", "failed to open skeleton\n")) in test_skeleton() 33 if (CHECK(skel->kconfig, "skel_kconfig", "kconfig is mmaped()!\n")) in test_skeleton() 46 CHECK(data->in1 != -1, "in1", "got %d != exp %d\n", data->in1, -1); in test_skeleton() 47 CHECK(data->out1 != -1, "out1", "got %d != exp %d\n", data->out1, -1); in test_skeleton() 48 CHECK(data->in2 != -1, "in2", "got %lld != exp %lld\n", data->in2, -1LL); in test_skeleton() 49 CHECK(data->out2 != -1, "out2", "got %lld != exp %lld\n", data->out2, -1LL); in test_skeleton() 51 CHECK(bss->in3 != 0, "in3", "got %d != exp %d\n", bss->in3, 0); in test_skeleton() 52 CHECK(bss->out3 != 0, "out3", "got %d != exp %d\n", bss->out3, 0); in test_skeleton() 53 CHECK(bss->in4 != 0, "in4", "got %lld != exp %lld\n", bss->in4, 0LL); in test_skeleton() 54 CHECK(bss->out4 != 0, "out4", "got %lld != exp %lld\n", bss->out4, 0LL); in test_skeleton() [all …]
|
H A D | d_path.c | 50 if (CHECK(pipe(pipefd) < 0, "trigger", "pipe failed\n")) in trigger_fstat_events() 54 if (CHECK(sockfd < 0, "trigger", "socket failed\n")) in trigger_fstat_events() 58 if (CHECK(procfd < 0, "trigger", "open /proc/self/comm failed\n")) in trigger_fstat_events() 61 if (CHECK(devfd < 0, "trigger", "open /dev/urandom failed\n")) in trigger_fstat_events() 64 if (CHECK(localfd < 0, "trigger", "open /tmp/d_path_loadgen.txt failed\n")) in trigger_fstat_events() 69 if (CHECK(indicatorfd < 0, "trigger", "open /tmp/ failed\n")) in trigger_fstat_events() 73 if (CHECK(ret < 0, "trigger", "set_pathname failed for pipe[0]\n")) in trigger_fstat_events() 76 if (CHECK(ret < 0, "trigger", "set_pathname failed for pipe[1]\n")) in trigger_fstat_events() 79 if (CHECK(ret < 0, "trigger", "set_pathname failed for socket\n")) in trigger_fstat_events() 82 if (CHECK(ret < 0, "trigger", "set_pathname failed for proc\n")) in trigger_fstat_events() [all …]
|
H A D | mmap.c | 33 if (CHECK(!skel, "skel_open", "skeleton open failed\n")) in test_mmap() 37 if (CHECK(err != 0, "bpf_map__set_max_entries", "bpf_map__set_max_entries failed\n")) in test_mmap() 43 if (CHECK(err != 0, "bpf_map__set_max_entries", "bpf_map__set_max_entries failed\n")) in test_mmap() 47 if (CHECK(err != 0, "skel_load", "skeleton load failed\n")) in test_mmap() 56 if (CHECK(tmp1 != MAP_FAILED, "rdonly_write_mmap", "unexpected success\n")) { in test_mmap() 60 /* now double-check if it's mmap()'able at all */ in test_mmap() 62 if (CHECK(tmp1 == MAP_FAILED, "rdonly_read_mmap", "failed: %d\n", errno)) in test_mmap() 68 if (CHECK(err, "map_get_info", "failed %d\n", errno)) in test_mmap() 75 if (CHECK(bss_mmaped == MAP_FAILED, "bss_mmap", in test_mmap() 83 if (CHECK(map_mmaped == MAP_FAILED, "data_mmap", in test_mmap() [all …]
|
H A D | xdp_info.c | 19 if (CHECK(err, "get_xdp_none", "errno=%d\n", errno)) in serial_test_xdp_info() 21 if (CHECK(prog_id, "prog_id_none", "unexpected prog_id=%u\n", prog_id)) in serial_test_xdp_info() 25 if (CHECK(err, "get_xdp_none_skb", "errno=%d\n", errno)) in serial_test_xdp_info() 27 if (CHECK(prog_id, "prog_id_none_skb", "unexpected prog_id=%u\n", in serial_test_xdp_info() 38 if (CHECK(err, "get_prog_info", "errno=%d\n", errno)) in serial_test_xdp_info() 42 if (CHECK(err, "set_xdp_skb", "errno=%d\n", errno)) in serial_test_xdp_info() 48 if (CHECK(err, "get_xdp", "errno=%d\n", errno)) in serial_test_xdp_info() 50 if (CHECK(prog_id != info.id, "prog_id", "prog_id not available\n")) in serial_test_xdp_info() 54 if (CHECK(err, "get_xdp_skb", "errno=%d\n", errno)) in serial_test_xdp_info() 56 if (CHECK(prog_id != info.id, "prog_id_skb", "prog_id not available\n")) in serial_test_xdp_info() [all …]
|
H A D | ringbuf_multi.c | 23 CHECK(ring != 1, "sample1_ring", "exp %d, got %d\n", 1, ring); in process_sample() 24 CHECK(s->value != 333, "sample1_value", "exp %ld, got %ld\n", in process_sample() 28 CHECK(ring != 2, "sample2_ring", "exp %d, got %d\n", 2, ring); in process_sample() 29 CHECK(s->value != 777, "sample2_value", "exp %ld, got %ld\n", in process_sample() 33 CHECK(true, "extra_sample", "unexpected sample seq %d, val %ld\n", in process_sample() 52 if (CHECK(!skel, "skel_open", "skeleton open failed\n")) in test_ringbuf_multi() 63 if (CHECK(proto_fd < 0, "bpf_map_create", "bpf_map_create failed\n")) in test_ringbuf_multi() 67 if (CHECK(err != 0, "bpf_map__set_inner_map_fd", "bpf_map__set_inner_map_fd failed\n")) in test_ringbuf_multi() 71 if (CHECK(err != 0, "skel_load", "skeleton load failed\n")) in test_ringbuf_multi() 86 if (CHECK(!ringbuf, "ringbuf_create", "failed to create ringbuf\n")) in test_ringbuf_multi() [all …]
|
H A D | cgroup_link.c | 18 if (CHECK(skel->bss->calls != exp_calls, "call_cnt", in ping_and_check() 21 if (CHECK(skel->bss->alt_calls != exp_alt_calls, "alt_call_cnt", in ping_and_check() 47 if (CHECK(!skel, "skel_open_load", "failed to open/load skeleton\n")) in serial_test_cgroup_link() 52 if (CHECK(err, "cg_init", "failed: %d\n", err)) in serial_test_cgroup_link() 62 if (CHECK(err, "cg_join", "fail: %d\n", err)) in serial_test_cgroup_link() 79 if (CHECK(prog_cnt != 1, "effect_cnt", "exp %d, got %d\n", 1, prog_cnt)) in serial_test_cgroup_link() 87 if (CHECK(prog_cnt != cg_nr, "effect_cnt", "exp %d, got %d\n", in serial_test_cgroup_link() 96 if (CHECK(prog_cnt != cg_nr, "effect_cnt", "exp %d, got %d\n", in serial_test_cgroup_link() 100 CHECK(prog_ids[i - 1] != prog_ids[i], "prog_id_check", in serial_test_cgroup_link() 114 if (CHECK(err, "cg_attach_legacy", "errno=%d\n", errno)) in serial_test_cgroup_link() [all …]
|
H A D | ringbuf.c | 52 CHECK(s->value != 333, "sample1_value", "exp %ld, got %ld\n", in process_sample() 56 CHECK(s->value != 777, "sample2_value", "exp %ld, got %ld\n", in process_sample() 154 if (CHECK(!skel, "skel_open", "skeleton open failed\n")) in ringbuf_subtest() 160 if (CHECK(err != 0, "skel_load", "skeleton load failed\n")) in ringbuf_subtest() 214 if (CHECK(!ringbuf, "ringbuf_create", "failed to create ringbuf\n")) in ringbuf_subtest() 218 if (CHECK(err, "skel_attach", "skeleton attachment failed: %d\n", err)) in ringbuf_subtest() 231 CHECK(skel->bss->avail_data != 3 * rec_sz, in ringbuf_subtest() 234 CHECK(skel->bss->ring_size != page_size, in ringbuf_subtest() 237 CHECK(skel->bss->cons_pos != 0, in ringbuf_subtest() 240 CHECK(ske in ringbuf_subtest() [all...] |
/linux/tools/testing/selftests/arm64/mte/ |
H A D | check_mmap_options.c | 213 "Check anonymous memory with private mapping, sync error mode, mmap memory and tag check off\n"); in main() 215 …"Check file memory with private mapping, sync error mode, mmap/mprotect memory and tag check off\n… in main() 219 "Check anonymous memory with private mapping, no error mode, mmap memory and tag check off\n"); in main() 221 "Check file memory with private mapping, no error mode, mmap/mprotect memory and tag check off\n"); in main() 224 "Check anonymous memory with private mapping, sync error mode, mmap memory and tag check on\n"); in main() 226 …"Check anonymous memory with private mapping, sync error mode, mmap/mprotect memory and tag check … in main() 228 "Check anonymous memory with shared mapping, sync error mode, mmap memory and tag check on\n"); in main() 230 …"Check anonymous memory with shared mapping, sync error mode, mmap/mprotect memory and tag check o… in main() 232 "Check anonymous memory with private mapping, async error mode, mmap memory and tag check on\n"); in main() 234 …"Check anonymous memory with private mapping, async error mode, mmap/mprotect memory and tag check… in main() [all …]
|
/linux/tools/testing/selftests/bpf/progs/ |
H A D | linked_list_fail.c | 47 #define CHECK(test, op, hexpr) \ macro 57 CHECK(kptr, pop_front, &f->head); 58 CHECK(kptr, pop_back, &f->head); 60 CHECK(global, pop_front, &ghead); 61 CHECK(global, pop_back, &ghead); 63 CHECK(map, pop_front, &v->head); 64 CHECK(map, pop_back, &v->head); 66 CHECK(inner_map, pop_front, &iv->head); 67 CHECK(inner_map, pop_back, &iv->head); 69 #undef CHECK [all …]
|
H A D | verifier_sdiv.c | 15 __description("SDIV32, non-zero imm divisor, check 1") 27 __description("SDIV32, non-zero imm divisor, check 2") 39 __description("SDIV32, non-zero imm divisor, check 3") 51 __description("SDIV32, non-zero imm divisor, check 4") 63 __description("SDIV32, non-zero imm divisor, check 5") 75 __description("SDIV32, non-zero imm divisor, check 6") 87 __description("SDIV32, non-zero imm divisor, check 7") 99 __description("SDIV32, non-zero imm divisor, check 8") 111 __description("SDIV32, non-zero reg divisor, check 1") 124 __description("SDIV32, non-zero reg divisor, check 2") [all …]
|
H A D | verifier_subreg.c | 22 __description("add32 reg zero extend check") 39 __description("add32 imm zero extend check") 69 __description("sub32 reg zero extend check") 86 __description("sub32 imm zero extend check") 110 __description("mul32 reg zero extend check") 127 __description("mul32 imm zero extend check") 151 __description("div32 reg zero extend check") 168 __description("div32 imm zero extend check") 192 __description("or32 reg zero extend check") 209 __description("or32 imm zero extend check") [all …]
|
H A D | verifier_div0.c | 9 __description("DIV32 by 0, zero check 1") 23 __description("DIV32 by 0, zero check 2") 37 __description("DIV64 by 0, zero check") 51 __description("MOD32 by 0, zero check 1") 65 __description("MOD32 by 0, zero check 2") 79 __description("MOD64 by 0, zero check") 93 __description("DIV32 by 0, zero check ok, cls") 108 __description("DIV32 by 0, zero check 1, cls") 121 __description("DIV32 by 0, zero check 2, cls") 134 __description("DIV64 by 0, zero check, cls") [all …]
|
/linux/tools/testing/selftests/drivers/net/netdevsim/ |
H A D | ethtool-fec.sh | 17 check $? "$s" "$configured FEC encodings: None 22 check $? 24 check $? "$s" "$configured FEC encodings: Auto 30 check $? 32 check $? "$s" "$configured FEC encodings: Off 38 check $? 40 check $? "$s" "$configured FEC encodings: BaseR 46 check $? 48 check $? "$s" "$configured FEC encodings: ${o^^} 54 check $? [all …]
|
/linux/tools/testing/selftests/user_events/ |
H A D | abi_test.c | 217 int check; in FIXTURE() local 226 self->check = 0; in FIXTURE_SETUP() 236 ASSERT_EQ(0, self->check); in TEST_F() 237 ASSERT_EQ(0, reg_enable(&self->check, sizeof(int), 0)); in TEST_F() 239 ASSERT_EQ(1, self->check); in TEST_F() 241 ASSERT_EQ(0, self->check); in TEST_F() 245 ASSERT_EQ(1, self->check); in TEST_F() 246 ASSERT_EQ(0, reg_disable(&self->check, 0)); in TEST_F() 247 ASSERT_EQ(0, self->check); in TEST_F() 251 ASSERT_EQ(0, self->check); in TEST_F() [all …]
|
H A D | ftrace_test.c | 123 static int clear(int *check) in clear() argument 130 unreg.disable_addr = (__u64)check; in clear() 158 static int check_print_fmt(const char *event, const char *expected, int *check) in check_print_fmt() argument 166 ret = clear(check); in check_print_fmt() 179 reg.enable_addr = (__u64)check; in check_print_fmt() 180 reg.enable_size = sizeof(*check); in check_print_fmt() 206 int check; in FIXTURE() local 233 if (clear(&self->check) != 0) in FIXTURE_TEARDOWN() 244 reg.enable_addr = (__u64)&self->check; in TEST_F() 245 reg.enable_size = sizeof(self->check); in TEST_F() [all …]
|
/linux/drivers/firmware/efi/ |
H A D | cper-x86.c | 48 #define CHECK_VALID_BITS(check) (((check) & GENMASK_ULL(15, 0))) argument 49 #define CHECK_TRANS_TYPE(check) (((check) & GENMASK_ULL(17, 16)) >> 16) argument 50 #define CHECK_OPERATION(check) (((check) & GENMASK_ULL(21, 18)) >> 18) argument 51 #define CHECK_LEVEL(check) (((check) & GENMASK_ULL(24, 22)) >> 22) argument 58 #define CHECK_BUS_PART_TYPE(check) (((check) & GENMASK_ULL(31, 30)) >> 30) argument 60 #define CHECK_BUS_ADDR_SPACE(check) (((check) & GENMASK_ULL(34, 33)) >> 33) argument 69 #define CHECK_MS_ERR_TYPE(check) (((check) & GENMASK_ULL(18, 16)) >> 16) argument 144 "MSR Registers (Machine Check and other MSRs)", 153 static inline void print_bool(char *str, const char *pfx, u64 check, u64 bit) in print_bool() argument 155 printk("%s%s: %s\n", pfx, str, (check & bit) ? "true" : "false"); in print_bool() [all …]
|
/linux/tools/testing/selftests/net/mptcp/ |
H A D | pm_netlink.sh | 119 check() function 142 check "show_endpoints" "" "defaults addr list" 146 check "get_limits" "$(format_limits 0 2)" "defaults limits" 152 check "get_endpoint 1" "$(format_endpoints "1,10.0.1.1")" "simple add/get addr" 154 check "show_endpoints" \ 160 check "get_endpoint 2" "" "simple del addr" 161 check "show_endpoints" \ 166 check "get_endpoint 4" "" "duplicate addr" 169 check "get_endpoint 4" "$(format_endpoints "4,10.0.1.4,signal")" "id addr increment" 174 check "get_endpoint 9" "$(format_endpoints "9,10.0.1.9,signal")" "hard addr limit" [all …]
|
/linux/arch/m68k/fpsp040/ |
H A D | smovecr.S | 48 | check range of offset 52 cmpib #0x0a,%d0 |check range $01 - $0a 54 cmpib #0x0e,%d0 |check range $0b - $0e 56 cmpib #0x2f,%d0 |check range $10 - $2f 58 cmpib #0x3f,%d0 |check range $30 - $3f 64 tstb %d1 |offset is zero, check for rmode 66 cmpib #0x3,%d1 |check for rp 79 tstb %d1 |check for rmode 81 cmpib #0x3,%d1 |check for rp 85 cmpib #0x2,%d0 |check if result is inex [all …]
|
/linux/lib/ |
H A D | bitfield_kunit.c | 95 #define CHECK(tp, mask) do { \ macro 105 CHECK(u8, 0x0f); in test_bitfields_variables() 106 CHECK(u8, 0xf0); in test_bitfields_variables() 107 CHECK(u8, 0x38); in test_bitfields_variables() 109 CHECK(u16, 0x0038); in test_bitfields_variables() 110 CHECK(u16, 0x0380); in test_bitfields_variables() 111 CHECK(u16, 0x3800); in test_bitfields_variables() 112 CHECK(u16, 0x8000); in test_bitfields_variables() 114 CHECK(u32, 0x80000000); in test_bitfields_variables() 115 CHECK(u32, 0x7f000000); in test_bitfields_variables() [all …]
|
/linux/net/ipv4/ |
H A D | udp_offload.c | 46 partial = csum_sub(csum_unfold(uh->check), partial); in __skb_udp_tunnel_segment() 136 uh->check = ~csum_fold(csum_add(partial, in __skb_udp_tunnel_segment() 140 uh->check = gso_make_checksum(skb, ~uh->check); in __skb_udp_tunnel_segment() 141 if (uh->check == 0) in __skb_udp_tunnel_segment() 142 uh->check = CSUM_MANGLED_0; in __skb_udp_tunnel_segment() 146 skb->csum_offset = offsetof(struct udphdr, check); in __skb_udp_tunnel_segment() 205 if (uh->check) { in __udpv4_gso_segment_csum() 206 inet_proto_csum_replace4(&uh->check, seg, *oldip, *newip, in __udpv4_gso_segment_csum() 208 inet_proto_csum_replace2(&uh->check, seg, *oldport, *newport, in __udpv4_gso_segment_csum() 210 if (!uh->check) in __udpv4_gso_segment_csum() [all …]
|
/linux/include/net/ |
H A D | dsfield.h | 31 __u32 check = ntohs((__force __be16)iph->check); in ipv4_change_dsfield() local 35 check += iph->tos; in ipv4_change_dsfield() 36 if ((check+1) >> 16) check = (check+1) & 0xffff; in ipv4_change_dsfield() 37 check -= dsfield; in ipv4_change_dsfield() 38 check += check >> 16; /* adjust carry */ in ipv4_change_dsfield() 39 iph->check = (__force __sum16)htons(check); in ipv4_change_dsfield()
|