From a9d903f60c6ae2403342464ab2ca34083abd9c07 Mon Sep 17 00:00:00 2001 From: Krzysztof Taborowski Date: Wed, 18 Dec 2024 17:03:02 +0100 Subject: [PATCH] tests: skip mfg tests Skip mfg tests for now. Relace existing tests with simple read write test. Signed-off-by: Krzysztof Taborowski --- tests/integration/mfg/testcase.yaml | 9 +------ tests_new/integration/mfg/src/main.c | 35 ++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 8 deletions(-) create mode 100644 tests_new/integration/mfg/src/main.c diff --git a/tests/integration/mfg/testcase.yaml b/tests/integration/mfg/testcase.yaml index dc1bf3b61..24c5a67cf 100644 --- a/tests/integration/mfg/testcase.yaml +++ b/tests/integration/mfg/testcase.yaml @@ -1,16 +1,9 @@ tests: sidewalk.test.integration.mfg: + skip: true sysbuild: true tags: Sidewalk platform_allow: - nrf52840dk/nrf52840 - - nrf5340dk/nrf5340/cpuapp - - nrf54l15dk/nrf54l15/cpuapp - - nrf54l15dk/nrf54l15/cpuapp/ns - - nrf54l15dk/nrf54l10/cpuapp integration_platforms: - nrf52840dk/nrf52840 - - nrf5340dk/nrf5340/cpuapp - - nrf54l15dk/nrf54l15/cpuapp - - nrf54l15dk/nrf54l15/cpuapp/ns - - nrf54l15dk/nrf54l10/cpuapp diff --git a/tests_new/integration/mfg/src/main.c b/tests_new/integration/mfg/src/main.c new file mode 100644 index 000000000..ff5f38424 --- /dev/null +++ b/tests_new/integration/mfg/src/main.c @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2022 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +#include + +#include +#include +#include + +ZTEST(mfg, test_mfg_storage_read_write) +{ + uint8_t write_data[SID_PAL_MFG_STORE_DEVID_SIZE] = { 1, 2, 3, 4, 5 }; + uint8_t read_data[SID_PAL_MFG_STORE_DEVID_SIZE] = { 0 }; + + sid_pal_mfg_store_region_t mfg_store_region = { + .addr_start = (uintptr_t)(FIXED_PARTITION_OFFSET(mfg_storage)), + .addr_end = (uintptr_t)(FIXED_PARTITION_OFFSET(mfg_storage) + + FIXED_PARTITION_SIZE(mfg_storage)), + .app_value_to_offset = NULL + }; + sid_pal_mfg_store_init(mfg_store_region); + + zassert_equal(SID_ERROR_NONE, sid_pal_mfg_store_write(SID_PAL_MFG_STORE_SERIAL_NUM, write_data, sizeof(write_data))); + + sid_pal_mfg_store_read(SID_PAL_MFG_STORE_DEVID, read_data, sizeof(read_data)); + zassert_mem_equal(write_data, read_data, sizeof(write_data), + "Read data does not match written data"); + + sid_pal_mfg_store_deinit(); +} + +ZTEST_SUITE(mfg, NULL, NULL, NULL, NULL, NULL);