aboutsummaryrefslogtreecommitdiffstats
path: root/test/c/siphash24.c
diff options
context:
space:
mode:
authorCyril SIX <cyril.six@kalray.eu>2019-10-22 17:44:15 +0200
committerCyril SIX <cyril.six@kalray.eu>2019-10-22 17:44:44 +0200
commit8bee1136d7d298e9f33ea91ee7a248909467dd13 (patch)
tree91a80daa8798d872f65fa2bb5c336fe630d2cfe2 /test/c/siphash24.c
parente247f20f8fb530bb225ac04f2e1589beaffcb257 (diff)
downloadcompcert-kvx-8bee1136d7d298e9f33ea91ee7a248909467dd13.tar.gz
compcert-kvx-8bee1136d7d298e9f33ea91ee7a248909467dd13.zip
Scaling down forgotten tests -> test/c/ operational
Diffstat (limited to 'test/c/siphash24.c')
-rw-r--r--test/c/siphash24.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/c/siphash24.c b/test/c/siphash24.c
index 4a42e013..ce0df78c 100644
--- a/test/c/siphash24.c
+++ b/test/c/siphash24.c
@@ -235,13 +235,19 @@ int test_vectors()
u8 testdata[100] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 12, 34, 56, 78, 90 };
+#ifdef __K1C__
+#define NITER 1000
+#else
+#define NITER 1000000
+#endif
+
int speed_test(void)
{
u8 out[8], k[16];
int i;
for(i = 0; i < 16; ++i ) k[i] = i;
- for(i = 0; i < 1000000; i++) {
+ for(i = 0; i < NITER; i++) {
testdata[99] = (u8) i;
crypto_auth(out, testdata, 100, k);
}