[FFmpeg-devel] [PATCH 1/2] avutil/random_seed: Speed up fate test

Michael Niedermayer michael at niedermayer.cc
Tue Jan 25 12:21:08 EET 2022


This decreases the quality of the seeds during the test, it does not affect
the seeds outside the test.
There is a small chance that this causes test failures, if that happens
the threshold needs adjusting

Testing on an idle x86_64 system shows that this passes even with the test strength
increased to 32768 from 256 with 0 retries
So test failures are not anticipated
Lowering the threshold from 3 to 2 causes failure at test strength of 32768

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
 libavutil/random_seed.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/random_seed.c b/libavutil/random_seed.c
index 70dc509d2f..509b74936c 100644
--- a/libavutil/random_seed.c
+++ b/libavutil/random_seed.c
@@ -95,7 +95,7 @@ static uint32_t get_generic_seed(void)
             last_td = t - last_t;
             buffer[++i & 511] += last_td % 3294638521U;
             if ((t - init_t) >= CLOCKS_PER_SEC>>5)
-                if (last_i && i - last_i > 4 || i - last_i > 64 || TEST && i - last_i > 8)
+                if (last_i && i - last_i > 4 || i - last_i > 64 || TEST && i - last_i > 3)
                     break;
         }
         last_t = t;
-- 
2.17.1



More information about the ffmpeg-devel mailing list