Skip to content

Commit 3ad9fcf

Browse files
committed
tests: subsys: nrf_compress: decompression: lzma: Fix config
Fixes issues with this test which are appearing in CI but not with on-desk builds Signed-off-by: Jamie McCrae <[email protected]>
1 parent f41d9a0 commit 3ad9fcf

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

tests/subsys/nrf_compress/decompression/lzma/prj.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ CONFIG_LOG=y
1313
CONFIG_MBEDTLS=y
1414
CONFIG_MBEDTLS_SHA256_C=y
1515
CONFIG_MBEDTLS_LEGACY_CRYPTO_C=y
16-
16+
CONFIG_NRF_SECURITY=y

tests/subsys/nrf_compress/decompression/lzma/src/main.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,14 +104,15 @@ ZTEST(nrf_compress_decompression, test_valid_data_decompression)
104104
uint32_t output_size;
105105
uint32_t total_output_size = 0;
106106
uint8_t output_sha[SHA256_SIZE] = { 0 };
107-
struct nrf_compress_implementation *implementation;
107+
struct nrf_compress_implementation *implementation = NULL;
108108
mbedtls_sha256_context ctx;
109109

110110
mbedtls_sha256_init(&ctx);
111111
rc = mbedtls_sha256_starts(&ctx, false);
112112
zassert_ok(rc, "Expected mbedtls sha256 start to be successful");
113113

114114
implementation = nrf_compress_implementation_find(NRF_COMPRESS_TYPE_LZMA);
115+
zassert_not_equal(implementation, NULL, "Expected implementation to not be NULL");
115116

116117
pos = 0;
117118

@@ -529,7 +530,7 @@ ZTEST(nrf_compress_decompression, test_too_large_malloc)
529530
struct nrf_compress_implementation *implementation;
530531

531532
/* Malloc data to reduce available heap for decompression library */
532-
large_malloc_object = (uint8_t *)malloc(4264);
533+
large_malloc_object = (uint8_t *)malloc(8000);
533534
zassert_not_null(large_malloc_object, "Expected large malloc to be successful");
534535

535536
implementation = nrf_compress_implementation_find(NRF_COMPRESS_TYPE_LZMA);

0 commit comments

Comments
 (0)