From 5a9d94d609ac36b51a607983ddc36a7f693c2ed0 Mon Sep 17 00:00:00 2001 From: Roman Leonov Date: Thu, 19 Dec 2024 14:06:17 +0100 Subject: [PATCH] change(teardown): Added test case decription --- .../teardown_device/main/test_teardown.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/device/esp_tinyusb/test_apps/teardown_device/main/test_teardown.c b/device/esp_tinyusb/test_apps/teardown_device/main/test_teardown.c index d6bcf0e..c00f192 100644 --- a/device/esp_tinyusb/test_apps/teardown_device/main/test_teardown.c +++ b/device/esp_tinyusb/test_apps/teardown_device/main/test_teardown.c @@ -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]") {