summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2021-09-19 01:39:47 +0200
committerBruno Haible <bruno@clisp.org>2021-09-19 01:39:59 +0200
commitecad57d5a208a154ed0af6d93bd27a071c5d909b (patch)
treec500d91d376603a0f8e793e4f3a3c15f8f5c8c32
parent36cd6e0a4e9761db5f0b98508b21d552d9e50b28 (diff)
downloadgnulib-ecad57d5a208a154ed0af6d93bd27a071c5d909b.tar.gz
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.
-rw-r--r--ChangeLog8
-rw-r--r--modules/crypto/sha256-buffer-tests16
-rw-r--r--modules/crypto/sha256-tests16
-rw-r--r--tests/test-sha256-stream.c (renamed from tests/test-sha256.c)0
4 files changed, 28 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index 18d43f3b51..7ad6b02992 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2021-09-18 Bruno Haible <bruno@clisp.org>
+ 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 0000000000..53924b4a03
--- /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 fb9e06d70a..9357cc24d5 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
index c9a9ece586..c9a9ece586 100644
--- a/tests/test-sha256.c
+++ b/tests/test-sha256-stream.c