From 87e0032902bcfab1292bc217b5119772e4ccca4e Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Fri, 12 Nov 2021 18:45:37 +0100 Subject: [PATCH] tests: default to musl LCG --- .../external_module/Makefile.dep | 2 +- tests/pkg_c25519/app.config.test | 2 +- tests/pkg_cifra/app.config.test | 2 +- tests/pkg_hacl/app.config.test | 2 +- tests/pkg_libcose/app.config.test | 2 +- tests/pkg_libhydrogen/app.config.test | 2 +- tests/pkg_micro-ecc/app.config.test | 2 +- tests/pkg_monocypher/app.config.test | 2 +- tests/pkg_qdsa/app.config.test | 2 +- tests/pkg_tweetnacl/app.config.test | 2 +- tests/rng/tests/01-run.py | 26 +++++++++---------- tests/sys_atomic_utils/app.config.test | 2 +- .../app.config.test | 2 +- 13 files changed, 25 insertions(+), 25 deletions(-) diff --git a/tests/external_module_dirs/external_modules/external_module/Makefile.dep b/tests/external_module_dirs/external_modules/external_module/Makefile.dep index 970cc1be9d..7b3799c54b 100644 --- a/tests/external_module_dirs/external_modules/external_module/Makefile.dep +++ b/tests/external_module_dirs/external_modules/external_module/Makefile.dep @@ -1,3 +1,3 @@ USEMODULE += random -# Set a different prng than the default prng_tinymt32 +# Set a different prng than the default USEMODULE += prng_xorshift diff --git a/tests/pkg_c25519/app.config.test b/tests/pkg_c25519/app.config.test index 0f94096fdb..fb796f7749 100644 --- a/tests/pkg_c25519/app.config.test +++ b/tests/pkg_c25519/app.config.test @@ -3,5 +3,5 @@ CONFIG_MODULE_RANDOM=y # Should be autoselecting the MODULE_PRNG_HWRNG if possible # Since the makefile cannot we have to override until end of migration # Remove when TEST_KCONFIG is complete -CONFIG_MODULE_PRNG_TINYMT32=y +CONFIG_MODULE_PRNG_MUSL_LCG=y CONFIG_PACKAGE_C25519=y diff --git a/tests/pkg_cifra/app.config.test b/tests/pkg_cifra/app.config.test index a7424f5e0e..3d204ad437 100644 --- a/tests/pkg_cifra/app.config.test +++ b/tests/pkg_cifra/app.config.test @@ -3,5 +3,5 @@ CONFIG_MODULE_RANDOM=y # Should be autoselecting the MODULE_PRNG_HWRNG if possible # Since the makefile cannot we have to override until end of migration # Remove when TEST_KCONFIG is complete -CONFIG_MODULE_PRNG_TINYMT32=y +CONFIG_MODULE_PRNG_MUSL_LCG=y CONFIG_PACKAGE_CIFRA=y diff --git a/tests/pkg_hacl/app.config.test b/tests/pkg_hacl/app.config.test index 46a28b35b8..8173cc15de 100644 --- a/tests/pkg_hacl/app.config.test +++ b/tests/pkg_hacl/app.config.test @@ -3,5 +3,5 @@ CONFIG_MODULE_RANDOM=y # Should be autoselecting the MODULE_PRNG_HWRNG if possible # Since the makefile cannot we have to override until end of migration # Remove when TEST_KCONFIG is complete -CONFIG_MODULE_PRNG_TINYMT32=y +CONFIG_MODULE_PRNG_MUSL_LCG=y CONFIG_PACKAGE_HACL=y diff --git a/tests/pkg_libcose/app.config.test b/tests/pkg_libcose/app.config.test index dd9da05659..611cd1fbd2 100644 --- a/tests/pkg_libcose/app.config.test +++ b/tests/pkg_libcose/app.config.test @@ -4,7 +4,7 @@ CONFIG_MODULE_MEMARRAY=y # Should be autoselecting the MODULE_PRNG_HWRNG if possible # Since the makefile cannot we have to override until end of migration # Remove when TEST_KCONFIG is complete -CONFIG_MODULE_PRNG_TINYMT32=y +CONFIG_MODULE_PRNG_MUSL_LCG=y CONFIG_MODULE_RANDOM=y CONFIG_PACKAGE_HACL=y CONFIG_PACKAGE_LIBCOSE=y diff --git a/tests/pkg_libhydrogen/app.config.test b/tests/pkg_libhydrogen/app.config.test index a1d38ab182..02959d7859 100644 --- a/tests/pkg_libhydrogen/app.config.test +++ b/tests/pkg_libhydrogen/app.config.test @@ -3,5 +3,5 @@ CONFIG_MODULE_RANDOM=y # Should be autoselecting the MODULE_PRNG_HWRNG if possible # Since the makefile cannot we have to override until end of migration # Remove when TEST_KCONFIG is complete -CONFIG_MODULE_PRNG_TINYMT32=y +CONFIG_MODULE_PRNG_MUSL_LCG=y CONFIG_PACKAGE_LIBHYDROGEN=y diff --git a/tests/pkg_micro-ecc/app.config.test b/tests/pkg_micro-ecc/app.config.test index 36a8e118e2..fc3aabc0a7 100644 --- a/tests/pkg_micro-ecc/app.config.test +++ b/tests/pkg_micro-ecc/app.config.test @@ -3,5 +3,5 @@ CONFIG_MODULE_RANDOM=y # Should be autoselecting the MODULE_PRNG_HWRNG if possible # Since the makefile cannot we have to override until end of migration # Remove when TEST_KCONFIG is complete -CONFIG_MODULE_PRNG_TINYMT32=y +CONFIG_MODULE_PRNG_MUSL_LCG=y CONFIG_PACKAGE_MICRO-ECC=y diff --git a/tests/pkg_monocypher/app.config.test b/tests/pkg_monocypher/app.config.test index e799d78cc1..98ccfef5d5 100644 --- a/tests/pkg_monocypher/app.config.test +++ b/tests/pkg_monocypher/app.config.test @@ -3,5 +3,5 @@ CONFIG_MODULE_RANDOM=y # Should be autoselecting the MODULE_PRNG_HWRNG if possible # Since the makefile cannot we have to override until end of migration # Remove when TEST_KCONFIG is complete -CONFIG_MODULE_PRNG_TINYMT32=y +CONFIG_MODULE_PRNG_MUSL_LCG=y CONFIG_PACKAGE_MONOCYPHER=y diff --git a/tests/pkg_qdsa/app.config.test b/tests/pkg_qdsa/app.config.test index cd44dc772c..7111b984fd 100644 --- a/tests/pkg_qdsa/app.config.test +++ b/tests/pkg_qdsa/app.config.test @@ -3,5 +3,5 @@ CONFIG_MODULE_RANDOM=y # Should be autoselecting the MODULE_PRNG_HWRNG if possible # Since the makefile cannot we have to override until end of migration # Remove when TEST_KCONFIG is complete -CONFIG_MODULE_PRNG_TINYMT32=y +CONFIG_MODULE_PRNG_MUSL_LCG=y CONFIG_PACKAGE_QDSA=y diff --git a/tests/pkg_tweetnacl/app.config.test b/tests/pkg_tweetnacl/app.config.test index 0d3760bfc4..0d2d712b13 100644 --- a/tests/pkg_tweetnacl/app.config.test +++ b/tests/pkg_tweetnacl/app.config.test @@ -3,5 +3,5 @@ CONFIG_MODULE_RANDOM=y # Should be autoselecting the MODULE_PRNG_HWRNG if possible # Since the makefile cannot we have to override until end of migration # Remove when TEST_KCONFIG is complete -CONFIG_MODULE_PRNG_TINYMT32=y +CONFIG_MODULE_PRNG_MUSL_LCG=y CONFIG_PACKAGE_TWEETNACL=y diff --git a/tests/rng/tests/01-run.py b/tests/rng/tests/01-run.py index e0009378af..0d5aab3fbc 100755 --- a/tests/rng/tests/01-run.py +++ b/tests/rng/tests/01-run.py @@ -20,7 +20,7 @@ def testfunc(child): child.expect_exact("> ") child.sendline("fips") - child.expect_exact("Running FIPS 140-2 test, with seed 1337 using Tiny Mersenne Twister PRNG.") + child.expect_exact("Running FIPS 140-2 test, with seed 1337 using Musl C PRNG.") child.expect("Monobit test: passed") child.expect("Poker test: passed") child.expect("Run test: passed") @@ -28,21 +28,21 @@ def testfunc(child): child.expect_exact("> ") child.sendline("dump 10") - child.expect_exact("Running dump test, with seed 1337 using Tiny Mersenne Twister PRNG.") - child.expect("1555530734") - child.expect("2178333451") - child.expect("2272913641") - child.expect("3790481823") - child.expect("3190025502") - child.expect("798555366") - child.expect("1918982324") - child.expect("1550167154") - child.expect("3454972398") - child.expect("1034066532") + child.expect_exact("Running dump test, with seed 1337 using Musl C PRNG.") + child.expect("3954330727") + child.expect("188121509") + child.expect("1069019535") + child.expect("1187072490") + child.expect("4172651676") + child.expect("2421580254") + child.expect("2126354391") + child.expect("1784094822") + child.expect("751721632") + child.expect("679714536") child.expect_exact("> ") child.sendline("entropy") - child.expect(re.compile(r"Calculated 7\.994\d{3} bits of entropy from 10000 samples\.")) + child.expect(re.compile(r"Calculated 7\.995\d{3} bits of entropy from 10000 samples\.")) child.expect_exact("> ") # Constant source diff --git a/tests/sys_atomic_utils/app.config.test b/tests/sys_atomic_utils/app.config.test index 5b7fe9d088..70dabf8b92 100644 --- a/tests/sys_atomic_utils/app.config.test +++ b/tests/sys_atomic_utils/app.config.test @@ -4,5 +4,5 @@ CONFIG_MODULE_ATOMIC_UTILS=y CONFIG_MODULE_FMT=y CONFIG_MODULE_SHELL=y CONFIG_MODULE_RANDOM=y -CONFIG_MODULE_PRNG_TINYMT32=y +CONFIG_MODULE_PRNG_MUSL_LCG=y CONFIG_MODULE_XTIMER=y diff --git a/tests/sys_atomic_utils_unittests/app.config.test b/tests/sys_atomic_utils_unittests/app.config.test index ea9a9f2616..df8c9e9dde 100644 --- a/tests/sys_atomic_utils_unittests/app.config.test +++ b/tests/sys_atomic_utils_unittests/app.config.test @@ -4,4 +4,4 @@ CONFIG_MODULE_EMBUNIT=y CONFIG_MODULE_ATOMIC_UTILS=y CONFIG_MODULE_RANDOM=y # Force tinymt32 to be selected -CONFIG_MODULE_PRNG_TINYMT32=y +CONFIG_MODULE_PRNG_MUSL_LCG=y