extend test to show crypto issue
authorChristian Grothoff <christian@grothoff.org>
Wed, 16 May 2018 22:16:09 +0000 (00:16 +0200)
committerChristian Grothoff <christian@grothoff.org>
Wed, 16 May 2018 22:16:09 +0000 (00:16 +0200)
src/rps/test_rps.c
src/util/test_crypto_ecdh_eddsa.c

index 542919425da19ca90984fe8603233794f3157e12..bae28428f6a0e5f8c788b41c7cf1e2acf05851cd 100644 (file)
@@ -2782,7 +2782,7 @@ main (int argc, char *argv[])
   {
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "This is the profiler\n");
     cur_test_run.name = "test-rps-profiler";
-    num_peers = 10;
+    num_peers = 100;
     mal_type = 3;
     cur_test_run.init_peer = profiler_init_peer;
     //cur_test_run.pre_test = mal_pre;
index ec7819c3bdfcdc4424f3d0d4e11fb3cff74422fb..efb9e0992caa7f1584975437ade3bc03835e34df 100644 (file)
@@ -56,7 +56,8 @@ test_ecdh()
                                            &id1,
                                            &dh[1]));
   /* Check that both DH results are equal. */
-  GNUNET_assert (0 == memcmp (&dh[0], &dh[1],
+  GNUNET_assert (0 == memcmp (&dh[0],
+                              &dh[1],
                              sizeof (struct GNUNET_HashCode)));
   GNUNET_free (priv_dsa);
   GNUNET_free (priv_ecdh);
@@ -75,10 +76,13 @@ main (int argc, char *argv[])
     return 0;
   }
   if (getenv ("GNUNET_GCRYPT_DEBUG"))
-    gcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1u , 0);
+    gcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1u, 0);
   GNUNET_log_setup ("test-crypto-ecdh-eddsa", "WARNING", NULL);
-  if (0 != test_ecdh())
-    return 1;
+  for (unsigned int i=0;i<10000;i++)
+  {
+    if (0 != test_ecdh())
+      return 1;
+  }
   return 0;
 }