about summary refs log tree commit diff
path: root/stdlib/Makefile
diff options
context:
space:
mode:
authorAdhemerval Zanella Netto <adhemerval.zanella@linaro.org>2022-07-21 10:05:00 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-07-22 11:58:27 -0300
commit8dd890d96f1833a58de6e112a14d63ab44e0a402 (patch)
tree0369ccc9a88124cc69c83ad51cfc640fac45bb15 /stdlib/Makefile
parent6f4e0fcfa2d2b0915816a3a3a1d48b4763a7dee2 (diff)
downloadglibc-8dd890d96f1833a58de6e112a14d63ab44e0a402.tar.gz
glibc-8dd890d96f1833a58de6e112a14d63ab44e0a402.tar.xz
glibc-8dd890d96f1833a58de6e112a14d63ab44e0a402.zip
stdlib: Add arc4random tests
The basic tst-arc4random-chacha20.c checks if the output of ChaCha20
implementation matches the reference test vectors from RFC8439.

The tst-arc4random-fork.c check if subprocesses generate distinct
streams of randomness (if fork handling is done correctly).

The tst-arc4random-stats.c is a statistical test to the randomness of
arc4random, arc4random_buf, and arc4random_uniform.

The tst-arc4random-thread.c check if threads generate distinct streams
of randomness (if function are thread-safe).

Checked on x86_64-linux-gnu, aarch64-linux, and powerpc64le-linux-gnu.

Co-authored-by: Florian Weimer <fweimer@redhat.com>

Checked on x86_64-linux-gnu and aarch64-linux-gnu.
Diffstat (limited to 'stdlib/Makefile')
-rw-r--r--stdlib/Makefile7
1 files changed, 7 insertions, 0 deletions
diff --git a/stdlib/Makefile b/stdlib/Makefile
index 62f8253225..a900962685 100644
--- a/stdlib/Makefile
+++ b/stdlib/Makefile
@@ -183,6 +183,9 @@ tests := \
   testmb2 \
   testrand \
   testsort \
+  tst-arc4random-fork \
+  tst-arc4random-stats \
+  tst-arc4random-thread \
   tst-at_quick_exit \
   tst-atexit \
   tst-atof1 \
@@ -243,6 +246,7 @@ tests := \
   # tests
 
 tests-internal := \
+  tst-arc4random-chacha20 \
   tst-strtod1i \
   tst-strtod3 \
   tst-strtod4 \
@@ -252,6 +256,7 @@ tests-internal := \
   # tests-internal
 
 tests-static := \
+  tst-arc4random-chacha20 \
   tst-secure-getenv \
   # tests-static
 
@@ -271,6 +276,8 @@ LDLIBS-test-cxa_atexit-race = $(shared-thread-library)
 LDLIBS-test-cxa_atexit-race2 = $(shared-thread-library)
 LDLIBS-test-on_exit-race = $(shared-thread-library)
 LDLIBS-tst-canon-bz26341 = $(shared-thread-library)
+LDLIBS-tst-arc4random-fork = $(shared-thread-library)
+LDLIBS-tst-arc4random-thread = $(shared-thread-library)
 
 LDLIBS-test-dlclose-exit-race = $(shared-thread-library)
 LDFLAGS-test-dlclose-exit-race = $(LDFLAGS-rdynamic)