>From ecad57d5a208a154ed0af6d93bd27a071c5d909b Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 19 Sep 2021 01:39:47 +0200 Subject: [PATCH 10/14] sha256-buffer tests: New module. * tests/test-sha256-stream.c: Renamed from tests/test-sha256.c. * modules/crypto/sha256-buffer-tests: New file, based on modules/crypto/sha256-tests. * modules/crypto/sha256-tests: Remove tests that are now in modules/crypto/sha256-buffer-tests. Test tests/test-sha256-stream.c instead of tests/test-sha256.c. --- ChangeLog | 8 ++++++++ modules/crypto/sha256-buffer-tests | 16 ++++++++++++++++ modules/crypto/sha256-tests | 16 ++++------------ tests/{test-sha256.c => test-sha256-stream.c} | 0 4 files changed, 28 insertions(+), 12 deletions(-) create mode 100644 modules/crypto/sha256-buffer-tests rename tests/{test-sha256.c => test-sha256-stream.c} (100%) diff --git a/ChangeLog b/ChangeLog index 18d43f3b5..7ad6b0299 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2021-09-18 Bruno Haible + sha256-buffer tests: New module. + * tests/test-sha256-stream.c: Renamed from tests/test-sha256.c. + * modules/crypto/sha256-buffer-tests: New file, based on + modules/crypto/sha256-tests. + * modules/crypto/sha256-tests: Remove tests that are now in + modules/crypto/sha256-buffer-tests. Test tests/test-sha256-stream.c + instead of tests/test-sha256.c. + sha256: Clarify module to source relation. * lib/sha256-stream.c: New file, extracted from lib/sha256.c. * lib/sha256.c: Don't include stdlib.h, unlocked-io.h. diff --git a/modules/crypto/sha256-buffer-tests b/modules/crypto/sha256-buffer-tests new file mode 100644 index 000000000..53924b4a0 --- /dev/null +++ b/modules/crypto/sha256-buffer-tests @@ -0,0 +1,16 @@ +Files: +tests/bench-sha224.c +tests/bench-sha256.c +tests/bench-digest.h + +Depends-on: +c99 +getrusage +gettimeofday + +configure.ac: + +Makefile.am: +noinst_PROGRAMS += bench-sha224 bench-sha256 +bench_sha224_LDADD = $(LDADD) @LIB_CRYPTO@ +bench_sha256_LDADD = $(LDADD) @LIB_CRYPTO@ diff --git a/modules/crypto/sha256-tests b/modules/crypto/sha256-tests index fb9e06d70..9357cc24d 100644 --- a/modules/crypto/sha256-tests +++ b/modules/crypto/sha256-tests @@ -1,22 +1,14 @@ Files: -tests/test-sha256.c +tests/test-sha256-stream.c tests/test-digest.h -tests/bench-sha224.c -tests/bench-sha256.c -tests/bench-digest.h tests/macros.h Depends-on: c99 -getrusage -gettimeofday configure.ac: Makefile.am: -TESTS += test-sha256 -check_PROGRAMS += test-sha256 -noinst_PROGRAMS += bench-sha224 bench-sha256 -test_sha256_LDADD = $(LDADD) @LIB_CRYPTO@ -bench_sha224_LDADD = $(LDADD) @LIB_CRYPTO@ -bench_sha256_LDADD = $(LDADD) @LIB_CRYPTO@ +TESTS += test-sha256-stream +check_PROGRAMS += test-sha256-stream +test_sha256_stream_LDADD = $(LDADD) @LIB_CRYPTO@ diff --git a/tests/test-sha256.c b/tests/test-sha256-stream.c similarity index 100% rename from tests/test-sha256.c rename to tests/test-sha256-stream.c -- 2.25.1