Esempio n. 1
0
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
	 */
}
Esempio n. 2
0
/*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);
}
Esempio n. 3
0
/*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);
}
Esempio n. 4
0
/* 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);
}
Esempio n. 5
0
/*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);
}
Esempio n. 6
0
void test_main(void)
{
	ztest_test_suite(vector_table_test,
			 ztest_unit_test(test_irq_vector_table)
			 );

	ztest_run_test_suite(vector_table_test);
}
Esempio n. 7
0
void test_main(void)
{
	ztest_test_suite(net_buf_test,
		ztest_unit_test(test_get_single_buffer)
	);

	ztest_run_test_suite(net_buf_test);
}
Esempio n. 8
0
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);
}
Esempio n. 9
0
/*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);
}
Esempio n. 10
0
/**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);
}
Esempio n. 11
0
/*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);
}
Esempio n. 12
0
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);
}
Esempio n. 13
0
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);
}
Esempio n. 14
0
/*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);
}
Esempio n. 15
0
void test_main(void)
{
	ztest_test_suite(_adc_test,
			 ztest_unit_test(adc_test));
	ztest_run_test_suite(_adc_test);
}
Esempio n. 16
0
/**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);
}
Esempio n. 17
0
/*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);
}
Esempio n. 18
0
void test_main(void)
{
	ztest_test_suite(pci_test, ztest_unit_test(pci_enumerate));
	ztest_run_test_suite(pci_test);
}
Esempio n. 19
0
/*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);
}
Esempio n. 20
0
void test_main(void)
{
	ztest_test_suite(kernel_critical_test, ztest_unit_test(test_critical));

	ztest_run_test_suite(kernel_critical_test);
}
Esempio n. 21
0
void test_main(void)
{
	ztest_test_suite(test_udp_fn,
		ztest_unit_test(run_tests));
	ztest_run_test_suite(test_udp_fn);
}