From d4a9b78b901d7a2ba021342e3d088f9f1a9d20f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Moj=C5=BE=C3=AD=C5=A1?= Date: Thu, 10 Mar 2022 21:35:30 +0100 Subject: [PATCH] crypto-tests/crypto_sort_uint32test.c rm pseudorand. test fixes build on big-endian platforms --- crypto-tests/crypto_sort_uint32test.c | 29 --------------------------- 1 file changed, 29 deletions(-) diff --git a/crypto-tests/crypto_sort_uint32test.c b/crypto-tests/crypto_sort_uint32test.c index fd9d759..5e7efbd 100644 --- a/crypto-tests/crypto_sort_uint32test.c +++ b/crypto-tests/crypto_sort_uint32test.c @@ -26,38 +26,9 @@ static void test_i(void) { if (x[4] != (crypto_uint32) -1) fail("crypto_sort_uint32() failure"); } -#define SPACESIZE 123 - -static crypto_uint32 space[SPACESIZE + 4]; -static crypto_uint32 buf[SPACESIZE + 4]; - -static unsigned char test_pseudorandom_checksum[32] = { - 0xb6, 0x48, 0x52, 0x41, 0xd0, 0x19, 0xa7, 0x8c, - 0x61, 0x4d, 0x29, 0x9d, 0x1f, 0xda, 0xb9, 0xc5, - 0xbd, 0x47, 0xe6, 0x7f, 0xc2, 0xf3, 0x2e, 0xfd, - 0x32, 0x21, 0x7a, 0x7b, 0xbb, 0xec, 0x02, 0x08 -}; - -static void test_pseudorandom(void) { - - long long i, j; - - checksum_zero(); - i = 0; - for (j = 0; j < SPACESIZE; j += 1 + j / 4) { - pseudorandombytes(space + i, sizeof(crypto_uint32) * j); - crypto_sort_uint32(space + i, j); - checksum(space + i, sizeof(crypto_uint32) * j); - ++i; - i %= 4; - } - fail_whenbadchecksum(test_pseudorandom_checksum); -} - int main(void) { test_321(); test_i(); - test_pseudorandom(); _exit(0); }