Home
last modified time | relevance | path

Searched refs:assert (Results 1 – 25 of 615) sorted by relevance

12345678910>>...25

/xnu-12377.1.9/tests/skywalk/
H A Dskt_shutdown.c70 assert(channel); in skt_shutdown_common()
73 assert(channelfd != -1); in skt_shutdown_common()
76 assert(sock_fd != -1); in skt_shutdown_common()
93 assert(!FD_ISSET(channelfd, &rfdset)); in skt_shutdown_common()
94 assert(!FD_ISSET(channelfd, &wfdset)); in skt_shutdown_common()
95 assert(FD_ISSET(channelfd, &efdset)); in skt_shutdown_common()
108 assert(sock_fds.fd == sock_fd); in skt_shutdown_common()
109 assert(sock_fds.events == POLLWRNORM); in skt_shutdown_common()
110 assert((sock_fds.revents & POLLHUP) != 0); in skt_shutdown_common()
119 assert(fds.fd == channelfd); in skt_shutdown_common()
[all …]
H A Dskt_fullupipe.c85 assert(channel0); in skt_fullupipe_main()
89 assert(channel1); in skt_fullupipe_main()
92 assert(txring0); in skt_fullupipe_main()
94 assert(rxring1); in skt_fullupipe_main()
98 assert(txavail0 == NSLOTS - 1); in skt_fullupipe_main()
103 assert(txslot0); in skt_fullupipe_main()
106 assert(!os_channel_get_next_slot(txring0, txslot0, NULL)); in skt_fullupipe_main()
110 assert(rxavail1 == 0); in skt_fullupipe_main()
112 assert(!os_channel_get_next_slot(rxring1, rxslot1, NULL)); in skt_fullupipe_main()
119 assert(txavail0 == 0); in skt_fullupipe_main()
[all …]
H A Dskt_oneslot.c68 assert(channel); in skt_oneslot_common()
71 assert(channelfd != -1); in skt_oneslot_common()
94 assert(!FD_ISSET(channelfd, &rfdset)); in skt_oneslot_common()
95 assert(FD_ISSET(channelfd, &wfdset)); in skt_oneslot_common()
96 assert(!FD_ISSET(channelfd, &efdset)); in skt_oneslot_common()
106 assert(fds.fd == channelfd); in skt_oneslot_common()
107 assert(fds.events == POLLWRNORM); in skt_oneslot_common()
108 assert(fds.revents == POLLWRNORM); in skt_oneslot_common()
112 assert(kq != -1); in skt_oneslot_common()
117 assert(kev.filter == EVFILT_WRITE); in skt_oneslot_common()
[all …]
H A Dskt_flow.c62 assert(flow); in skt_flow_add_del()
65 assert(!flow); in skt_flow_add_del()
93 assert(regular_flow_0); in skt_flow_req_low_latency()
100 assert(regular_flow_1); in skt_flow_req_low_latency()
103 assert(regular_flow_0->nfr.nfr_nx_port == in skt_flow_req_low_latency()
111 assert(low_latency_flow_0); in skt_flow_req_low_latency()
114 assert(low_latency_flow_0->nfr.nfr_nx_port != in skt_flow_req_low_latency()
122 assert(low_latency_flow_1); in skt_flow_req_low_latency()
125 assert(low_latency_flow_0->nfr.nfr_nx_port == in skt_flow_req_low_latency()
176 assert(flow); in skt_flow_config_main()
[all …]
H A Dskt_flowlookup.c119 assert(ret == 1); in test_tcp_flow_send()
128 assert(rx_payload.packet_number == 0); in test_tcp_flow_send()
129 assert(strcmp(rx_payload.data, tx_payload.data) == 0); in test_tcp_flow_send()
159 assert(ret == 1); in test_tcp_flow_receive()
162 assert(uuid_compare(rx_frame->flow_uuid, flow->nfr.nfr_flow_uuid) == 0); in test_tcp_flow_receive()
166 assert(ret == 0); in test_tcp_flow_receive()
167 assert(rx_payload.packet_number == 0); in test_tcp_flow_receive()
168 assert(strcmp(rx_payload.data, tx_payload.data) == 0); in test_tcp_flow_receive()
184 assert(listener); in test_tcp_flow_listen()
195 assert(ret == 1); in test_tcp_flow_listen()
[all …]
H A Dskt_debug_verify.c66 assert(channel); in skt_debug_verify_main()
69 assert(channelfd != -1); in skt_debug_verify_main()
72 assert(kq != -1); in skt_debug_verify_main()
77 assert(kev.filter == EVFILT_WRITE); in skt_debug_verify_main()
78 assert(kev.ident == channelfd); in skt_debug_verify_main()
79 assert(kev.udata == NULL); in skt_debug_verify_main()
84 assert(txring); in skt_debug_verify_main()
87 assert(avail); in skt_debug_verify_main()
90 assert(slot); in skt_debug_verify_main()
92 assert(prop.sp_buf_ptr); in skt_debug_verify_main()
[all …]
H A Dskt_nslots.c75 assert(channel); in skt_nslots_common()
78 assert(channelfd != -1); in skt_nslots_common()
90 assert(kq != -1); in skt_nslots_common()
105 assert(attrval != -1); in skt_nslots_common()
112 assert(slotsize != -1); in skt_nslots_common()
113 assert(slotsize >= sizeof(sendcount)); in skt_nslots_common()
130 assert(ring); in skt_nslots_common()
139 assert(FD_ISSET(channelfd, &fdset)); in skt_nslots_common()
140 assert(!FD_ISSET(channelfd, &efdset)); in skt_nslots_common()
147 assert(fds.fd == channelfd); in skt_nslots_common()
[all …]
H A Dskt_badring.c66 assert(channel); in skt_badringtx_common()
69 assert(channelfd != -1); in skt_badringtx_common()
73 assert(ring); in skt_badringtx_common()
98 assert(!FD_ISSET(channelfd, &rfdset)); in skt_badringtx_common()
99 assert(FD_ISSET(channelfd, &wfdset)); // XXX is it correct to return writable as well as error? in skt_badringtx_common()
100 assert(FD_ISSET(channelfd, &efdset)); in skt_badringtx_common()
115 assert(fds.fd == channelfd); in skt_badringtx_common()
116 assert(fds.events == POLLSTANDARD); in skt_badringtx_common()
118 assert(fds.revents == POLLNVAL); in skt_badringtx_common()
128 assert(kq != -1); in skt_badringtx_common()
[all …]
H A Dskt_features.c49 assert(len == sizeof(features)); in skt_features_main()
53 assert(features & SK_FEATURE_SKYWALK); in skt_features_main()
54 assert(features & SK_FEATURE_NETNS); in skt_features_main()
55 assert(features & SK_FEATURE_NEXUS_USER_PIPE); in skt_features_main()
56 assert(features & SK_FEATURE_NEXUS_KERNEL_PIPE); in skt_features_main()
57 assert(features & SK_FEATURE_NEXUS_FLOWSWITCH); in skt_features_main()
58 assert(features & SK_FEATURE_NEXUS_NETIF); in skt_features_main()
61 assert(features & SK_FEATURE_NEXUS_KERNEL_PIPE_LOOPBACK); in skt_features_main()
62 assert(features & SK_FEATURE_DEV_OR_DEBUG); in skt_features_main()
64 assert(!(features & SK_FEATURE_NEXUS_KERNEL_PIPE_LOOPBACK)); in skt_features_main()
[all …]
H A Dskt_netifdirect.c121 assert(mach_timebase_info(&timebase_info) == KERN_SUCCESS); in init_expiration_deadline_mach()
173 assert(handles->controller != NULL); in skt_setup_netif_with_ipv6_flow()
175 assert(sktc_get_netif_nexus(handles->netif_ifname, in skt_setup_netif_with_ipv6_flow()
203 assert(buf != NULL); in skt_netif_ipv6_udp_frame_populate()
207 assert(bdlim != 0); in skt_netif_ipv6_udp_frame_populate()
209 assert(baddr != NULL); in skt_netif_ipv6_udp_frame_populate()
212 assert(os_packet_get_buflet_count(ph) == 1); in skt_netif_ipv6_udp_frame_populate()
213 assert(bdlim >= frame_length); in skt_netif_ipv6_udp_frame_populate()
265 assert(os_packet_get_buflet_count(ph) == 1); in skt_netif_ipv6_udp_frame_process()
267 assert(buflet != NULL); in skt_netif_ipv6_udp_frame_process()
[all …]
H A Dskt_ringid.c87 assert(channel); in skt_ringid_main_common()
92 assert(lringid - fringid == num - 1); in skt_ringid_main_common()
94 assert(fringid == 0); // XXX violates opaque abstraction in skt_ringid_main_common()
99 assert(ring); in skt_ringid_main_common()
103 assert(ringid == lringid + 1); in skt_ringid_main_common()
105 assert(!ring); in skt_ringid_main_common()
118 assert(channel); in skt_ringid_main_common()
121 assert(ringid2 == ringid); in skt_ringid_main_common()
124 assert(ringid2 == ringid); in skt_ringid_main_common()
128 assert(ringid2 != ringid || ring); in skt_ringid_main_common()
[all …]
H A Dskt_steering.c58 assert(err == 0); in fill_traffic_descriptor_eth()
144 assert(ctl != NULL); in skt_steering_main()
153 assert(err == 0); in skt_steering_main()
161 assert(err != 0); in skt_steering_main()
168 assert(err == 0); in skt_steering_main()
172 assert(err == 0); in skt_steering_main()
176 assert(err == 0); in skt_steering_main()
184 assert(err == 0); in skt_steering_main()
190 assert(err != 0); in skt_steering_main()
197 assert(err != 0); in skt_steering_main()
[all …]
H A Dskt_closenfd.c46 assert(ncd); in skt_closenfd_main()
49 assert(nfd != -1); in skt_closenfd_main()
78 assert(ncd); in skt_writenfd_main()
81 assert(nfd != -1); in skt_writenfd_main()
84 assert(ret == -1); in skt_writenfd_main()
85 assert(errno == EBADF); in skt_writenfd_main()
109 assert(ncd); in skt_readnfd_main()
112 assert(nfd != -1); in skt_readnfd_main()
115 assert(ret == -1); in skt_readnfd_main()
116 assert(errno == ENXIO); in skt_readnfd_main()
/xnu-12377.1.9/osfmk/tests/
H A Dbitmap_test.c62 #ifdef assert
63 #undef assert
65 #define assert(x) T_ASSERT(x, NULL) macro
78 assert(bitmap_is_full(map, nbits)); in test_bitmap()
82 assert(i == expected_result); in test_bitmap()
85 assert(expected_result == -1); in test_bitmap()
89 assert(bitmap_first(map, nbits) == -1); in test_bitmap()
90 assert(bitmap_lsb_first(map, nbits) == -1); in test_bitmap()
93 assert(bitmap_is_full(map, nbits)); in test_bitmap()
97 assert(i == expected_result); in test_bitmap()
[all …]
/xnu-12377.1.9/tests/vm/
H A Dconfigurator_test.c127 assert(start % PAGE_SIZE == 0); in assert_hole_checker_and_entry()
128 assert(size % PAGE_SIZE == 0); in assert_hole_checker_and_entry()
129 assert(checker->kind == Hole); in assert_hole_checker_and_entry()
130 assert(checker->address == start); in assert_hole_checker_and_entry()
131 assert(checker->size == size); in assert_hole_checker_and_entry()
133 assert(is_hole(start, size, checker->submap_depth)); in assert_hole_checker_and_entry()
146 assert(start % PAGE_SIZE == 0); in assert_allocation_checker()
147 assert(size % PAGE_SIZE == 0); in assert_allocation_checker()
148 assert(checker->kind == Allocation); in assert_allocation_checker()
149 assert(checker->address == start); in assert_allocation_checker()
[all …]
/xnu-12377.1.9/iokit/Tests/
H A DTests.cpp234 assert(KERN_SUCCESS == kr); in TestZLib_alloc()
807 assert(wl); in IOWorkLoopTest()
809 assert(tes); in IOWorkLoopTest()
811 assert(kIOReturnSuccess == err); in IOWorkLoopTest()
825 assert(kIOReturnSuccess == err); in IOWorkLoopTest()
836 assert(ies); in IOWorkLoopTest()
839 assert(kIOReturnSuccess == err); in IOWorkLoopTest()
870 assert(dict); in OSCollectionTest()
874 assert(str); in OSCollectionTest()
883 assert(serializer); in OSCollectionTest()
[all …]
H A DTestIOMemoryDescriptor.cpp101 assert(mds[0]); in IOMultMemoryDescriptorTest()
105 assert(0 == dmaOffset); in IOMultMemoryDescriptorTest()
106 assert(ptoa(1) == dmaLen); in IOMultMemoryDescriptorTest()
110 assert(mds[0]); in IOMultMemoryDescriptorTest()
114 assert((page_size - 2) == dmaOffset); in IOMultMemoryDescriptorTest()
115 assert(ptoa(2) == dmaLen); in IOMultMemoryDescriptorTest()
123 assert(0 == dmaOffset); in IOMultMemoryDescriptorTest()
124 assert(ptoa(8) == dmaLen); in IOMultMemoryDescriptorTest()
130 assert(0 == dmaOffset); in IOMultMemoryDescriptorTest()
131 assert(ptoa(2) == dmaLen); in IOMultMemoryDescriptorTest()
[all …]
/xnu-12377.1.9/libkern/kxld/tests/
H A Dkxld_array_test.c62 assert(rval == KERN_SUCCESS); in main()
63 assert(array.nitems == titems); in main()
68 assert(item); in main()
69 assert(item == kxld_array_get_slot(&array, idx)); in main()
73 assert(item); in main()
74 assert(item == kxld_array_get_slot(&array, idx)); in main()
78 assert(!item); in main()
82 assert(item == kxld_array_get_slot(&array, idx)); in main()
88 assert(rval == KERN_SUCCESS); in main()
89 assert(array.nitems == titems); in main()
[all …]
H A Dkxld_dict_test.c61 assert(result == KERN_SUCCESS); in main()
63 assert(size == 0); in main()
67 assert(b == NULL); in main()
71 assert(result == KERN_SUCCESS); in main()
73 assert(b && *(int*)b == a1); in main()
75 assert(size == 1); in main()
79 assert(result == KERN_SUCCESS); in main()
81 assert(b && *(int*)b == a2); in main()
83 assert(size == 1); in main()
88 assert(result == KERN_SUCCESS); in main()
[all …]
/xnu-12377.1.9/osfmk/ipc/
H A Dipc_right.c283 assert(space != IS_NULL); in ipc_right_lookup_write()
325 assert(space != IS_NULL); in ipc_right_lookup_two_write()
371 assert(is_active(space)); in ipc_right_reverse()
379 assert(name != MACH_PORT_NULL); in ipc_right_reverse()
383 assert(entry != IE_NULL); in ipc_right_reverse()
384 assert(entry->ie_bits & MACH_PORT_TYPE_RECEIVE); in ipc_right_reverse()
385 assert(port == entry->ie_port); in ipc_right_reverse()
394 assert(entry != IE_NULL); in ipc_right_reverse()
395 assert(IE_BITS_TYPE(entry->ie_bits) == MACH_PORT_TYPE_SEND); in ipc_right_reverse()
396 assert(port == entry->ie_port); in ipc_right_reverse()
[all …]
/xnu-12377.1.9/osfmk/vm/
H A Dvm_tests.c109 assert(backing_object != VM_OBJECT_NULL); in vm_test_collapse_compressor()
118 assert(kr == KERN_SUCCESS); in vm_test_collapse_compressor()
153 assert(backing_object->paging_offset == 0); in vm_test_collapse_compressor()
159 assert(top_object != VM_OBJECT_NULL); in vm_test_collapse_compressor()
168 assert(kr == KERN_SUCCESS); in vm_test_collapse_compressor()
289 assert(user_pmap); in vm_test_wire_and_extract()
304 assert(kr == KERN_SUCCESS); in vm_test_wire_and_extract()
318 assert(kr == KERN_SUCCESS); in vm_test_wire_and_extract()
327 assert(kr == KERN_SUCCESS); in vm_test_wire_and_extract()
347 assert(kr == KERN_SUCCESS); in vm_test_wire_and_extract()
[all …]
H A Dvm_purgeable.c124 assert(queue->token_q_unripe); in vm_purgeable_token_check_queue()
126 assert(token == queue->token_q_unripe); in vm_purgeable_token_check_queue()
132 assert(queue->token_q_tail == token); in vm_purgeable_token_check_queue()
140 assert(queue->token_q_unripe == unripe); in vm_purgeable_token_check_queue()
142 assert(token_cnt == queue->debug_count_tokens); in vm_purgeable_token_check_queue()
147 assert(our_inactive_count >= 0); in vm_purgeable_token_check_queue()
148 assert((uint32_t) our_inactive_count == vm_page_inactive_count - vm_page_cleaned_count); in vm_purgeable_token_check_queue()
236 assert(token_init_idx < token_q_max_cnt); /* We must have a free token now */ in vm_purgeable_token_add()
253 assert(token); in vm_purgeable_token_add()
261 assert(pages >= 0); in vm_purgeable_token_add()
[all …]
/xnu-12377.1.9/iokit/bsddev/skywalk/
H A DIOSkywalkSupport.cpp322 assert(IOSK_OFFSET_OK(regionOffset)); in OSDefineMetaClassAndFinalStructors()
328 assert(fMemoryMapCount != 0); in OSDefineMetaClassAndFinalStructors()
347 assert(fMemoryMapCount != 0); in free()
373 assert(segIndex < fMemoryMapCount); in map()
374 assert(buffer != NULL); in map()
383 assert(map->getMemoryDescriptor() == buffer); in map()
392 assert((offset + fRegion->getSegmentSize()) <= fMapper->fMapSize); in map()
397 assert((map == NULL) || (map->getLength() == fRegion->getSegmentSize())); in map()
418 assert(segIndex < fMemoryMapCount); in unmap()
427 assert((offset + fRegion->getSegmentSize()) <= fMapper->fMapSize); in unmap()
[all …]
/xnu-12377.1.9/osfmk/kdp/output_stages/
H A Dout_lz4.c65 assert(compression_ki_ptr); in lz4_stage_reset()
67 assert(stage); in lz4_stage_reset()
68 assert(stage->kos_initialized); in lz4_stage_reset()
71 assert(data); in lz4_stage_reset()
97 assert(compression_ki_ptr); in lz4_stage_stream()
99 assert(data); in lz4_stage_stream()
100 assert(next_stage); in lz4_stage_stream()
101 assert(written); in lz4_stage_stream()
104 assert((src_buf && src_buf_size) || finalize); in lz4_stage_stream()
157 assert(stage); in lz4_stage_outproc()
[all …]
/xnu-12377.1.9/osfmk/i386/
H A Dphys.c95 assert(pn != vm_page_fictitious_addr); in pmap_zero_page()
96 assert(pn != vm_page_guard_addr); in pmap_zero_page()
118 assert(pn != vm_page_fictitious_addr); in pmap_zero_part_page()
119 assert(pn != vm_page_guard_addr); in pmap_zero_part_page()
120 assert(offset + len <= PAGE_SIZE); in pmap_zero_part_page()
137 assert(psrc != vm_page_fictitious_addr); in pmap_copy_part_page()
138 assert(pdst != vm_page_fictitious_addr); in pmap_copy_part_page()
139 assert(psrc != vm_page_guard_addr); in pmap_copy_part_page()
140 assert(pdst != vm_page_guard_addr); in pmap_copy_part_page()
145 assert((((uintptr_t)dst & PAGE_MASK) + dst_offset + len) <= PAGE_SIZE); in pmap_copy_part_page()
[all …]

12345678910>>...25