[igt-dev] [PATCH i-g-t] tests/kms_addfb_basic: avoid excessive logging on legacy format test

Juha-Pekka Heikkila juhapekka.heikkila at gmail.com
Tue Oct 11 19:15:25 UTC 2022


legacy format addfb test try to fuzz kernel with random parameters,
these random parameters cause logging into dmesg. Limit fuzzing
rounds to maximum of 10k (or 1 second) to limit size of created log.

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
---
 tests/kms_addfb_basic.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/tests/kms_addfb_basic.c b/tests/kms_addfb_basic.c
index afb4bdf6f..f91153b5b 100644
--- a/tests/kms_addfb_basic.c
+++ b/tests/kms_addfb_basic.c
@@ -241,6 +241,13 @@ static void invalid_tests(int fd)
 			}
 
 			count++;
+
+			/*
+			 * to avoid exessive logging stop after 10k loops
+			 */
+			if (count >= 10000) {
+				break;
+			}
 		}
 
 		/* After all the abuse, confirm the known_formats */
-- 
2.37.3



More information about the igt-dev mailing list