Jelajahi Sumber

Initial TrustInSoft CI configuration

Guillaume Millot 5 tahun lalu
induk
melakukan
c96e6d2cec
8 mengubah file dengan 163 tambahan dan 0 penghapusan
  1. 16 0
      tests/tests.c
  2. 8 0
      tis-ci/common.config
  3. 4 0
      tis-ci/gcc_ppc_32.config
  4. 4 0
      tis-ci/gcc_ppc_64.config
  5. 4 0
      tis-ci/gcc_x86_32.config
  6. 4 0
      tis-ci/gcc_x86_64.config
  7. TEMPAT SAMPAH
      tis-ci/urandom_1
  8. 123 0
      tis.config

+ 16 - 0
tests/tests.c

@@ -81,7 +81,11 @@ test_hash(void)
     uint8_t          dk[hydro_random_SEEDBYTES];
     uint8_t          h[100];
     uint8_t          key[hydro_hash_KEYBYTES];
+#ifdef  __TRUSTINSOFT_ANALYZER__
+    uint8_t          msg[32];
+#else
     uint8_t          msg[1000];
+#endif
     char             hex[100 * 2 + 1];
     size_t           i;
 
@@ -96,25 +100,33 @@ test_hash(void)
     }
     hydro_hash_final(&st, h, sizeof h);
     hydro_bin2hex(hex, sizeof hex, h, sizeof h);
+#ifndef  __TRUSTINSOFT_ANALYZER__
     assert_streq(
         "e5d2beb77a039965850ee76327e06b2fa6cb5121db8038b11bce4641a9c4bd843658104bdf07342570bb5fd1d7"
         "2c0d31a8981b47c718fddaffbd4171605c873cbaf921bb57988dd814f3a3fbef9799ff7c762705c4bf37ab2981"
         "5981bf0d8833d60afe14",
         hex);
+#endif
     hydro_hash_hash(h, sizeof h, msg, sizeof msg, ctx, key);
     hydro_bin2hex(hex, sizeof hex, h, sizeof h);
+#ifndef  __TRUSTINSOFT_ANALYZER__
     assert_streq(
         "724bd8883df73320ffd70923cb997f9a99bc670c4d78887be4975add0099fbf489b266a85d1f56743062d60a05"
         "590cbce47e45108367879bf4641cbaefe584e8618cbeb8c230ae956da22c7c5c4f11a8804ca576ec20fa5da239"
         "dde3d03a6018383c21f5",
         hex);
+#endif
     hydro_hash_hash(h, hydro_hash_BYTES, msg, sizeof msg, ctx, key);
     hydro_bin2hex(hex, sizeof hex, h, hydro_hash_BYTES);
+#ifndef  __TRUSTINSOFT_ANALYZER__
     assert_streq("7dfa45ce18210e2422fd658bf7beccb6e534e44f99ae359f4af3ba41af8ca463", hex);
+#endif
     /* total input length is a multiple of the rate */
     hydro_hash_hash(h, hydro_hash_BYTES, msg, 13, ctx, key);
     hydro_bin2hex(hex, sizeof hex, h, hydro_hash_BYTES);
+#ifndef  __TRUSTINSOFT_ANALYZER__
     assert_streq("d57a9800549bb4bab6a06fa6e16e08aad68d7d4313fb69a81b9f5d5af375dbe7", hex);
+#endif
 }
 
 static void
