Skip to content

Commit 39b1312

Browse files
nashifkartben
authored andcommitted
tests: kernel: mbox: fix doxygen grouping
Fix grouping and general doxygen fixups. Signed-off-by: Anas Nashif <anas.nashif@intel.com>
1 parent 70b2b95 commit 39b1312

File tree

1 file changed

+74
-8
lines changed

1 file changed

+74
-8
lines changed

tests/kernel/mbox/mbox_api/src/test_mbox_api.c

Lines changed: 74 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -417,13 +417,32 @@ static void tmbox(struct k_mbox *pmbox)
417417
k_thread_abort(receiver_tid);
418418
}
419419

420-
/*test cases*/
420+
/**
421+
* @addtogroup kernel_mbox_api
422+
* @{
423+
*/
424+
425+
426+
/**
427+
* @brief Test mailbox initialization
428+
*/
421429
ZTEST(mbox_api, test_mbox_kinit)
422430
{
423431
/**TESTPOINT: init via k_mbox_init*/
424432
k_mbox_init(&mbox);
425433
}
426434

435+
/**
436+
* @brief Test mailbox definition
437+
*
438+
* @details
439+
* - Define a mailbox and verify the mailbox whether as expected
440+
* - Verify the mailbox can be used
441+
*
442+
* @ingroup kernel_mbox_api
443+
*
444+
* @see k_mbox_init() k_mbox_put() k_mbox_get()
445+
*/
427446
ZTEST(mbox_api, test_mbox_kdefine)
428447
{
429448
info_type = PUT_GET_NULL;
@@ -434,7 +453,7 @@ static ZTEST_BMEM char __aligned(4) buffer[8];
434453

435454
/**
436455
*
437-
* @brief Test mailbox enhance capabilities
456+
* @brief Test mailbox enhanced capabilities
438457
*
439458
* @details
440459
* - Define and initialized a message queue and a mailbox
@@ -445,7 +464,7 @@ static ZTEST_BMEM char __aligned(4) buffer[8];
445464
*
446465
* @see k_msgq_init() k_msgq_put() k_mbox_async_put() k_mbox_get()
447466
*/
448-
ZTEST(mbox_api, test_enhance_capability)
467+
ZTEST(mbox_api, test_mbox_enhanced_capabilities)
449468
{
450469
info_type = ASYNC_PUT_GET_BUFFER;
451470
struct k_msgq msgq;
@@ -460,15 +479,13 @@ ZTEST(mbox_api, test_enhance_capability)
460479
tmbox(&mbox);
461480
}
462481

463-
/*
464-
*
465-
* @brife Test any number of mailbox can be defined
482+
/**
483+
* @brief Test that multiple mailboxs can be defined
466484
*
467485
* @details
468-
* - Define multi mailbox and verify the mailbox whether as
486+
* - Define multiple mailbox and verify the mailbox whether as
469487
* expected
470488
* - Verify the mailbox can be used
471-
*
472489
*/
473490
ZTEST(mbox_api, test_define_multi_mbox)
474491
{
@@ -486,84 +503,129 @@ ZTEST(mbox_api, test_define_multi_mbox)
486503
tmbox(&mbox3);
487504
}
488505

506+
/**
507+
* @brief Test case for mailbox put and get operations with null data.
508+
*/
489509
ZTEST(mbox_api, test_mbox_put_get_null)
490510
{
491511
info_type = PUT_GET_NULL;
492512
tmbox(&mbox);
493513
}
494514

515+
/**
516+
* @brief Test case for mailbox put and get operations with buffer.
517+
*
518+
*/
495519
ZTEST(mbox_api, test_mbox_put_get_buffer)
496520
{
497521
info_type = PUT_GET_BUFFER;
498522
tmbox(&mbox);
499523
}
500524

525+
/**
526+
* @brief Test case for mailbox asynchronous put and get operations with buffer.
527+
*
528+
*/
501529
ZTEST(mbox_api, test_mbox_async_put_get_buffer)
502530
{
503531
info_type = ASYNC_PUT_GET_BUFFER;
504532
tmbox(&mbox);
505533
}
506534

535+
/**
536+
* @brief Test case for mailbox asynchronous put and get operations with block.
537+
*
538+
*/
507539
ZTEST(mbox_api, test_mbox_async_put_get_block)
508540
{
509541
info_type = ASYNC_PUT_GET_BLOCK;
510542
tmbox(&mbox);
511543
}
512544

545+
/**
546+
* @brief Test case for mailbox target/source thread buffer operations.
547+
*/
513548
ZTEST(mbox_api, test_mbox_target_source_thread_buffer)
514549
{
515550
info_type = TARGET_SOURCE_THREAD_BUFFER;
516551
tmbox(&mbox);
517552
}
518553

554+
/**
555+
* @brief Test case for mailbox incorrect receiver thread ID.
556+
*/
519557
ZTEST(mbox_api, test_mbox_incorrect_receiver_tid)
520558
{
521559
info_type = INCORRECT_RECEIVER_TID;
522560
tmbox(&mbox);
523561
}
524562

563+
/**
564+
* @brief Test case for mailbox incorrect transmit thread ID.
565+
*/
525566
ZTEST(mbox_api, test_mbox_incorrect_transmit_tid)
526567
{
527568
info_type = INCORRECT_TRANSMIT_TID;
528569
tmbox(&mbox);
529570
}
530571

572+
/**
573+
* @brief Test case for mailbox timed out get operation.
574+
*/
531575
ZTEST(mbox_api, test_mbox_timed_out_mbox_get)
532576
{
533577
info_type = TIMED_OUT_MBOX_GET;
534578
tmbox(&mbox);
535579
}
536580

581+
/**
582+
* @brief Test case for mailbox message thread ID mismatch.
583+
*/
537584
ZTEST(mbox_api, test_mbox_msg_tid_mismatch)
538585
{
539586
info_type = MSG_TID_MISMATCH;
540587
tmbox(&mbox);
541588
}
542589

590+
/**
591+
* @brief Test case for mailbox dispose size 0 message.
592+
*/
543593
ZTEST(mbox_api, test_mbox_dispose_size_0_msg)
544594
{
545595
info_type = DISPOSE_SIZE_0_MSG;
546596
tmbox(&mbox);
547597
}
548598

599+
/**
600+
* @brief Test case for mailbox asynchronous put to waiting get operation.
601+
*/
549602
ZTEST(mbox_api, test_mbox_async_put_to_waiting_get)
550603
{
551604
info_type = ASYNC_PUT_TO_WAITING_GET;
552605
tmbox(&mbox);
553606
}
554607

608+
/**
609+
* @brief Test case for mailbox get waiting put with incorrect thread ID.
610+
*/
555611
ZTEST(mbox_api, test_mbox_get_waiting_put_incorrect_tid)
556612
{
557613
info_type = GET_WAITING_PUT_INCORRECT_TID;
558614
tmbox(&mbox);
559615
}
560616

617+
/**
618+
* @brief Test case for mailbox asynchronous multiple put operation.
619+
*/
561620
ZTEST(mbox_api, test_mbox_async_multiple_put)
562621
{
563622
info_type = ASYNC_MULTIPLE_PUT;
564623
tmbox(&mbox);
565624
}
566625

626+
/**
627+
* @brief Test case for mailbox multiple waiting get operation.
628+
*/
567629
ZTEST(mbox_api, test_mbox_multiple_waiting_get)
568630
{
569631
info_type = MULTIPLE_WAITING_GET;
@@ -584,4 +646,8 @@ void *setup_mbox_api(void)
584646
return NULL;
585647
}
586648

649+
/**
650+
* @}
651+
*/
652+
587653
ZTEST_SUITE(mbox_api, NULL, setup_mbox_api, NULL, NULL, NULL);

0 commit comments

Comments
 (0)