Home
last modified time | relevance | path

Searched full:assert (Results 1 – 25 of 1901) sorted by relevance

12345678910>>...77

/Linux-v6.6/tools/testing/selftests/bpf/
Dtest_lru_map.c10 #include <assert.h>
85 assert(!bpf_map_lookup_elem(mfd, &zero, value)); in bpf_map_lookup_elem_with_ref_bit()
100 assert(!bpf_map_lookup_elem(map1, &next_key, value1)); in map_subset()
157 assert(sched_next_online(0, &next_cpu) != -1); in test_lru_sanity0()
163 assert(lru_map_fd != -1); in test_lru_sanity0()
166 assert(expected_map_fd != -1); in test_lru_sanity0()
173 assert(!bpf_map_update_elem(lru_map_fd, &key, value, BPF_NOEXIST)); in test_lru_sanity0()
174 assert(!bpf_map_update_elem(expected_map_fd, &key, value, in test_lru_sanity0()
178 assert(bpf_map_update_elem(lru_map_fd, &key, value, BPF_NOEXIST) == -EEXIST); in test_lru_sanity0()
181 assert(bpf_map_update_elem(lru_map_fd, &key, value, -1) == -EINVAL); in test_lru_sanity0()
[all …]
Dtest_lpm_map.c13 #include <assert.h>
59 assert(node); in tlpm_add()
133 assert(0); in tlpm_delete()
143 assert(!tlpm_match(list, (uint8_t[]){ 0xff }, 8)); in test_lpm_basic()
146 assert(t1 == tlpm_match(list, (uint8_t[]){ 0xff }, 8)); in test_lpm_basic()
147 assert(t1 == tlpm_match(list, (uint8_t[]){ 0xff, 0xff }, 16)); in test_lpm_basic()
148 assert(t1 == tlpm_match(list, (uint8_t[]){ 0xff, 0x00 }, 16)); in test_lpm_basic()
149 assert(!tlpm_match(list, (uint8_t[]){ 0x7f }, 8)); in test_lpm_basic()
150 assert(!tlpm_match(list, (uint8_t[]){ 0xfe }, 8)); in test_lpm_basic()
151 assert(!tlpm_match(list, (uint8_t[]){ 0xff }, 7)); in test_lpm_basic()
[all …]
Dtest_maps.c13 #include <assert.h>
51 assert(bpf_map_update_elem(fd, &key, &value, BPF_ANY) == 0); in test_hashmap()
55 assert(bpf_map_update_elem(fd, &key, &value, BPF_NOEXIST) < 0 && in test_hashmap()
60 assert(bpf_map_update_elem(fd, &key, &value, -1) < 0 && in test_hashmap()
64 assert(bpf_map_lookup_elem(fd, &key, &value) == 0 && value == 1234); in test_hashmap()
69 assert(bpf_map_update_elem(fd, &key, &value, BPF_ANY) == 0); in test_hashmap()
72 assert(bpf_map_lookup_and_delete_elem(fd, &key, &value) == 0 && value == 1234); in test_hashmap()
75 assert(bpf_map_lookup_elem(fd, &key, &value) < 0 && errno == ENOENT); in test_hashmap()
78 assert(bpf_map_update_elem(fd, &key, &value, BPF_EXIST) < 0 && in test_hashmap()
83 assert(bpf_map_update_elem(fd, &key, &value, BPF_NOEXIST) == 0); in test_hashmap()
[all …]
/Linux-v6.6/tools/testing/selftests/hid/tests/
Dtest_sony.py48 assert libevdev.InputEvent(libevdev.EV_ABS.ABS_X) in events
52 assert x - 1 <= value <= x + 1
59 assert libevdev.InputEvent(libevdev.EV_ABS.ABS_Y) in events
61 assert y - 1 <= value <= y + 1
68 assert libevdev.InputEvent(libevdev.EV_ABS.ABS_Z) in events
70 assert z - 1 <= value <= z + 1
81 assert libevdev.InputEvent(libevdev.EV_ABS.ABS_RX) in events
85 assert rx - 64 <= value <= rx + 64
92 assert libevdev.InputEvent(libevdev.EV_ABS.ABS_RY) in events
94 assert ry - 64 <= value <= ry + 64
[all …]
Dtest_apple_keyboard.py176 assert evdev.value[libevdev.EV_KEY.KEY_ALL_APPLICATIONS] == 1
177 assert evdev.value[libevdev.EV_KEY.KEY_FN] == 0
185 assert evdev.value[libevdev.EV_KEY.KEY_ALL_APPLICATIONS] == 0
201 assert evdev.value[libevdev.EV_KEY.KEY_F4] == 1
209 assert evdev.value[libevdev.EV_KEY.KEY_F4] == 0
210 assert evdev.value[libevdev.EV_KEY.KEY_FN] == 1
233 assert evdev.value[libevdev.EV_KEY.KEY_F4] == 1
248 assert evdev.value[libevdev.EV_KEY.KEY_F4] == 0
264 assert evdev.value[libevdev.EV_KEY.KEY_ALL_APPLICATIONS] == 1
272 assert evdev.value[libevdev.EV_KEY.KEY_ALL_APPLICATIONS] == 0
[all …]
/Linux-v6.6/drivers/staging/media/atomisp/pci/
Disp2400_input_system_private.h30 assert(ID < N_INPUT_SYSTEM_ID); in input_system_reg_store()
31 assert(INPUT_SYSTEM_BASE[ID] != (hrt_address)-1); in input_system_reg_store()
41 assert(ID < N_INPUT_SYSTEM_ID); in input_system_reg_load()
42 assert(INPUT_SYSTEM_BASE[ID] != (hrt_address)-1); in input_system_reg_load()
52 assert(ID < N_RX_ID); in receiver_reg_store()
53 assert(RX_BASE[ID] != (hrt_address)-1); in receiver_reg_store()
62 assert(ID < N_RX_ID); in receiver_reg_load()
63 assert(RX_BASE[ID] != (hrt_address)-1); in receiver_reg_load()
73 assert(ID < N_RX_ID); in receiver_port_reg_store()
74 assert(port_ID < N_MIPI_PORT_ID); in receiver_port_reg_store()
[all …]
/Linux-v6.6/tools/testing/selftests/drivers/sdsi/
Dsdsi_test.py59 assert os.path.isfile(folder + "guid") == True
60 assert os.path.isfile(folder + "provision_akc") == True
61 assert os.path.isfile(folder + "provision_cap") == True
62 assert os.path.isfile(folder + "state_certificate") == True
63 assert os.path.isfile(folder + "registers") == True
68 assert mode == 0o444 # Read all
70 assert mode == 0o400 # Read owner
72 assert mode == 0o200 # Read owner
74 assert mode == 0o200 # Read owner
76 assert mode == 0o400 # Read owner
[all …]
/Linux-v6.6/fs/xfs/
Dxfs_trans_buf.c43 ASSERT(blip->bli_buf->b_map_count == nmaps); in xfs_trans_buf_item_match()
68 ASSERT(bp->b_transp == NULL); in _xfs_trans_bjoin()
77 ASSERT(!(bip->bli_flags & XFS_BLI_STALE)); in _xfs_trans_bjoin()
78 ASSERT(!(bip->__bli_format.blf_flags & XFS_BLF_CANCEL)); in _xfs_trans_bjoin()
79 ASSERT(!(bip->bli_flags & XFS_BLI_LOGGED)); in _xfs_trans_bjoin()
140 ASSERT(xfs_buf_islocked(bp)); in xfs_trans_get_buf_map()
146 ASSERT(bp->b_transp == tp); in xfs_trans_get_buf_map()
148 ASSERT(bip != NULL); in xfs_trans_get_buf_map()
149 ASSERT(atomic_read(&bip->bli_refcount) > 0); in xfs_trans_get_buf_map()
160 ASSERT(!bp->b_error); in xfs_trans_get_buf_map()
[all …]
/Linux-v6.6/tools/testing/radix-tree/
Dtag_check.c3 #include <assert.h>
20 assert(item_tag_get(tree, index, tag) == 0); in __simple_checks()
23 assert(item_tag_get(tree, index, tag) == 0); in __simple_checks()
26 assert(ret != 0); in __simple_checks()
28 assert(ret == 1); in __simple_checks()
30 assert(ret != 0); in __simple_checks()
32 assert(ret != 0); in __simple_checks()
35 assert(ret == 0); in __simple_checks()
37 assert(ret != 0); in __simple_checks()
39 assert(ret == 0); in __simple_checks()
[all …]
Didr-test.c19 assert(item->index == id); in item_idr_free()
28 assert(item->index == id); in item_idr_remove()
38 assert(idr_alloc_cyclic(&idr, DUMMY_PTR, 0, 0x4000, GFP_KERNEL) == 0); in idr_alloc_test()
39 assert(idr_alloc_cyclic(&idr, DUMMY_PTR, 0x3ffd, 0x4000, GFP_KERNEL) == 0x3ffd); in idr_alloc_test()
53 assert(id == item->index); in idr_alloc_test()
81 assert(idr_is_empty(&idr)); in idr_null_test()
83 assert(idr_alloc(&idr, NULL, 0, 0, GFP_KERNEL) == 0); in idr_null_test()
84 assert(!idr_is_empty(&idr)); in idr_null_test()
86 assert(idr_is_empty(&idr)); in idr_null_test()
88 assert(idr_alloc(&idr, NULL, 0, 0, GFP_KERNEL) == 0); in idr_null_test()
[all …]
/Linux-v6.6/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/
Dsp_private.h30 assert(ID < N_SP_ID); in sp_ctrl_store()
31 assert(SP_CTRL_BASE[ID] != (hrt_address)-1); in sp_ctrl_store()
40 assert(ID < N_SP_ID); in sp_ctrl_load()
41 assert(SP_CTRL_BASE[ID] != (hrt_address)-1); in sp_ctrl_load()
83 assert(ID < N_SP_ID); in sp_dmem_store()
84 assert(SP_DMEM_BASE[ID] != (hrt_address)-1); in sp_dmem_store()
95 assert(ID < N_SP_ID); in sp_dmem_load()
96 assert(SP_DMEM_BASE[ID] != (hrt_address)-1); in sp_dmem_load()
106 assert(ID < N_SP_ID); in sp_dmem_store_uint8()
107 assert(SP_DMEM_BASE[ID] != (hrt_address)-1); in sp_dmem_store_uint8()
[all …]
/Linux-v6.6/tools/testing/selftests/net/mptcp/
Dmptcp_sockopt.c5 #include <assert.h>
289 assert(ret < 0); /* 0 size_subflow_data */ in do_getsockopt_bogus_sf_data()
290 assert(olen == sizeof(good_data)); in do_getsockopt_bogus_sf_data()
295 assert(ret == 0); in do_getsockopt_bogus_sf_data()
296 assert(olen == sizeof(good_data)); in do_getsockopt_bogus_sf_data()
297 assert(bd.d.num_subflows == 1); in do_getsockopt_bogus_sf_data()
298 assert(bd.d.size_kernel > 0); in do_getsockopt_bogus_sf_data()
299 assert(bd.d.size_user == 0); in do_getsockopt_bogus_sf_data()
305 assert(ret < 0); /* bogus olen */ in do_getsockopt_bogus_sf_data()
306 assert(olen == _olen); /* must be unchanged */ in do_getsockopt_bogus_sf_data()
[all …]
/Linux-v6.6/tools/testing/selftests/sync/
Dsync_fence.c38 ASSERT(valid, "Failure allocating timeline\n"); in test_fence_one_timeline_wait()
42 ASSERT(valid, "Failure allocating fence\n"); in test_fence_one_timeline_wait()
46 ASSERT(ret == 0, "Failure waiting on fence until timeout\n"); in test_fence_one_timeline_wait()
50 ASSERT(ret == 0, "Failure advancing timeline\n"); in test_fence_one_timeline_wait()
54 ASSERT(ret == 0, "Failure waiting on fence until timeout\n"); in test_fence_one_timeline_wait()
58 ASSERT(ret == 0, "Failure signaling the fence\n"); in test_fence_one_timeline_wait()
62 ASSERT(ret > 0, "Failure waiting on fence\n"); in test_fence_one_timeline_wait()
66 ASSERT(ret == 0, "Failure going further\n"); in test_fence_one_timeline_wait()
68 ASSERT(ret > 0, "Failure waiting ahead\n"); in test_fence_one_timeline_wait()
89 ASSERT(valid, "Failure allocating fences\n"); in test_fence_one_timeline_merge()
[all …]
/Linux-v6.6/include/kunit/
Dassert.h51 typedef void (*assert_format_t)(const struct kunit_assert *assert,
61 * @assert: The parent of this type.
66 struct kunit_assert assert; member
69 void kunit_fail_assert_format(const struct kunit_assert *assert,
74 * struct kunit_unary_assert - Represents a KUNIT_{EXPECT|ASSERT}_{TRUE|FALSE}
75 * @assert: The parent of this type.
77 * @expected_true: True if of type KUNIT_{EXPECT|ASSERT}_TRUE, false otherwise.
81 * KUNIT_{EXPECT|ASSERT}_{TRUE|FALSE}
84 struct kunit_assert assert; member
89 void kunit_unary_assert_format(const struct kunit_assert *assert,
[all …]
/Linux-v6.6/scripts/kconfig/tests/choice/
D__init__.py15 assert conf.oldaskconfig() == 0
16 assert conf.stdout_contains('oldask0_expected_stdout')
20 assert conf.oldaskconfig('oldask1_config') == 0
21 assert conf.stdout_contains('oldask1_expected_stdout')
25 assert conf.allyesconfig() == 0
26 assert conf.config_contains('allyes_expected_config')
30 assert conf.allmodconfig() == 0
31 assert conf.config_contains('allmod_expected_config')
35 assert conf.allnoconfig() == 0
36 assert conf.config_contains('allno_expected_config')
[all …]
/Linux-v6.6/drivers/staging/media/atomisp/pci/isp/kernels/dvs/dvs_1.0/
Dia_css_dvs.host.c92 assert(config); in convert_coords_to_ispparams()
93 assert(gdc_warp_table); in convert_coords_to_ispparams()
94 assert(gdc_warp_table->address); in convert_coords_to_ispparams()
117 assert(width == num_blocks_x + in convert_coords_to_ispparams()
119 assert(height == num_blocks_y + 1); in convert_coords_to_ispparams()
138 /* Assert that right column's X is greater */ in convert_coords_to_ispparams()
139 assert(x01 >= xmin); in convert_coords_to_ispparams()
140 assert(x11 >= xmin); in convert_coords_to_ispparams()
141 /* Assert that bottom row's Y is greater */ in convert_coords_to_ispparams()
142 assert(y10 >= ymin); in convert_coords_to_ispparams()
[all …]
/Linux-v6.6/drivers/staging/media/atomisp/pci/isp/kernels/sdis/sdis_2/
Dia_css_sdis2.host.c51 assert(padding >= 0); in ia_css_sdis2_horicoef_vmem_encode()
52 assert(total_bytes <= size); in ia_css_sdis2_horicoef_vmem_encode()
53 assert(size % (IA_CSS_DVS2_NUM_COEF_TYPES * ISP_VEC_NELEMS * sizeof( in ia_css_sdis2_horicoef_vmem_encode()
76 assert(padding >= 0); in ia_css_sdis2_vertcoef_vmem_encode()
77 assert(total_bytes <= size); in ia_css_sdis2_vertcoef_vmem_encode()
78 assert(size % (IA_CSS_DVS2_NUM_COEF_TYPES * ISP_VEC_NELEMS * sizeof( in ia_css_sdis2_vertcoef_vmem_encode()
123 assert(stream); in ia_css_get_isp_dvs2_coefficients()
124 assert(hor_coefs_odd_real); in ia_css_get_isp_dvs2_coefficients()
125 assert(hor_coefs_odd_imag); in ia_css_get_isp_dvs2_coefficients()
126 assert(hor_coefs_even_real); in ia_css_get_isp_dvs2_coefficients()
[all …]
/Linux-v6.6/tools/virtio/ringtest/
Dmain.c11 #include <assert.h>
41 assert(r == sizeof v); in notify()
52 assert(r == sizeof v); in wait_for_notify()
88 assert(!*endptr); in set_affinity()
90 assert(cpu >= 0 && cpu < CPU_SETSIZE); in set_affinity()
97 assert(!ret); in set_affinity()
148 assert(completed <= bufs); in run_guest()
149 assert(started <= bufs); in run_guest()
193 assert(completed <= bufs); in run_host()
303 assert(kickfd >= 0); in main()
[all …]
/Linux-v6.6/drivers/staging/media/atomisp/pci/camera/pipe/src/
Dpipe_binarydesc.c46 assert(pipe); in pipe_binarydesc_get_offline()
47 assert(descr); in pipe_binarydesc_get_offline()
89 assert(pipe); in ia_css_pipe_get_copy_binarydesc()
90 assert(in_info); in ia_css_pipe_get_copy_binarydesc()
116 assert(pipe); in ia_css_pipe_get_vfpp_binarydesc()
117 assert(in_info); in ia_css_pipe_get_vfpp_binarydesc()
171 /* Assert if the resolutions are not set */ in binarydesc_calculate_bds_factor()
172 assert(in_w != 0 && in_h != 0); in binarydesc_calculate_bds_factor()
173 assert(out_w != 0 && out_h != 0); in binarydesc_calculate_bds_factor()
210 assert(pipe); in ia_css_pipe_get_preview_binarydesc()
[all …]
/Linux-v6.6/tools/testing/selftests/proc/
Dproc-subset-pid.c21 #include <assert.h>
78 assert(d); in main()
89 assert(!dot); in main()
91 assert(de->d_type == DT_DIR); in main()
93 assert(!dot_dot); in main()
95 assert(de->d_type == DT_DIR); in main()
97 assert(!self); in main()
99 assert(de->d_type == DT_LNK); in main()
101 assert(!thread_self); in main()
103 assert(de->d_type == DT_LNK); in main()
[all …]
Dfd-002-posix-eq.c18 #include <assert.h>
33 assert(fd0 >= 0); in main()
37 assert(fd1 >= 0); in main()
41 assert(fd2 >= 0); in main()
44 assert(rv == 0); in main()
46 assert(rv == 0); in main()
48 assert(rv == 0); in main()
50 assert(st0.st_dev == st1.st_dev); in main()
51 assert(st0.st_ino == st1.st_ino); in main()
53 assert(st0.st_dev == st2.st_dev); in main()
[all …]
Dproc-pid-vm.c28 #include <assert.h>
366 assert(rv == len); in main()
367 assert(memcmp(buf, buf0, strlen(buf0)) == 0); in main()
369 assert(memcmp(buf + strlen(buf0), str_vsyscall, strlen(str_vsyscall)) == 0); in main()
385 assert(0 <= rv && rv <= sizeof(buf)); in main()
387 assert(rv >= strlen(buf0)); in main()
388 assert(memcmp(buf, buf0, strlen(buf0)) == 0); in main()
394 assert(memmem(buf, rv, RSS1, strlen(RSS1)) || in main()
396 assert(memmem(buf, rv, PSS1, strlen(PSS1)) || in main()
412 assert(memmem(buf, rv, S[i], strlen(S[i]))); in main()
[all …]
/Linux-v6.6/lib/kunit/
Dassert.c8 #include <kunit/assert.h>
40 void kunit_fail_assert_format(const struct kunit_assert *assert, in kunit_fail_assert_format() argument
48 void kunit_unary_assert_format(const struct kunit_assert *assert, in kunit_unary_assert_format() argument
54 unary_assert = container_of(assert, struct kunit_unary_assert, assert); in kunit_unary_assert_format()
68 void kunit_ptr_not_err_assert_format(const struct kunit_assert *assert, in kunit_ptr_not_err_assert_format() argument
74 ptr_assert = container_of(assert, struct kunit_ptr_not_err_assert, in kunit_ptr_not_err_assert_format()
75 assert); in kunit_ptr_not_err_assert_format()
114 void kunit_binary_assert_format(const struct kunit_assert *assert, in kunit_binary_assert_format() argument
120 binary_assert = container_of(assert, struct kunit_binary_assert, in kunit_binary_assert_format()
121 assert); in kunit_binary_assert_format()
[all …]
/Linux-v6.6/tools/virtio/
Dvirtio_test.c9 #include <assert.h>
59 assert(r == sizeof v); in vq_notify()
81 assert(r >= 0); in vhost_vq_setup()
84 assert(r >= 0); in vhost_vq_setup()
87 assert(r >= 0); in vhost_vq_setup()
89 assert(r >= 0); in vhost_vq_setup()
92 assert(r >= 0); in vhost_vq_setup()
95 assert(r >= 0); in vhost_vq_setup()
107 assert(info->vq); in vq_reset()
119 assert(r >= 0); in vq_info_add()
[all …]
/Linux-v6.6/tools/testing/selftests/powerpc/signal/
Dsigreturn_vdso.c20 // Ensure assert() is not compiled out
22 #include <assert.h>
82 assert(sigaction(SIGUSR1, &act, NULL) == 0); in test_sigreturn_vdso()
85 assert(search_proc_maps("[vdso]", &low, &high) == 0); in test_sigreturn_vdso()
90 assert(took_signal == 1); in test_sigreturn_vdso()
95 assert(p != MAP_FAILED); in test_sigreturn_vdso()
96 assert(mremap((void *)low, size, size, MREMAP_MAYMOVE|MREMAP_FIXED, p) != MAP_FAILED); in test_sigreturn_vdso()
97 assert(search_proc_maps("[vdso]", &low, &high) == 0); in test_sigreturn_vdso()
102 assert(took_signal == 2); in test_sigreturn_vdso()
105 assert(munmap((void *)low, size) == 0); in test_sigreturn_vdso()
[all …]

12345678910>>...77