From 06f79d904d5d4a801910e31bcca2846e5afbeaff Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Sat, 24 Dec 2016 07:25:12 -0500 Subject: [PATCH] Remove vectorization test. This one test needs to be in its own script --- TestScripts/cryptest.sh | 2 +- cryptest.sh | 74 ----------------------------------------- validat1.cpp | 4 ++- 3 files changed, 4 insertions(+), 76 deletions(-) diff --git a/TestScripts/cryptest.sh b/TestScripts/cryptest.sh index ef62d123..fb1c2b19 100755 --- a/TestScripts/cryptest.sh +++ b/TestScripts/cryptest.sh @@ -3829,7 +3829,7 @@ fi ############################################ # Release build, Bounds Sanitizer, c++17 -if [[ ("$HAVE_CXX14" -ne "0" && "$HAVE_BOUNDS_SAN" -ne "0") ]]; then +if [[ ("$HAVE_CXX17" -ne "0" && "$HAVE_BOUNDS_SAN" -ne "0") ]]; then echo echo "************************************" | tee -a "$TEST_RESULTS" echo "Testing: Release, c++17, Bounds Sanitizer" | tee -a "$TEST_RESULTS" diff --git a/cryptest.sh b/cryptest.sh index daeb824c..fb1c2b19 100755 --- a/cryptest.sh +++ b/cryptest.sh @@ -39,9 +39,6 @@ fi if [[ (-z "$BENCHMARK_RESULTS") ]]; then BENCHMARK_RESULTS=cryptest-bench.txt fi -if [[ (-z "$VECTORIZATION_RESULTS") ]]; then - VECTORIZATION_RESULTS=cryptest-vector.txt -fi if [[ (-z "$WARN_RESULTS") ]]; then WARN_RESULTS=cryptest-warn.txt fi @@ -517,20 +514,6 @@ if [[ (-z "$HAVE_BOUNDS_SAN") ]]; then fi fi -# Vectorization opportunities: GCC 4.x; maybe Clang -# http://lwn.net/Articles/691932/ -rm -f "$TMP/adhoc.exe" > /dev/null 2>&1 -if [[ (-z "$HAVE_INFO_VEC") ]]; then - HAVE_INFO_VEC=0 - "$CXX" -DCRYPTOPP_ADHOC_MAIN -fopt-info-vec adhoc.cpp -o "$TMP/adhoc.exe" > /dev/null 2>&1 - if [[ ("$?" -eq "0") ]]; then - "$TMP/adhoc.exe" > /dev/null 2>&1 - if [[ ("$?" -eq "0") ]]; then - HAVE_INFO_VEC=1 - fi - fi -fi - rm -f "$TMP/adhoc.exe" > /dev/null 2>&1 if [[ (-z "$HAVE_OMP") ]]; then HAVE_OMP=0 @@ -3248,63 +3231,6 @@ if [[ ("$HAVE_OMP" -ne "0") ]]; then fi fi -############################################ -# Vectorization opportunities (requires -O3, OPT_O3) -if [[ ("$HAVE_O3" && "$HAVE_INFO_VEC" -ne "0") ]]; then - - ############################################ - # Debug build - echo - echo "************************************" | tee -a "$VECTORIZATION_RESULTS" - echo "Testing: Debug, vectorization opportunities" | tee -a "$VECTORIZATION_RESULTS" - echo - - "$MAKE" clean > /dev/null 2>&1 - rm -f adhoc.cpp > /dev/null 2>&1 - - CXXFLAGS="$DEBUG_CXXFLAGS -O3 -fopt-info-vec ${PLATFORM_CXXFLAGS[@]} $USER_CXXFLAGS ${DEPRECATED_CXXFLAGS[@]}" - CXX="$CXX" CXXFLAGS="$CXXFLAGS" "$MAKE" "${MAKEARGS[@]}" static dynamic cryptest.exe 2>&1 | tee -a "$VECTORIZATION_RESULTS" - - if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then - echo "ERROR: failed to make cryptest.exe" | tee -a "$VECTORIZATION_RESULTS" - else - ./cryptest.exe v 2>&1 | tee -a "$VECTORIZATION_RESULTS" - if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then - echo "ERROR: failed to execute validation suite" | tee -a "$VECTORIZATION_RESULTS" - fi - ./cryptest.exe tv all 2>&1 | tee -a "$VECTORIZATION_RESULTS" - if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then - echo "ERROR: failed to execute test vectors" | tee -a "$VECTORIZATION_RESULTS" - fi - fi - - ############################################ - # Release build - echo - echo "************************************" | tee -a "$VECTORIZATION_RESULTS" - echo "Testing: Release, vectorization opportunities" | tee -a "$VECTORIZATION_RESULTS" - echo - - "$MAKE" clean > /dev/null 2>&1 - rm -f adhoc.cpp > /dev/null 2>&1 - - CXXFLAGS="$RELEASE_CXXFLAGS -O3 -fopt-info-vec ${PLATFORM_CXXFLAGS[@]} $USER_CXXFLAGS ${DEPRECATED_CXXFLAGS[@]}" - CXX="$CXX" CXXFLAGS="$CXXFLAGS" "$MAKE" "${MAKEARGS[@]}" static dynamic cryptest.exe 2>&1 | tee -a "$VECTORIZATION_RESULTS" - - if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then - echo "ERROR: failed to make cryptest.exe" | tee -a "$VECTORIZATION_RESULTS" - else - ./cryptest.exe v 2>&1 | tee -a "$VECTORIZATION_RESULTS" - if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then - echo "ERROR: failed to execute validation suite" | tee -a "$VECTORIZATION_RESULTS" - fi - ./cryptest.exe tv all 2>&1 | tee -a "$VECTORIZATION_RESULTS" - if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then - echo "ERROR: failed to execute test vectors" | tee -a "$VECTORIZATION_RESULTS" - fi - fi -fi - ############################################ # UBSan, c++03 if [[ ("$HAVE_CXX03" -ne "0" && "$HAVE_UBSAN" -ne "0") ]]; then diff --git a/validat1.cpp b/validat1.cpp index 3bb85e0c..a6b07644 100644 --- a/validat1.cpp +++ b/validat1.cpp @@ -85,8 +85,10 @@ bool ValidateAll(bool thorough) pass=TestIntegerBitops() && pass; // http://github.com/weidai11/cryptopp/issues/64 pass=TestPolynomialMod2() && pass; - // http://github.com/weidai11/cryptopp/pull/242 + // http://github.com/weidai11/cryptopp/issues/242 pass=TestHuffmanCodes() && pass; + // http://github.com/weidai11/cryptopp/issues/346 + pass=TestASN1Parse() && pass; #endif pass=ValidateCRC32() && pass;