]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
stdlib: Tune down fork arc4random tests
authorAdhemerval Zanella Netto <adhemerval.zanella@linaro.org>
Thu, 1 Jun 2023 15:59:19 +0000 (12:59 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Mon, 12 Jun 2023 17:45:16 +0000 (14:45 -0300)
There is no fork detection on current arc4random implementation, so
use lower subprocess on fork tests.  The tests now run on 0.1s
instead of 8s on a Ryzen9 5900X.

Checked on x86_64-linux-gnu.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
stdlib/tst-arc4random-fork.c

index a69ec3968f64ed0c7160292b79322dd50f9d7fa7..65d5893f5e807c5f10da0313c63667ddbb0fd98f 100644 (file)
 #include <unistd.h>
 
 /* Perform multiple runs.  The subsequent runs start with an
-   already-initialized random number generator.  (The number 1500 was
-   seen to reproduce failures reliable in case of a race condition in
-   the fork detection code.)  */
-enum { runs = 1500 };
-
-/* One hundred processes in total.  This should be high enough to
-   expose any issues, but low enough not to tax the overall system too
-   much.  */
+   already-initialized random number generator.  */
+enum { runs = 10 };
+
+/* Total number of spawned processes on each run.  */
 enum { subprocesses = 49 };
 
 /* The total number of processes.  */