Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zephyr: Added ZTEST for csp_rdp_queue_tx_size() function #1

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Commits on Oct 13, 2024

  1. Add test for csp_rdp_queue_tx_size()

    Added the following test cases to test csp_rdp_queue_tx_size()
    
    "test_rdp_queue_one"
    Test that when a packet is added to an empty queue, the result of csp_rdp_queue_tx_add() becomes 1
    
    "test_rdp_queue_enqueue_dequeue"
    Test that after adding one packet to an empty queue and then removing it, the result of csp_rdp_queue_tx_add() becomes 0
    
    "test_rdp_queue_MAX"
    Add the definition for the queue's maximum size QUEUE_SIZE_MAX
    Test that when packets are added up to the queue's maximum size, the result of csp_rdp_queue_tx_add() becomes the value of QUEUE_SIZE_MAX
    
    "test_rdp_enqueue_MAX_and_dequeue"
    Test that after adding packets up to the queue's maximum size and then removing all packets from the queue, the result of csp_rdp_queue_tx_add() becomes 0
    
    Signed-off-by: Daiki Tanimitsu <[email protected]>
    Daiki-Tanimitsu committed Oct 13, 2024
    Configuration menu
    Copy the full SHA
    03a4fc1 View commit details
    Browse the repository at this point in the history
  2. Add queue size test when the queue is flushed

    Added the following test cases to test csp_rdp_queue_tx_size() and csp_rdp_queue_rx_size()
    
    "test_rdp_queue_flush"
    Test that after flushing the queue with csp_rdp_queue_flush(), the result of csp_rdp_queue_tx_add() becomes 0
    Added the enum definition csp_conn_type_t to initialize the csp_conn_t structure in this test
    
    Signed-off-by: Daiki Tanimitsu <[email protected]>
    Daiki-Tanimitsu committed Oct 13, 2024
    Configuration menu
    Copy the full SHA
    f22cd97 View commit details
    Browse the repository at this point in the history