-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[KRKNWK-14886] * Move crypto test to new location * Move crypto keys test to new location * Move delay test to new location * Move critical_region test to new location * Move interrupts test to new location * Move storage test to new location * Move time test to new location * Add native_sim board support * Port to ztest * Remove sanity tests Signed-off-by: Krzysztof Taborowski <[email protected]>
- Loading branch information
1 parent
9d16395
commit ddcf163
Showing
52 changed files
with
226 additions
and
223 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,5 @@ | |
# | ||
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
# | ||
|
||
CONFIG_ZTEST=y | ||
CONFIG_MAIN_THREAD_PRIORITY=14 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
/* | ||
* Copyright (c) 2022 Nordic Semiconductor ASA | ||
* | ||
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
*/ | ||
#include <sid_pal_critical_region_ifc.h> | ||
#include <sid_error.h> | ||
#include <zephyr/ztest.h> | ||
#include <zephyr/irq.h> | ||
|
||
#if defined(CONFIG_SOC_FAMILY_NORDIC_NRF) | ||
#include <cmsis_core.h> | ||
#elif defined(CONFIG_SOC_POSIX) | ||
#include <zephyr/arch/posix/posix_soc_if.h> | ||
#else | ||
#error "Architecture not supported" | ||
#endif /* CONFIG_SOC */ | ||
|
||
#define TEST_IRQ (30) | ||
#define TEST_IRQ_PRIO (2) | ||
#define TEST_IRQ_FLAGS (0) | ||
|
||
#define UNCHANGED 0 | ||
#define CHANGED 1 | ||
static volatile uint32_t resource; | ||
|
||
static void irq_cb(const void *arg) | ||
{ | ||
resource = CHANGED; | ||
} | ||
|
||
static void soc_irq_enable(int irq) | ||
{ | ||
#if defined(CONFIG_SOC_FAMILY_NORDIC_NRF) | ||
irq_enable(irq); | ||
#elif defined(CONFIG_SOC_POSIX) | ||
posix_irq_enable(irq); | ||
#endif /* CONFIG_SOC */ | ||
} | ||
|
||
static void soc_irq_trigger(int irq) | ||
{ | ||
#if defined(CONFIG_SOC_FAMILY_NORDIC_NRF) | ||
NVIC_SetPendingIRQ(irq); | ||
#elif defined(CONFIG_SOC_POSIX) | ||
posix_sw_set_pending_IRQ(irq); | ||
#endif /* CONFIG_SOC */ | ||
} | ||
|
||
ZTEST(sid_pal_suite, test_critical_region_with_timer) | ||
{ | ||
IRQ_CONNECT(TEST_IRQ, TEST_IRQ_PRIO, irq_cb, NULL, TEST_IRQ_FLAGS); | ||
soc_irq_enable(TEST_IRQ); | ||
|
||
resource = UNCHANGED; | ||
soc_irq_trigger(TEST_IRQ); | ||
zassert_equal(resource, CHANGED, "IRQ should change resource"); | ||
|
||
sid_pal_enter_critical_region(); | ||
resource = UNCHANGED; | ||
soc_irq_trigger(TEST_IRQ); | ||
zassert_equal(resource, UNCHANGED, "Resource should not change in critical section"); | ||
sid_pal_exit_critical_region(); | ||
|
||
soc_irq_trigger(TEST_IRQ); | ||
zassert_equal(resource, CHANGED, "IRQ should change resource after critical section"); | ||
} | ||
|
||
ZTEST_SUITE(sid_pal_suite, NULL, NULL, NULL, NULL, NULL); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
tests: | ||
sidewalk.test.integration.critical_region: | ||
sysbuild: true | ||
tags: Sidewalk | ||
platform_allow: | ||
- native_sim | ||
- nrf52840dk/nrf52840 | ||
- nrf5340dk/nrf5340/cpuapp | ||
- nrf54l15dk/nrf54l15/cpuapp | ||
- nrf54l15dk/nrf54l15/cpuapp/ns | ||
- nrf54l15dk/nrf54l10/cpuapp | ||
integration_platforms: | ||
- native_sim | ||
- nrf52840dk/nrf52840 | ||
- nrf5340dk/nrf5340/cpuapp | ||
- nrf54l15dk/nrf54l15/cpuapp | ||
- nrf54l15dk/nrf54l15/cpuapp/ns | ||
- nrf54l15dk/nrf54l10/cpuapp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# | ||
# Copyright (c) 2024 Nordic Semiconductor ASA | ||
# | ||
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
# | ||
CONFIG_MBEDTLS=y | ||
CONFIG_MBEDTLS_PSA_CRYPTO_C=y |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# | ||
# Copyright (c) 2022 Nordic Semiconductor ASA | ||
# | ||
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
# | ||
CONFIG_ZTEST=y | ||
CONFIG_MAIN_THREAD_PRIORITY=14 | ||
|
||
CONFIG_SIDEWALK_BUILD=y | ||
CONFIG_SIDEWALK_CRYPTO=y |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
tests: | ||
sidewalk.test.integration.crypto_keys: | ||
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 | ||
Check warning on line 16 in tests_new/integration/crypto_keys/testcase.yaml GitHub Actions / verify_PR / validate_compliance_with_zephyrYAMLLint (new-line-at-end-of-file)
|
Oops, something went wrong.