From 2735a3a2fa470328898da04d22cf0fe44d16bacf Mon Sep 17 00:00:00 2001 From: Krzysztof Chruscinski Date: Tue, 6 Sep 2022 12:50:10 +0200 Subject: [PATCH] testsuite: ztress: Use XOSHIRO generator when ztress is used Use XOSHIRO random number generator if target has entropy generator. Some entropy generators may have limitations (e.g. only thread context) which would conflict with ztress usage. Added Kconfig.defconfig for testsuite. Signed-off-by: Krzysztof Chruscinski --- Kconfig.zephyr | 2 ++ subsys/testsuite/Kconfig.defconfig | 10 ++++++++++ 2 files changed, 12 insertions(+) create mode 100644 subsys/testsuite/Kconfig.defconfig diff --git a/Kconfig.zephyr b/Kconfig.zephyr index e7b6ade16c5..b623b2892c0 100644 --- a/Kconfig.zephyr +++ b/Kconfig.zephyr @@ -27,6 +27,8 @@ osource "$(KCONFIG_BINARY_DIR)/Kconfig.soc.defconfig" osource "soc/$(ARCH)/*/Kconfig.defconfig" # This loads the toolchain defconfigs osource "$(TOOLCHAIN_KCONFIG_DIR)/Kconfig.defconfig" +# This loads the testsuite defconfig +source "subsys/testsuite/Kconfig.defconfig" # This should be early since the autogen Kconfig.dts symbols may get # used by modules diff --git a/subsys/testsuite/Kconfig.defconfig b/subsys/testsuite/Kconfig.defconfig new file mode 100644 index 00000000000..429def054dd --- /dev/null +++ b/subsys/testsuite/Kconfig.defconfig @@ -0,0 +1,10 @@ +# Copyright (c) 2022 Nordic Semiconductor ASA +# SPDX-License-Identifier: Apache-2.0 + +if TEST + +choice RNG_GENERATOR_CHOICE + default XOSHIRO_RANDOM_GENERATOR if ZTRESS && ENTROPY_HAS_DRIVER +endchoice + +endif # TEST