From ef9ae982e42cd8c719a8ba5a0b87f25a5a5f91ba Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 19 May 2026 13:10:54 +0530 Subject: test: add 4 new unit test suites for mining modules - test_stratum_proxy: job set/get, stats, init (21 tests) - test_session_payment_method: PAYMENT_METHOD enum, bytes/cashu methods (12 tests) - test_tollgate_client_mining: mining tag parsing, discovery struct (20 tests) - test_firewall_sandbox: client management, grant/revoke, max clients (16 tests) - Enhanced stubs: BaseType_t/pdPASS in task.h, lwip sockets/etharp/prot headers, dns_server.h, esp_wifi_ap_get_sta_list.h - All 15 test suites pass (344+ total assertions) --- tests/unit/stubs/freertos/task.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'tests/unit/stubs/freertos/task.h') diff --git a/tests/unit/stubs/freertos/task.h b/tests/unit/stubs/freertos/task.h index 3855d41..ec96156 100644 --- a/tests/unit/stubs/freertos/task.h +++ b/tests/unit/stubs/freertos/task.h @@ -6,14 +6,17 @@ typedef void *TaskHandle_t; typedef void *SemaphoreHandle_t; +typedef int BaseType_t; + +#define pdPASS 1 static inline void vTaskDelete(TaskHandle_t t) { (void)t; } static inline SemaphoreHandle_t xSemaphoreCreateMutex(void) { return (SemaphoreHandle_t)malloc(1); } static inline void vSemaphoreDelete(SemaphoreHandle_t s) { free(s); } static inline int xSemaphoreTake(SemaphoreHandle_t s, uint32_t blk) { (void)s; (void)blk; return 1; } static inline int xSemaphoreGive(SemaphoreHandle_t s) { (void)s; return 1; } -static inline int xTaskCreate(void (*fn)(void*), const char *n, uint32_t st, void *p, uint32_t pri, TaskHandle_t *h) { - (void)fn; (void)n; (void)st; (void)p; (void)pri; (void)h; return 1; +static inline BaseType_t xTaskCreate(void (*fn)(void*), const char *n, uint32_t st, void *p, uint32_t pri, TaskHandle_t *h) { + (void)fn; (void)n; (void)st; (void)p; (void)pri; (void)h; return pdPASS; } #endif -- cgit v1.2.3