From 54331fa3e84aa835c520d2f94069c66e4f72be7b Mon Sep 17 00:00:00 2001 From: Jerry Yu Date: Mon, 4 Jul 2022 09:25:18 +0000 Subject: [PATCH] fix various issues Signed-off-by: Jerry Yu --- tests/ssl-opt.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/ssl-opt.sh b/tests/ssl-opt.sh index 5c35d5df80..81749c990b 100755 --- a/tests/ssl-opt.sh +++ b/tests/ssl-opt.sh @@ -2006,14 +2006,18 @@ SESSION="session.$$" # If MBEDTLS_ENTROPY_C && MBEDTLS_ENTROPY_NV_SEED && !MBEDTLS_NO_PLATFORM_ENTROPY # create seedfile to fix test fail. +SKIP_NEXT="NO" requires_config_enabled MBEDTLS_ENTROPY_C requires_config_enabled MBEDTLS_ENTROPY_NV_SEED requires_config_disabled MBEDTLS_NO_PLATFORM_ENTROPY create_seedfile() { - [ -f $1 ] || dd if=/dev/urandom of=$1 bs=64 count=1 2>/dev/null + dd if=/dev/urandom of=$1 bs=64 count=1 2>/dev/null } if [ "${SKIP_NEXT:-}" != "YES" ]; then + # `$P_QUERY MBEDTLS_PLATFORM_STD_NV_SEED_FILE` will return `"seedfile"` and + # `dd` will create file with double quotes. That's not expected, with `eval` + # we can remove double quotes eval "create_seedfile `$P_QUERY MBEDTLS_PLATFORM_STD_NV_SEED_FILE`" fi