You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@milagro.apache.org by sa...@apache.org on 2020/03/06 09:15:42 UTC

[incubator-milagro-crypto-c] 01/02: Fix tests when using DEBUG_NORM

This is an automated email from the ASF dual-hosted git repository.

sandreoli pushed a commit to branch issue75-review-norm
in repository https://gitbox.apache.org/repos/asf/incubator-milagro-crypto-c.git

commit 32a517ba39d5f346c79ed582a5220a21ccdd5b37
Author: Samuele Andreoli <sa...@yahoo.it>
AuthorDate: Thu Mar 5 14:16:50 2020 +0000

    Fix tests when using DEBUG_NORM
---
 test/CMakeLists.txt                | 6 ++++--
 test/test_big_consistency_XXX.c.in | 2 +-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 5c13d80..2cf47b4 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -160,8 +160,10 @@ foreach(curve ${AMCL_CURVE})
     endif(CS STREQUAL "128")
     amcl_curve_test(${curve} test_pair_${TC}             test_pair_ZZZ.c.in             amcl_pairing_${TC} "SUCCESS")
 
-    if(CMAKE_SYSTEM_NAME MATCHES "Linux")
-      # Test arithmetics debug output functions - Linux specific code
+    # Test arithmetics debug output functions - Linux specific code
+    # Skip the tests when using DEBUG_NORM, since it changes the raw
+    # output
+    if(CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT DEBUG_NORM)
       amcl_curve_test(${curve} test_output_functions_${TC} test_output_functions_ZZZ.c.in amcl_pairing_${TC} "SUCCESS" "output/test_vector_${TC}_${WORD_SIZE}.txt" "stdout.out")
     endif(CMAKE_SYSTEM_NAME MATCHES "Linux")
 
diff --git a/test/test_big_consistency_XXX.c.in b/test/test_big_consistency_XXX.c.in
index dbdfca8..3cb69af 100644
--- a/test/test_big_consistency_XXX.c.in
+++ b/test/test_big_consistency_XXX.c.in
@@ -112,7 +112,7 @@ int main()
 
     /* Testing small multiplication and addition */
     BIG_XXX_random(F,&rng);
-    for (j = 1; j <= 20; ++j)
+    for (j = 1; j <= NEXCESS_XXX; ++j)
     {
         BIG_XXX_imul(H,F,j);
         BIG_XXX_copy(G,F);