Skip to content

Commit

Permalink
change(teardown): Added test case decription
Browse files Browse the repository at this point in the history
  • Loading branch information
roma-jam committed Dec 19, 2024
1 parent 4ec49a0 commit 5a9d94d
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions device/esp_tinyusb/test_apps/teardown_device/main/test_teardown.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,23 @@ void tud_mount_cb(void)

/**
* @brief TinyUSB Teardown specific testcase
*
* Scenario:
* - Installs the tinyUSB driver via esp-tinyusb wrapper with 1xCDC class device
* - Awaits device configuration be the Host (TEARDOWN_ATTACH_TIMEOUT_MS)
* - Awaits the terminal connection (TEARDOWN_ATTACH_TIMEOUT_MS)
* - Expects the command sequence from the Host (TEARDOWN_COMMAND_TIMEOUT_MS)
* - Replies with the response sequence to the Host
* - Awaits terminal disconnection (TEARDOWN_ATTACH_TIMEOUT_MS)
* - Teardowns the tinyUSB driver via esp-tinyusb wrapper
* - Repeats the steps from the step.1 N times (where N = TEARDOWN_AMOUNT)
* - Verifies amount of attempts and memory leakage (attempts should be 0)
*
* command sequence[] = ep_size * 0xAA
* response sequence[] = ep_size * 0x55
*
* Hint: Values 0xAA and 0x55 were selected to verify the buffer memory integrity,
* as the 0xAA and 0x55 are the inversion of each other and the data bits in the same position changes from 1 to 0 in every transaction.
*/
TEST_CASE("tinyusb_teardown", "[esp_tinyusb][teardown]")
{
Expand Down

0 comments on commit 5a9d94d

Please sign in to comment.