Skip to content

Commit 1e5484f

Browse files
committed
refactor(functional tests, model): change __lt_handle__ to pointer.
1 parent e8c9b65 commit 1e5484f

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

tests/functional/model/main.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,19 @@ int main(void)
3838
#endif
3939

4040
// Handle initialization
41-
lt_handle_t __lt_handle__ = {0};
41+
lt_handle_t lt_handle = {0};
4242
#if LT_SEPARATE_L3_BUFF
4343
uint8_t l3_buffer[LT_SIZE_OF_L3_BUFF] __attribute__((aligned(16))) = {0};
44-
__lt_handle__.l3.buff = l3_buffer;
45-
__lt_handle__.l3.buff_len = sizeof(l3_buffer);
44+
lt_handle.l3.buff = l3_buffer;
45+
lt_handle.l3.buff_len = sizeof(l3_buffer);
4646
#endif
4747

4848
// Device mappings
4949
// Initialize device before handing handle to the test.
5050
lt_dev_posix_tcp_t device;
5151
device.addr = inet_addr("127.0.0.1");
5252
device.port = 28992;
53-
__lt_handle__.l2.device = &device;
53+
lt_handle.l2.device = &device;
5454

5555
// CAL context (selectable)
5656
#if LT_USE_TREZOR_CRYPTO
@@ -59,9 +59,11 @@ int main(void)
5959
lt_ctx_mbedtls_v4_t
6060
#endif
6161
crypto_ctx;
62-
__lt_handle__.l3.crypto_ctx = &crypto_ctx;
62+
lt_handle.l3.crypto_ctx = &crypto_ctx;
6363

6464
// Test code (correct test function is selected automatically per binary)
65+
// __lt_handle__ identifier is used by the test registry.
66+
lt_handle_t *__lt_handle__ = &lt_handle;
6567
#include "lt_test_registry.c.inc"
6668

6769
#if LT_USE_MBEDTLS_V4

0 commit comments

Comments
 (0)