[igt-dev] [PATCH i-g-t 1/4] tests/kms_concurrent: Actually seed the rng

Ville Syrjala ville.syrjala at linux.intel.com
Tue Feb 23 21:09:47 UTC 2021


From: Ville Syrjälä <ville.syrjala at linux.intel.com>

Add the missing srand() call to actually seed the random number
generator.

Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
 tests/kms_concurrent.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/kms_concurrent.c b/tests/kms_concurrent.c
index 573631e0f7ba..bd7416fda760 100644
--- a/tests/kms_concurrent.c
+++ b/tests/kms_concurrent.c
@@ -294,6 +294,8 @@ run_test(data_t *data, enum pipe pipe, igt_output_t *output)
 		igt_info("Testing resolution with connector %s using pipe %s with seed %d\n",
 			 igt_output_name(output), kmstest_pipe_name(pipe), opt.seed);
 
+		srand(opt.seed);
+
 		test_init(data, pipe, n_planes, output);
 
 		igt_fork(child, 1) {
-- 
2.26.2



More information about the igt-dev mailing list