[Piglit] [PATCH 3/4] Make piglit_probe_image_rgb[a] continue probing even after a bad pixel.
kenneth at whitecape.org
Wed Nov 30 12:31:43 PST 2011
On 11/30/2011 05:05 AM, Eric Anholt wrote:
> On Tue, 29 Nov 2011 23:32:29 -0800, Kenneth Graunke <kenneth at whitecape.org> wrote:
>> piglit_probe_image_rgba is supposed to probe a whole rectangle's worth
>> of pixels, comparing them against the supplied image. Previously, it
>> would stop probing after it found one incorrect pixel, failing to report
>> any other bad pixels. This was misleading since silence usually means
>> "probe was correct".
> I'm lost. How would you get silence despite having found a bad pixel?
> Did you mean "silence about the other pixels"?
Yeah. I asked it to probe the whole rectangle, it found one bad pixel,
reported that, and then stopped. This confused me, as I thought
Piglit's silence indicated that the other 2079 pixels were correct.
A lot of piglit tests probe_pixel_rgb a number of pixels, which leads to
one "Probe at ..." failure message per bad pixel. Any probes that it
_doesn't_ print a message about can be presumed correct.
> The intent was "once one pixel is bad, it's quite likely that a whole
> lot of pixels are bad, so don't spam an observed/expected combination
> for the other probably (w * h - 1) pixels". I'm betting that this
> behavior is desired way more often than "keep probing and spamming after
> a bad one".
You're right, the spam is rather annoying. Perhaps we just need a
better error message? Something like:
Image probe at (5,5) -> (70, 37) failed at pixel (7,9):
Expected: %f %f %f %f
Observed: %f %f %f %f
Not reporting other failures from this probe.
But, then again, sometimes I really want to see the values. Spam I can
redirect to a file or pipe to "less." Not showing the values means I
get to go hack up piglit to analyze the failure. Maybe add a -verbose
option? Though, seems like overkill...
More information about the Piglit