summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2021-09-19 01:42:20 +0200
committerBruno Haible <bruno@clisp.org>2021-09-19 01:42:38 +0200
commit9dbf2816fd77fbd502b58d03f9f67e4894f8d78f (patch)
tree4ae1ba036f821baf0d6b391abeea0ff4f22cdda9
parent2b6d343ff9f3a536054024c233ff46c2d19e598e (diff)
downloadgnulib-9dbf2816fd77fbd502b58d03f9f67e4894f8d78f.tar.gz
sha512-buffer tests: New module.
* tests/test-sha512-stream.c: Renamed from tests/test-sha512.c. * modules/crypto/sha512-buffer-tests: New file, based on modules/crypto/sha512-tests. * modules/crypto/sha512-tests: Remove tests that are now in modules/crypto/sha512-buffer-tests. Test tests/test-sha512-stream.c instead of tests/test-sha512.c.
-rw-r--r--ChangeLog8
-rw-r--r--modules/crypto/sha512-buffer-tests16
-rw-r--r--modules/crypto/sha512-tests16
-rw-r--r--tests/test-sha512-stream.c (renamed from tests/test-sha512.c)0
4 files changed, 28 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index f3e77f5e4d..398c8cfe71 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2021-09-18 Bruno Haible <bruno@clisp.org>
+ sha512-buffer tests: New module.
+ * tests/test-sha512-stream.c: Renamed from tests/test-sha512.c.
+ * modules/crypto/sha512-buffer-tests: New file, based on
+ modules/crypto/sha512-tests.
+ * modules/crypto/sha512-tests: Remove tests that are now in
+ modules/crypto/sha512-buffer-tests. Test tests/test-sha512-stream.c
+ instead of tests/test-sha512.c.
+
sha512: Clarify module to source relation.
* lib/sha512-stream.c: New file, extracted from lib/sha512.c.
* lib/sha512.c: Don't include stdlib.h, unlocked-io.h.
diff --git a/modules/crypto/sha512-buffer-tests b/modules/crypto/sha512-buffer-tests
new file mode 100644
index 0000000000..0b61ec444b
--- /dev/null
+++ b/modules/crypto/sha512-buffer-tests
@@ -0,0 +1,16 @@
+Files:
+tests/bench-sha384.c
+tests/bench-sha512.c
+tests/bench-digest.h
+
+Depends-on:
+c99
+getrusage
+gettimeofday
+
+configure.ac:
+
+Makefile.am:
+noinst_PROGRAMS += bench-sha384 bench-sha512
+bench_sha384_LDADD = $(LDADD) @LIB_CRYPTO@
+bench_sha512_LDADD = $(LDADD) @LIB_CRYPTO@
diff --git a/modules/crypto/sha512-tests b/modules/crypto/sha512-tests
index fba9dc5388..9efe7d234e 100644
--- a/modules/crypto/sha512-tests
+++ b/modules/crypto/sha512-tests
@@ -1,22 +1,14 @@
Files:
-tests/test-sha512.c
+tests/test-sha512-stream.c
tests/test-digest.h
-tests/bench-sha384.c
-tests/bench-sha512.c
-tests/bench-digest.h
tests/macros.h
Depends-on:
c99
-getrusage
-gettimeofday
configure.ac:
Makefile.am:
-TESTS += test-sha512
-check_PROGRAMS += test-sha512
-noinst_PROGRAMS += bench-sha384 bench-sha512
-test_sha512_LDADD = $(LDADD) @LIB_CRYPTO@
-bench_sha384_LDADD = $(LDADD) @LIB_CRYPTO@
-bench_sha512_LDADD = $(LDADD) @LIB_CRYPTO@
+TESTS += test-sha512-stream
+check_PROGRAMS += test-sha512-stream
+test_sha512_stream_LDADD = $(LDADD) @LIB_CRYPTO@
diff --git a/tests/test-sha512.c b/tests/test-sha512-stream.c
index d34bf443d0..d34bf443d0 100644
--- a/tests/test-sha512.c
+++ b/tests/test-sha512-stream.c