@@ -240,7 +252,11 @@ test_kdf(void)
 static void
 test_sign(void)
 {
+#ifdef  __TRUSTINSOFT_ANALYZER__
+    uint8_t            msg[32];
+#else
     uint8_t            msg[500];
+#endif
     uint8_t            sig[hydro_sign_BYTES];
     hydro_sign_state   st;
     hydro_sign_keypair kp;

+ 8 - 0
tis-ci/common.config

@@ -0,0 +1,8 @@
+{
+    "files": [ "../tests/tests.c", "../hydrogen.c" ],
+    "filesystem": {
+        "files": [ { "name": "/dev/urandom", "from": "urandom_1" } ]
+    },
+    "val-timeout": 10800,
+    "no-results": "true"
+}

+ 4 - 0
tis-ci/gcc_ppc_32.config

@@ -0,0 +1,4 @@
+{
+    "machdep": "gcc_ppc_32",
+    "compilation_cmd": "-I../. -U__SSE2__ -Dvolatile= -D__BYTE_ORDER__=__ORDER_BIG_ENDIAN__ -U__SIZEOF_INT128__"
+}

+ 4 - 0
tis-ci/gcc_ppc_64.config

@@ -0,0 +1,4 @@
+{
+    "machdep": "gcc_ppc_64",
+    "compilation_cmd": "-I../. -U__SSE2__ -Dvolatile= -D__BYTE_ORDER__=__ORDER_BIG_ENDIAN__"
+}

+ 4 - 0
tis-ci/gcc_x86_32.config

@@ -0,0 +1,4 @@
+{
+    "machdep": "gcc_x86_32",
+    "compilation_cmd": "-I../. -U__SSE2__ -Dvolatile="
+}

+ 4 - 0
tis-ci/gcc_x86_64.config

@@ -0,0 +1,4 @@
+{
+    "machdep": "gcc_x86_64",
+    "compilation_cmd": "-I../. -U__SSE2__ -Dvolatile="
+}

TEMPAT SAMPAH
tis-ci/urandom_1


+ 123 - 0
tis.config

@@ -0,0 +1,123 @@
+[    
+    {
+        "name": "hash - gcc_x86_32",
+        "main": "test_hash",
+        "include": "tis-ci/gcc_x86_32.config",
+        "include": "tis-ci/common.config"
+    },
+    {
+        "name": "hash - gcc_x86_64",
+        "main": "test_hash",
+        "include": "tis-ci/gcc_x86_64.config",
+        "include": "tis-ci/common.config"
+    },
+    {
+        "name": "hash - gcc_ppc_32",
+        "main": "test_hash",
+        "include": "tis-ci/gcc_ppc_32.config",
+        "include": "tis-ci/common.config"
+ 
+    },
+    {
+        "name": "hash - gcc_ppc_64",
+        "main": "test_hash",
+        "include": "tis-ci/gcc_ppc_64.config",
+        "include": "tis-ci/common.config"
+    },
+    {
+        "name": "kdf - gcc_x86_32",
+        "main": "test_kdf",
+        "include": "tis-ci/gcc_x86_32.config",
+        "include": "tis-ci/common.config"
+    },
+    {
+        "name": "kdf - gcc_x86_64",
+        "main": "test_kdf",
+        "include": "tis-ci/gcc_x86_64.config",
+        "include": "tis-ci/common.config"
+    },
+    {
+        "name": "kdf - gcc_ppc_32",
+        "main": "test_kdf",
+        "include": "tis-ci/gcc_ppc_32.config",
+        "include": "tis-ci/common.config"
+    },
+    {
+        "name": "kdf - gcc_ppc_64",
+        "main": "test_kdf",
+        "include": "tis-ci/gcc_ppc_64.config",
+        "include": "tis-ci/common.config"
+    },
+    {
+        "name": "pwhash - gcc_x86_32",
+        "main": "test_pwhash",
+        "include": "tis-ci/gcc_x86_32.config",
+        "include": "tis-ci/common.config"
+    },
+    {
+        "name": "pwhash - gcc_x86_64",
+        "main": "test_pwhash",
+        "include": "tis-ci/gcc_x86_64.config",
+        "include": "tis-ci/common.config"
+    },
+    {
+        "name": "pwhash - gcc_ppc_32",
+        "main": "test_pwhash",
+        "include": "tis-ci/gcc_ppc_32.config",
+        "include": "tis-ci/common.config"
+    },
+    {
+        "name": "pwhash - gcc_ppc_64",
+        "main": "test_pwhash",
+        "include": "tis-ci/gcc_ppc_64.config",
+        "include": "tis-ci/common.config"
+    },
+    {
+        "name": "secretbox - gcc_x86_32",
+        "main": "test_secretbox",
+        "include": "tis-ci/gcc_x86_32.config",
+        "include": "tis-ci/common.config"
+    },
+    {
+        "name": "secretbox - gcc_x86_64",
+        "main": "test_secretbox",
+        "include": "tis-ci/gcc_x86_64.config",
+        "include": "tis-ci/common.config"
+    },
+    {
+        "name": "secretbox - gcc_ppc_32",
+        "main": "test_secretbox",
+        "include": "tis-ci/gcc_ppc_32.config",
+        "include": "tis-ci/common.config"
+    },
+    {
+        "name": "secretbox - gcc_ppc_64",
+        "main": "test_secretbox",
+        "include": "tis-ci/gcc_ppc_64.config",
+        "include": "tis-ci/common.config"
+    },
+    {
+        "name": "sign - gcc_x86_32",
+        "main": "test_sign",
+        "include": "tis-ci/gcc_x86_32.config",
+        "include": "tis-ci/common.config"
+    },
+    {
+        "name": "sign - gcc_x86_64",
+        "main": "test_sign",
+        "include": "tis-ci/gcc_x86_64.config",
+        "include": "tis-ci/common.config"
+    },
+    {
+        "name": "sign - gcc_ppc_32",
+        "main": "test_sign",
+        "include": "tis-ci/gcc_ppc_32.config",
+        "include": "tis-ci/common.config"
+    },
+    {
+        "name": "sign - gcc_ppc_64",
+        "main": "test_sign",
+        "include": "tis-ci/gcc_ppc_64.config",
+        "include": "tis-ci/common.config"
+    }
+]