From b6e0465e716669a9c92d014d5c887190f78b74f9 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Thu, 8 Sep 2016 04:24:29 -0400 Subject: [PATCH 1/2] Output formatting for TestPolynomialMod2 --- validat2.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/validat2.cpp b/validat2.cpp index 32885985..a72b1c82 100644 --- a/validat2.cpp +++ b/validat2.cpp @@ -666,9 +666,9 @@ bool TestPolynomialMod2() pass3 &= (str1 == str2); } - cout << (!pass1 ? "FAILED" : "passed") << " " << "1 shifted over range [" << dec << start << "," << stop << "]" << "\n"; - cout << (!pass2 ? "FAILED" : "passed") << " " << "0x" << hex << word(SIZE_MAX) << dec << " shifted over range [" << start << "," << stop << "]" << "\n"; - cout << (!pass3 ? "FAILED" : "passed") << " " << "random values shifted over range [" << dec << start << "," << stop << "]" << "\n"; + cout << (!pass1 ? "FAILED" : "passed") << ": " << "1 shifted over range [" << dec << start << "," << stop << "]" << "\n"; + cout << (!pass2 ? "FAILED" : "passed") << ": " << "0x" << hex << word(SIZE_MAX) << dec << " shifted over range [" << start << "," << stop << "]" << "\n"; + cout << (!pass3 ? "FAILED" : "passed") << ": " << "random values shifted over range [" << dec << start << "," << stop << "]" << "\n"; if (!(pass1 && pass2 && pass3)) cout.flush(); From 66dc925f94c15f92d0a2f16a03d8776df33e9144 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Thu, 8 Sep 2016 07:38:20 -0400 Subject: [PATCH 2/2] Add otion to test using config.h or config.recommend --- cryptest.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/cryptest.sh b/cryptest.sh index d34f5474..2bf5849d 100755 --- a/cryptest.sh +++ b/cryptest.sh @@ -30,6 +30,12 @@ # rather than all of them. Its useful at places like the GCC Compile Farm, where being nice is policy. # ./cryptest.sh nice +# You can test using original config.h with the following. 'orig', 'original' and 'config.h' are synonyms: +# ./cryptest.sh original + +# You can test using config.recommend with the following. 'rec', 'recommend' and 'config.recommend' are synonyms: +# ./cryptest.sh recommend + ############################################ # Set to suite your taste @@ -157,6 +163,7 @@ elif [[ ("$IS_ARM32" -ne "0" || "$IS_ARM64" -ne "0") ]]; then fi fi +WANTED_CONFIG=0 for ARG in "$@" do # Recognize "fast" and "quick", which does not perform tests that take more time to execute @@ -166,6 +173,15 @@ do # Recognize "farm" and "nice", which uses 1/2 the CPU cores in accordance with GCC Compile Farm policy elif [[ ($("$EGREP" -ix "farm" <<< "$ARG") || $("$EGREP" -ix "nice" <<< "$ARG")) ]]; then WANT_NICE=1 + elif [[ ($("$EGREP" -ix "orig" <<< "$ARG") || $("$EGREP" -ix "original" <<< "$ARG") || $("$EGREP" -ix "config.h" <<< "$ARG")) ]]; then + git checkout config.h &>/dev/null + WANTED_CONFIG=1 + elif [[ ($("$EGREP" -ix "rec" <<< "$ARG") || $("$EGREP" -ix "recommend" <<< "$ARG") || $("$EGREP" -ix "config.recommend" <<< "$ARG")) ]]; then + git checkout config.recommend &>/dev/null + cp config.recommend config.h + WANTED_CONFIG=1 + else + echo "Unknown option $ARG" fi done