All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] tests/kms_flip: Update logic to calculate test duration
@ 2022-05-06  4:15 Karthik B S
  2022-05-06  5:45 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Karthik B S @ 2022-05-06  4:15 UTC (permalink / raw)
  To: igt-dev; +Cc: juha-pekka.heikkila

Few of the subtests are intended to run only for one iteration with
duration of 0. But because of the existing logic to calculate duration,
even these subtests are running in loop for 0.5s. This is causing excessive
logging in the nonexisting-fb subtests.

Added check to use duration calculation logic only if duration is
non-zero in the first place.

Signed-off-by: Karthik B S <karthik.b.s@intel.com>
---
 tests/kms_flip.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index ce452dc8..773e6597 100755
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -1537,8 +1537,11 @@ static int run_test(int duration, int flags)
 	}
 
 	igt_require(modes);
-	duration = duration * 1000 / modes;
-	duration = max(500, duration);
+
+	if (duration) {
+		duration = duration * 1000 / modes;
+		duration = max(500, duration);
+	}
 
 	/* Find any connected displays */
 	for (i = 0; i < resources->count_connectors; i++) {
@@ -1605,8 +1608,11 @@ static int run_pair(int duration, int flags)
 	/* If we have fewer than 2 connected outputs then we won't have any
 	 * configuration at all. So skip in that case. */
 	igt_require_f(modes, "At least two displays required\n");
-	duration = duration * 1000 / modes;
-	duration = max(duration, 500);
+
+	if (duration) {
+		duration = duration * 1000 / modes;
+		duration = max(duration, 500);
+	}
 
 	/* Find a pair of connected displays */
 	for (i = 0; i < resources->count_connectors; i++) {
-- 
2.22.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-05-06 14:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-06  4:15 [igt-dev] [PATCH i-g-t] tests/kms_flip: Update logic to calculate test duration Karthik B S
2022-05-06  5:45 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
2022-05-06 10:20 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_flip: Update logic to calculate test duration (rev2) Patchwork
2022-05-06 12:49 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2022-05-06 14:08 ` [igt-dev] [PATCH i-g-t] tests/kms_flip: Update logic to calculate test duration Juha-Pekka Heikkila

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.