void test_dns_response(void) { struct dns_response_test test1 = { .dname = DNAME1, .res = resp_ipv4, .res_len = sizeof(resp_ipv4), .tid = 0xb041, .answer_type = DNS_RR_TYPE_A, .ancount = 1, .ttl = 3028, .ra = 1, .rdlen = 4, /* IPv4 test */ .rdata = resp_ipv4_addr }; int rc; rc = eval_response1(&test1); zassert_equal(rc, 0, "Response test failed for domain: "DNAME1); } void test_main(void) { ztest_test_suite(dns_tests, ztest_unit_test(test_dns_query), ztest_unit_test(test_dns_response)); ztest_run_test_suite(dns_tests); /* TODO: * 1) add malformed DNS data * 2) add validations against buffer overflows * 3) add debug info to detect the exit point (or split the tests) * 4) add test data with CNAME and more RR */ }
/*test case main entry*/ void test_main(void *p1, void *p2, void *p3) { ztest_test_suite(test_poll_api , ztest_unit_test(test_poll_no_wait) , ztest_unit_test(test_poll_wait) , ztest_unit_test(test_poll_eaddrinuse) ); ztest_run_test_suite(test_poll_api); }
/*test case main entry*/ void test_main(void *p1, void *p2, void *p3) { ztest_test_suite(test_lifo_api, ztest_unit_test(test_lifo_thread2thread), ztest_unit_test(test_lifo_thread2isr), ztest_unit_test(test_lifo_isr2thread), ztest_unit_test(test_lifo_get_fail), ztest_unit_test(test_lifo_loop)); ztest_run_test_suite(test_lifo_api); }
/* test case main entry */ void test_main(void *p1, void *p2, void *p3) { ARG_UNUSED(p1); ARG_UNUSED(p2); ARG_UNUSED(p3); test_systhreads_setup(); ztest_test_suite(test_systhreads, ztest_unit_test(test_systhreads_main), ztest_unit_test(test_systhreads_idle)); ztest_run_test_suite(test_systhreads); }
/*test case main entry*/ void test_main(void *p1, void *p2, void *p3) { ztest_test_suite(test_threads_lifecycle, ztest_unit_test(test_threads_spawn_params), ztest_unit_test(test_threads_spawn_priority), ztest_unit_test(test_threads_spawn_delay), ztest_unit_test(test_threads_suspend_resume_cooperative), ztest_unit_test(test_threads_suspend_resume_preemptible), ztest_unit_test(test_threads_cancel_undelayed), ztest_unit_test(test_threads_cancel_delayed), ztest_unit_test(test_threads_cancel_started), ztest_unit_test(test_threads_abort_self), ztest_unit_test(test_threads_abort_others) ); ztest_run_test_suite(test_threads_lifecycle); }
void test_main(void) { ztest_test_suite(vector_table_test, ztest_unit_test(test_irq_vector_table) ); ztest_run_test_suite(vector_table_test); }
void test_main(void) { ztest_test_suite(net_buf_test, ztest_unit_test(test_get_single_buffer) ); ztest_run_test_suite(net_buf_test); }
void test_main(void) { ztest_test_suite(wdt_basic_test, #ifdef INT_RESET ztest_unit_test(test_wdt_int_reset_26)); #else ztest_unit_test(test_wdt_reset_26)); #endif ztest_run_test_suite(wdt_basic_test); }
/*test case main entry*/ void test_main(void *p1, void *p2, void *p3) { ztest_test_suite(test_mbox_api, ztest_unit_test(test_mbox_kinit),/*keep init first!*/ ztest_unit_test(test_mbox_kdefine), ztest_unit_test(test_mbox_put_get_null), ztest_unit_test(test_mbox_put_get_buffer), ztest_unit_test(test_mbox_async_put_get_buffer), ztest_unit_test(test_mbox_async_put_get_block), ztest_unit_test(test_mbox_target_source_thread_buffer), ztest_unit_test(test_mbox_target_source_thread_block)); ztest_run_test_suite(test_mbox_api); }
/**test case main entry*/ void test_main(void *p1, void *p2, void *p3) { ztest_test_suite(test_ccm_fn, ztest_unit_test(test_vector_1), ztest_unit_test(test_vector_2), ztest_unit_test(test_vector_3), ztest_unit_test(test_vector_4), ztest_unit_test(test_vector_5), ztest_unit_test(test_vector_6), ztest_unit_test(test_vector_7), ztest_unit_test(test_vector_8)); ztest_run_test_suite(test_ccm_fn); }
/*test case main entry*/ void test_main(void *p1, void *p2, void *p3) { ztest_test_suite(test_fifo_api, ztest_unit_test(test_fifo_thread2thread), ztest_unit_test(test_fifo_thread2isr), ztest_unit_test(test_fifo_isr2thread), ztest_unit_test(test_fifo_get_fail), ztest_unit_test(test_fifo_loop), ztest_unit_test(test_fifo_cancel_wait), ztest_unit_test(test_fifo_is_empty_thread), ztest_unit_test(test_fifo_is_empty_isr)); ztest_run_test_suite(test_fifo_api); }
void test_main(void) { ztest_test_suite(net_pkt_tests, ztest_unit_test(test_ipv6_multi_frags), ztest_unit_test(test_fragment_copy), ztest_unit_test(test_pkt_read_append), ztest_unit_test(test_pkt_read_write_insert), ztest_unit_test(test_fragment_compact), ztest_unit_test(test_fragment_split) ); ztest_run_test_suite(net_pkt_tests); }
void test_main(void) { ztest_test_suite(net_iface_test, ztest_unit_test(iface_setup), ztest_unit_test(send_iface1), ztest_unit_test(send_iface2), ztest_unit_test(send_iface3), ztest_unit_test(send_iface1_down), ztest_unit_test(send_iface1_up) ); ztest_run_test_suite(net_iface_test); }
/*test case main entry*/ void test_main(void *p1, void *p2, void *p3) { ztest_test_suite(test_mslab_concept, ztest_unit_test(test_mslab_alloc_wait_prio)); ztest_run_test_suite(test_mslab_concept); }
void test_main(void) { ztest_test_suite(_adc_test, ztest_unit_test(adc_test)); ztest_run_test_suite(_adc_test); }
/**test case main entry*/ void test_main(void *p1, void *p2, void *p3) { ztest_test_suite(test_mbedtls_fn, ztest_unit_test(test_mbedtls)); ztest_run_test_suite(test_mbedtls_fn); }
/*test case main entry*/ void test_main(void *p1, void *p2, void *p3) { ztest_test_suite(test_workq_api, ztest_unit_test(test_workq_start_before_submit),/*keep first!*/ ztest_unit_test(test_work_submit_to_queue_thread), ztest_unit_test(test_work_submit_to_queue_isr), ztest_unit_test(test_work_submit_thread), ztest_unit_test(test_work_submit_isr), ztest_unit_test(test_delayed_work_submit_to_queue_thread), ztest_unit_test(test_delayed_work_submit_to_queue_isr), ztest_unit_test(test_delayed_work_submit_thread), ztest_unit_test(test_delayed_work_submit_isr), ztest_unit_test(test_delayed_work_cancel_from_queue_thread), ztest_unit_test(test_delayed_work_cancel_from_queue_isr), ztest_unit_test(test_delayed_work_cancel_thread), ztest_unit_test(test_delayed_work_cancel_isr)); ztest_run_test_suite(test_workq_api); }
void test_main(void) { ztest_test_suite(pci_test, ztest_unit_test(pci_enumerate)); ztest_run_test_suite(pci_test); }
/*test case main entry*/ void test_main(void *p1, void *p2, void *p3) { ztest_test_suite(test_context_errno, ztest_unit_test(test_thread_context)); ztest_run_test_suite(test_context_errno); }
void test_main(void) { ztest_test_suite(kernel_critical_test, ztest_unit_test(test_critical)); ztest_run_test_suite(kernel_critical_test); }
void test_main(void) { ztest_test_suite(test_udp_fn, ztest_unit_test(run_tests)); ztest_run_test_suite(test_udp_fn); }