linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: linux-fbdev@vger.kernel.org
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Subject: [PATCH fbtest 15/17] test013: Fix off-by-one error in maximum circle calculation
Date: Sun, 15 Dec 2024 11:45:06 +0100	[thread overview]
Message-ID: <20241215104508.191237-16-geert@linux-m68k.org> (raw)
In-Reply-To: <20241215104508.191237-1-geert@linux-m68k.org>

A circle with radius R has an actual diameter of 2*R+1 instead of 2*R.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
 tests/test013.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/test013.c b/tests/test013.c
index 96fc1cd216b81b0a..25904270901eaded 100644
--- a/tests/test013.c
+++ b/tests/test013.c
@@ -63,10 +63,10 @@ static enum test_res test013_func(void)
 
     while (1)
 	for (i = 0; i < sizeof(sizes)/sizeof(*sizes); i++) {
-	    size = sizes[i];
+	    size = sizes[i] + 1;
 	    if (size > fb_var.xres_virtual || size > fb_var.yres_virtual)
 		goto out;
-	    benchmark_circles(size/2);
+	    benchmark_circles(sizes[i]/2);
 	    sizes[i] *= 10;
 	}
 
-- 
2.34.1


  parent reply	other threads:[~2024-12-15 10:51 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-15 10:44 [PATCH fbtest 00/17] Export feature and large ellipses support Geert Uytterhoeven
2024-12-15 10:44 ` [PATCH fbtest 01/17] Add support for exporting virtual test images Geert Uytterhoeven
2024-12-15 10:44 ` [PATCH fbtest 02/17] tests: Print test description in debug mode Geert Uytterhoeven
2024-12-15 10:44 ` [PATCH fbtest 03/17] Test002: Fix test description Geert Uytterhoeven
2024-12-15 10:44 ` [PATCH fbtest 04/17] drawops: Extract do_circle() Geert Uytterhoeven
2024-12-15 10:44 ` [PATCH fbtest 05/17] drawops: Use "y == 0" in draw_ellipse_points() Geert Uytterhoeven
2024-12-15 10:44 ` [PATCH fbtest 06/17] drawops: Remove always-false check in generic_fill_ellipse() Geert Uytterhoeven
2024-12-15 10:44 ` [PATCH fbtest 07/17] drawops: Refactor generic_draw_ellipse() Geert Uytterhoeven
2024-12-15 10:44 ` [PATCH fbtest 08/17] drawops: Return early in generic_{draw,fill}_ellipse() Geert Uytterhoeven
2024-12-15 10:45 ` [PATCH fbtest 09/17] drawops: Extract do_ellipse() Geert Uytterhoeven
2024-12-15 10:45 ` [PATCH fbtest 10/17] drawops: Make de in do_circle() unsigned Geert Uytterhoeven
2024-12-15 10:45 ` [PATCH fbtest 11/17] drawops: Make dT1 and dS1 in do_ellipse() unsigned Geert Uytterhoeven
2024-12-15 10:45 ` [PATCH fbtest 12/17] drawops: Fix crash when drawing large ellipses Geert Uytterhoeven
2024-12-15 15:08   ` Helge Deller
2024-12-18 16:29     ` Geert Uytterhoeven
2024-12-18 18:00       ` Helge Deller
2024-12-15 10:45 ` [PATCH fbtest 13/17] tests: Clear frame buffer before each test Geert Uytterhoeven
2024-12-15 10:45 ` [PATCH fbtest 14/17] Make variables that are never negative unsigned Geert Uytterhoeven
2024-12-15 10:45 ` Geert Uytterhoeven [this message]
2024-12-15 10:45 ` [PATCH fbtest 16/17] visops: Mark fall-through switch case Geert Uytterhoeven
2024-12-15 10:45 ` [PATCH fbtest 17/17] util: Use __attribute__ Geert Uytterhoeven
2024-12-24 13:07 ` [PATCH fbtest 00/17] Export feature and large ellipses support Geert Uytterhoeven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241215104508.191237-16-geert@linux-m68k.org \
    --to=geert@linux-m68k.org \
    --cc=linux-fbdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).