diff options
author | Mattias Andrée <maandree@kth.se> | 2024-09-01 18:12:21 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2024-09-01 18:12:21 +0200 |
commit | 85b12e691577b4d4fe09b80b06e91a801dc3dfa9 (patch) | |
tree | 69c64bc9a9fc97826fe8cb2d7ef82f00b1193efc | |
parent | Add support for BLAKE2 (but not tree-hashing) (diff) | |
download | libhashsum-85b12e691577b4d4fe09b80b06e91a801dc3dfa9.tar.gz libhashsum-85b12e691577b4d4fe09b80b06e91a801dc3dfa9.tar.bz2 libhashsum-85b12e691577b4d4fe09b80b06e91a801dc3dfa9.tar.xz |
Move test files into t/
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | Makefile | 79 | ||||
-rw-r--r-- | t/blake224.c (renamed from blake224.c) | 4 | ||||
-rw-r--r-- | t/blake256.c (renamed from blake256.c) | 4 | ||||
-rw-r--r-- | t/blake384.c (renamed from blake384.c) | 4 | ||||
-rw-r--r-- | t/blake512.c (renamed from blake512.c) | 4 | ||||
-rw-r--r-- | t/keccak.c (renamed from keccak.c) | 4 | ||||
-rw-r--r-- | t/keccak_224.c (renamed from keccak_224.c) | 4 | ||||
-rw-r--r-- | t/keccak_256.c (renamed from keccak_256.c) | 4 | ||||
-rw-r--r-- | t/keccak_384.c (renamed from keccak_384.c) | 4 | ||||
-rw-r--r-- | t/keccak_512.c (renamed from keccak_512.c) | 4 | ||||
-rw-r--r-- | t/md2.c (renamed from md2.c) | 4 | ||||
-rw-r--r-- | t/md4.c (renamed from md4.c) | 4 | ||||
-rw-r--r-- | t/md5.c (renamed from md5.c) | 4 | ||||
-rw-r--r-- | t/misc-tests.c (renamed from misc-tests.c) | 2 | ||||
-rw-r--r-- | t/rawshake128.c (renamed from rawshake128.c) | 4 | ||||
-rw-r--r-- | t/rawshake256.c (renamed from rawshake256.c) | 4 | ||||
-rw-r--r-- | t/rawshake512.c (renamed from rawshake512.c) | 4 | ||||
-rw-r--r-- | t/ripemd-128.c (renamed from ripemd-128.c) | 4 | ||||
-rw-r--r-- | t/ripemd-160.c (renamed from ripemd-160.c) | 4 | ||||
-rw-r--r-- | t/ripemd-256.c (renamed from ripemd-256.c) | 4 | ||||
-rw-r--r-- | t/ripemd-320.c (renamed from ripemd-320.c) | 4 | ||||
-rw-r--r-- | t/sha0.c (renamed from sha0.c) | 4 | ||||
-rw-r--r-- | t/sha1.c (renamed from sha1.c) | 4 | ||||
-rw-r--r-- | t/sha3_224.c (renamed from sha3_224.c) | 4 | ||||
-rw-r--r-- | t/sha3_256.c (renamed from sha3_256.c) | 4 | ||||
-rw-r--r-- | t/sha3_384.c (renamed from sha3_384.c) | 4 | ||||
-rw-r--r-- | t/sha3_512.c (renamed from sha3_512.c) | 4 | ||||
-rw-r--r-- | t/sha_224.c (renamed from sha_224.c) | 4 | ||||
-rw-r--r-- | t/sha_256.c (renamed from sha_256.c) | 4 | ||||
-rw-r--r-- | t/sha_384.c (renamed from sha_384.c) | 4 | ||||
-rw-r--r-- | t/sha_512.c (renamed from sha_512.c) | 4 | ||||
-rw-r--r-- | t/sha_512_224.c (renamed from sha_512_224.c) | 4 | ||||
-rw-r--r-- | t/sha_512_256.c (renamed from sha_512_256.c) | 4 | ||||
-rw-r--r-- | t/shake128.c (renamed from shake128.c) | 4 | ||||
-rw-r--r-- | t/shake256.c (renamed from shake256.c) | 4 | ||||
-rw-r--r-- | t/shake512.c (renamed from shake512.c) | 4 |
36 files changed, 109 insertions, 108 deletions
@@ -85,41 +85,41 @@ SUBHDR =\ libhashsum/internal.h TEST =\ - md2.t\ - md4.t\ - md5.t\ - ripemd-128.t\ - ripemd-160.t\ - ripemd-256.t\ - ripemd-320.t\ - sha0.t\ - sha1.t\ - sha_224.t\ - sha_256.t\ - sha_384.t\ - sha_512.t\ - sha_512_224.t\ - sha_512_256.t\ - keccak_224.t\ - keccak_256.t\ - keccak_384.t\ - keccak_512.t\ - keccak.t\ - sha3_224.t\ - sha3_256.t\ - sha3_384.t\ - sha3_512.t\ - shake128.t\ - shake256.t\ - shake512.t\ - rawshake128.t\ - rawshake256.t\ - rawshake512.t\ - blake224.t\ - blake256.t\ - blake384.t\ - blake512.t\ - misc-tests.t + t/md2.t\ + t/md4.t\ + t/md5.t\ + t/ripemd-128.t\ + t/ripemd-160.t\ + t/ripemd-256.t\ + t/ripemd-320.t\ + t/sha0.t\ + t/sha1.t\ + t/sha_224.t\ + t/sha_256.t\ + t/sha_384.t\ + t/sha_512.t\ + t/sha_512_224.t\ + t/sha_512_256.t\ + t/keccak_224.t\ + t/keccak_256.t\ + t/keccak_384.t\ + t/keccak_512.t\ + t/keccak.t\ + t/sha3_224.t\ + t/sha3_256.t\ + t/sha3_384.t\ + t/sha3_512.t\ + t/shake128.t\ + t/shake256.t\ + t/shake512.t\ + t/rawshake128.t\ + t/rawshake256.t\ + t/rawshake512.t\ + t/blake224.t\ + t/blake256.t\ + t/blake384.t\ + t/blake512.t\ + t/misc-tests.t LOBJ = $(OBJ:.o=.lo) TOBJ = $(TEST:.t=.o) @@ -157,8 +157,8 @@ libhashsum.$(LIBEXT): $(LOBJ) check: $(TEST) @set -e;\ for t in $(TEST); do\ - printf '%s\n' ./$$t;\ - $(CHECK_PREFIX) ./$$t;\ + printf '%s\n' $$t;\ + $(CHECK_PREFIX) $$t;\ done install: libhashsum.a libhashsum.$(LIBEXT) @@ -188,8 +188,9 @@ uninstall: -cd -- "$(DESTDIR)$(MANPREFIX)/man7/" && rm -f -- $(MAN7) clean: - -rm -f -- *.o *.a *.lo *.su *.so *.so.* *.dll *.dylib *.t - -rm -f -- *.gch *.gcov *.gcno *.gcda *.$(LIBEXT) + -rm -f -- *.o *.a *.lo *.su *.t *.gch *.gcov *.gcno *.gcda + -rm -f -- t/*.o t/*.a t/*.lo t/*.su t/*.t t/*.gch t/*.gcov t/*.gcno t/*.gcda + -rm -f -- *.so *.so.* *.dll *.dylib *.$(LIBEXT) .SUFFIXES: .SUFFIXES: .lo .o .c .t diff --git a/blake224.c b/t/blake224.c index a0b6a9e..5605033 100644 --- a/blake224.c +++ b/t/blake224.c @@ -1,7 +1,7 @@ /* See LICENSE file for copyright and license details. */ #ifdef SUPPORT_BLAKE224 # define TEST -# include "common.h" +# include "../common.h" static struct testcase testcases[] = { @@ -65,7 +65,7 @@ static struct testcase testcases[] = { #else # define TEST_UNSUPPORTED -# include "common.h" +# include "../common.h" #endif diff --git a/blake256.c b/t/blake256.c index 412b28f..e42cec7 100644 --- a/blake256.c +++ b/t/blake256.c @@ -1,7 +1,7 @@ /* See LICENSE file for copyright and license details. */ #ifdef SUPPORT_BLAKE256 # define TEST -# include "common.h" +# include "../common.h" static struct testcase testcases[] = { @@ -65,7 +65,7 @@ static struct testcase testcases[] = { #else # define TEST_UNSUPPORTED -# include "common.h" +# include "../common.h" #endif diff --git a/blake384.c b/t/blake384.c index d4031e5..b2f5478 100644 --- a/blake384.c +++ b/t/blake384.c @@ -1,7 +1,7 @@ /* See LICENSE file for copyright and license details. */ #ifdef SUPPORT_BLAKE384 # define TEST -# include "common.h" +# include "../common.h" static struct testcase testcases[] = { @@ -115,7 +115,7 @@ static struct testcase testcases[] = { #else # define TEST_UNSUPPORTED -# include "common.h" +# include "../common.h" #endif diff --git a/blake512.c b/t/blake512.c index 88b20fc..7166769 100644 --- a/blake512.c +++ b/t/blake512.c @@ -1,7 +1,7 @@ /* See LICENSE file for copyright and license details. */ #ifdef SUPPORT_BLAKE512 # define TEST -# include "common.h" +# include "../common.h" static struct testcase testcases[] = { @@ -184,7 +184,7 @@ static struct testcase testcases[] = { #else # define TEST_UNSUPPORTED -# include "common.h" +# include "../common.h" #endif @@ -1,6 +1,6 @@ /* See LICENSE file for copyright and license details. */ #ifndef SUPPORT_KECCAK -# include "common.h" +# include "../common.h" int main(void) @@ -18,7 +18,7 @@ main(void) } #else -# include "common.h" +# include "../common.h" # define ASSERT(ASSERTION)\ diff --git a/keccak_224.c b/t/keccak_224.c index cfe1bc1..2120d1c 100644 --- a/keccak_224.c +++ b/t/keccak_224.c @@ -1,7 +1,7 @@ /* See LICENSE file for copyright and license details. */ #ifdef SUPPORT_KECCAK # define TEST -# include "common.h" +# include "../common.h" static struct testcase testcases[] = { @@ -17,7 +17,7 @@ static struct testcase testcases[] = { #else # define TEST_UNSUPPORTED -# include "common.h" +# include "../common.h" #endif diff --git a/keccak_256.c b/t/keccak_256.c index 4ac5930..1ab7a76 100644 --- a/keccak_256.c +++ b/t/keccak_256.c @@ -1,7 +1,7 @@ /* See LICENSE file for copyright and license details. */ #ifdef SUPPORT_KECCAK # define TEST -# include "common.h" +# include "../common.h" static struct testcase testcases[] = { @@ -17,7 +17,7 @@ static struct testcase testcases[] = { #else # define TEST_UNSUPPORTED -# include "common.h" +# include "../common.h" #endif diff --git a/keccak_384.c b/t/keccak_384.c index d545f4a..9ac068b 100644 --- a/keccak_384.c +++ b/t/keccak_384.c @@ -1,7 +1,7 @@ /* See LICENSE file for copyright and license details. */ #ifdef SUPPORT_KECCAK # define TEST -# include "common.h" +# include "../common.h" static struct testcase testcases[] = { @@ -17,7 +17,7 @@ static struct testcase testcases[] = { #else # define TEST_UNSUPPORTED -# include "common.h" +# include "../common.h" #endif diff --git a/keccak_512.c b/t/keccak_512.c index fae3585..93943d1 100644 --- a/keccak_512.c +++ b/t/keccak_512.c @@ -1,7 +1,7 @@ /* See LICENSE file for copyright and license details. */ #ifdef SUPPORT_KECCAK # define TEST -# include "common.h" +# include "../common.h" static struct testcase testcases[] = { @@ -31,7 +31,7 @@ static struct testcase testcases[] = { #else # define TEST_UNSUPPORTED -# include "common.h" +# include "../common.h" #endif @@ -2,7 +2,7 @@ #ifdef SUPPORT_MD2 # define TEST # define NO_CUSTOM_HASH_BUFFER_SUPPORT -# include "common.h" +# include "../common.h" static struct testcase testcases[] = { @@ -22,7 +22,7 @@ static struct testcase testcases[] = { #else # define TEST_UNSUPPORTED -# include "common.h" +# include "../common.h" #endif @@ -1,7 +1,7 @@ /* See LICENSE file for copyright and license details. */ #ifdef SUPPORT_MD4 # define TEST -# include "common.h" +# include "../common.h" static struct testcase testcases[] = { @@ -27,7 +27,7 @@ static struct testcase testcases[] = { #else # define TEST_UNSUPPORTED -# include "common.h" +# include "../common.h" #endif @@ -1,7 +1,7 @@ /* See LICENSE file for copyright and license details. */ #ifdef SUPPORT_MD5 # define TEST -# include "common.h" +# include "../common.h" static struct testcase testcases[] = { @@ -118,7 +118,7 @@ static struct testcase testcases[] = { #else # define TEST_UNSUPPORTED -# include "common.h" +# include "../common.h" #endif diff --git a/misc-tests.c b/t/misc-tests.c index 7a5c546..3942bfb 100644 --- a/misc-tests.c +++ b/t/misc-tests.c @@ -1,5 +1,5 @@ /* See LICENSE file for copyright and license details. */ -#include "common.h" +#include "../common.h" #define ASSERT(ASSERTION)\ diff --git a/rawshake128.c b/t/rawshake128.c index fa914da..5abc8cf 100644 --- a/rawshake128.c +++ b/t/rawshake128.c @@ -1,7 +1,7 @@ /* See LICENSE file for copyright and license details. */ #ifdef SUPPORT_SHAKE # define TEST -# include "common.h" +# include "../common.h" #define MSG1600_32 "\xA3\xA3\xA3\xA3" @@ -18,7 +18,7 @@ static struct testcase testcases[] = { #else # define TEST_UNSUPPORTED -# include "common.h" +# include "../common.h" #endif diff --git a/rawshake256.c b/t/rawshake256.c index e7836f0..6a03448 100644 --- a/rawshake256.c +++ b/t/rawshake256.c @@ -1,7 +1,7 @@ /* See LICENSE file for copyright and license details. */ #ifdef SUPPORT_SHAKE # define TEST -# include "common.h" +# include "../common.h" #define MSG1600_32 "\xA3\xA3\xA3\xA3" @@ -18,7 +18,7 @@ static struct testcase testcases[] = { #else # define TEST_UNSUPPORTED -# include "common.h" +# include "../common.h" #endif diff --git a/rawshake512.c b/t/rawshake512.c index 64dc31a..710514d 100644 --- a/rawshake512.c +++ b/t/rawshake512.c @@ -1,7 +1,7 @@ /* See LICENSE file for copyright and license details. */ #ifdef SUPPORT_SHAKE # define TEST -# include "common.h" +# include "../common.h" #define MSG1600_32 "\xA3\xA3\xA3\xA3" @@ -22,7 +22,7 @@ static struct testcase testcases[] = { #else # define TEST_UNSUPPORTED -# include "common.h" +# include "../common.h" #endif diff --git a/ripemd-128.c b/t/ripemd-128.c index b44c494..199bdcf 100644 --- a/ripemd-128.c +++ b/t/ripemd-128.c @@ -1,7 +1,7 @@ /* See LICENSE file for copyright and license details. */ #ifdef SUPPORT_RIPEMD_128 # define TEST -# include "common.h" +# include "../common.h" static struct testcase testcases[] = { @@ -25,7 +25,7 @@ static struct testcase testcases[] = { #else # define TEST_UNSUPPORTED -# include "common.h" +# include "../common.h" #endif diff --git a/ripemd-160.c b/t/ripemd-160.c index d1a1ece..326cc18 100644 --- a/ripemd-160.c +++ b/t/ripemd-160.c @@ -1,7 +1,7 @@ /* See LICENSE file for copyright and license details. */ #ifdef SUPPORT_RIPEMD_160 # define TEST -# include "common.h" +# include "../common.h" static struct testcase testcases[] = { @@ -25,7 +25,7 @@ static struct testcase testcases[] = { #else # define TEST_UNSUPPORTED -# include "common.h" +# include "../common.h" #endif diff --git a/ripemd-256.c b/t/ripemd-256.c index 646dbba..6706b6c 100644 --- a/ripemd-256.c +++ b/t/ripemd-256.c @@ -1,7 +1,7 @@ /* See LICENSE file for copyright and license details. */ #ifdef SUPPORT_RIPEMD_256 # define TEST -# include "common.h" +# include "../common.h" static struct testcase testcases[] = { @@ -40,7 +40,7 @@ static struct testcase testcases[] = { #else # define TEST_UNSUPPORTED -# include "common.h" +# include "../common.h" #endif diff --git a/ripemd-320.c b/t/ripemd-320.c index e7a5b27..49e3bd1 100644 --- a/ripemd-320.c +++ b/t/ripemd-320.c @@ -1,7 +1,7 @@ /* See LICENSE file for copyright and license details. */ #ifdef SUPPORT_RIPEMD_320 # define TEST -# include "common.h" +# include "../common.h" static struct testcase testcases[] = { @@ -40,7 +40,7 @@ static struct testcase testcases[] = { #else # define TEST_UNSUPPORTED -# include "common.h" +# include "../common.h" #endif @@ -1,7 +1,7 @@ /* See LICENSE file for copyright and license details. */ #ifdef SUPPORT_SHA0 # define TEST -# include "common.h" +# include "../common.h" static struct testcase testcases[] = { @@ -17,7 +17,7 @@ static struct testcase testcases[] = { #else # define TEST_UNSUPPORTED -# include "common.h" +# include "../common.h" #endif @@ -1,7 +1,7 @@ /* See LICENSE file for copyright and license details. */ #ifdef SUPPORT_SHA1 # define TEST -# include "common.h" +# include "../common.h" static struct testcase testcases[] = { @@ -39,7 +39,7 @@ static struct testcase testcases[] = { #else # define TEST_UNSUPPORTED -# include "common.h" +# include "../common.h" #endif diff --git a/sha3_224.c b/t/sha3_224.c index 4f3891f..2519053 100644 --- a/sha3_224.c +++ b/t/sha3_224.c @@ -1,7 +1,7 @@ /* See LICENSE file for copyright and license details. */ #ifdef SUPPORT_SHA3 # define TEST -# include "common.h" +# include "../common.h" static struct testcase testcases[] = { @@ -347,7 +347,7 @@ static struct testcase testcases[] = { #else # define TEST_UNSUPPORTED -# include "common.h" +# include "../common.h" #endif diff --git a/sha3_256.c b/t/sha3_256.c index fd57a2d..72546bb 100644 --- a/sha3_256.c +++ b/t/sha3_256.c @@ -1,7 +1,7 @@ /* See LICENSE file for copyright and license details. */ #ifdef SUPPORT_SHA3 # define TEST -# include "common.h" +# include "../common.h" static struct testcase testcases[] = { @@ -17,7 +17,7 @@ static struct testcase testcases[] = { #else # define TEST_UNSUPPORTED -# include "common.h" +# include "../common.h" #endif diff --git a/sha3_384.c b/t/sha3_384.c index 81bf084..7dff983 100644 --- a/sha3_384.c +++ b/t/sha3_384.c @@ -1,7 +1,7 @@ /* See LICENSE file for copyright and license details. */ #ifdef SUPPORT_SHA3 # define TEST -# include "common.h" +# include "../common.h" static struct testcase testcases[] = { @@ -17,7 +17,7 @@ static struct testcase testcases[] = { #else # define TEST_UNSUPPORTED -# include "common.h" +# include "../common.h" #endif diff --git a/sha3_512.c b/t/sha3_512.c index b05f680..356516f 100644 --- a/sha3_512.c +++ b/t/sha3_512.c @@ -1,7 +1,7 @@ /* See LICENSE file for copyright and license details. */ #ifdef SUPPORT_SHA3 # define TEST -# include "common.h" +# include "../common.h" static struct testcase testcases[] = { @@ -31,7 +31,7 @@ static struct testcase testcases[] = { #else # define TEST_UNSUPPORTED -# include "common.h" +# include "../common.h" #endif @@ -1,7 +1,7 @@ /* See LICENSE file for copyright and license details. */ #ifdef SUPPORT_SHA2 # define TEST -# include "common.h" +# include "../common.h" static struct testcase testcases[] = { @@ -39,7 +39,7 @@ static struct testcase testcases[] = { #else # define TEST_UNSUPPORTED -# include "common.h" +# include "../common.h" #endif @@ -1,7 +1,7 @@ /* See LICENSE file for copyright and license details. */ #ifdef SUPPORT_SHA2 # define TEST -# include "common.h" +# include "../common.h" static struct testcase testcases[] = { @@ -35,7 +35,7 @@ static struct testcase testcases[] = { #else # define TEST_UNSUPPORTED -# include "common.h" +# include "../common.h" #endif @@ -1,7 +1,7 @@ /* See LICENSE file for copyright and license details. */ #ifdef SUPPORT_SHA2 # define TEST -# include "common.h" +# include "../common.h" static struct testcase testcases[] = { @@ -46,7 +46,7 @@ static struct testcase testcases[] = { #else # define TEST_UNSUPPORTED -# include "common.h" +# include "../common.h" #endif @@ -1,7 +1,7 @@ /* See LICENSE file for copyright and license details. */ #ifdef SUPPORT_SHA2 # define TEST -# include "common.h" +# include "../common.h" static struct testcase testcases[] = { @@ -73,7 +73,7 @@ static struct testcase testcases[] = { #else # define TEST_UNSUPPORTED -# include "common.h" +# include "../common.h" #endif diff --git a/sha_512_224.c b/t/sha_512_224.c index a95bf92..3c0d33b 100644 --- a/sha_512_224.c +++ b/t/sha_512_224.c @@ -1,7 +1,7 @@ /* See LICENSE file for copyright and license details. */ #ifdef SUPPORT_SHA2 # define TEST -# include "common.h" +# include "../common.h" static struct testcase testcases[] = { @@ -15,7 +15,7 @@ static struct testcase testcases[] = { #else # define TEST_UNSUPPORTED -# include "common.h" +# include "../common.h" #endif diff --git a/sha_512_256.c b/t/sha_512_256.c index f4b168b..bc4b56a 100644 --- a/sha_512_256.c +++ b/t/sha_512_256.c @@ -1,7 +1,7 @@ /* See LICENSE file for copyright and license details. */ #ifdef SUPPORT_SHA2 # define TEST -# include "common.h" +# include "../common.h" static struct testcase testcases[] = { @@ -15,7 +15,7 @@ static struct testcase testcases[] = { #else # define TEST_UNSUPPORTED -# include "common.h" +# include "../common.h" #endif diff --git a/shake128.c b/t/shake128.c index d0ac638..10c24b3 100644 --- a/shake128.c +++ b/t/shake128.c @@ -1,7 +1,7 @@ /* See LICENSE file for copyright and license details. */ #ifdef SUPPORT_SHAKE # define TEST -# include "common.h" +# include "../common.h" #define MSG5 "\x13" @@ -26,7 +26,7 @@ static struct testcase testcases[] = { #else # define TEST_UNSUPPORTED -# include "common.h" +# include "../common.h" #endif diff --git a/shake256.c b/t/shake256.c index 38c9b40..0ddf9b3 100644 --- a/shake256.c +++ b/t/shake256.c @@ -1,7 +1,7 @@ /* See LICENSE file for copyright and license details. */ #ifdef SUPPORT_SHAKE # define TEST -# include "common.h" +# include "../common.h" #define MSG5 "\x13" @@ -26,7 +26,7 @@ static struct testcase testcases[] = { #else # define TEST_UNSUPPORTED -# include "common.h" +# include "../common.h" #endif diff --git a/shake512.c b/t/shake512.c index ac6e951..f9f0a54 100644 --- a/shake512.c +++ b/t/shake512.c @@ -1,7 +1,7 @@ /* See LICENSE file for copyright and license details. */ #ifdef SUPPORT_SHAKE # define TEST -# include "common.h" +# include "../common.h" #define MSG1600_32 "\xA3\xA3\xA3\xA3" @@ -22,7 +22,7 @@ static struct testcase testcases[] = { #else # define TEST_UNSUPPORTED -# include "common.h" +# include "../common.h" #endif |