Closed
Bug 275705
Opened 20 years ago
Closed 20 years ago
Better diagnostics for broken charts
Categories
(Bugzilla :: Reporting/Charting, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 2.20
People
(Reporter: gerv, Assigned: glob)
References
Details
Attachments
(4 files, 3 obsolete files)
We need at least:
- A better error message if they haven't run collectstats.pl
- Better diags if their GD installation isn't working
Gerv
i've been thinking about how to provide an error if GD isn't working.
the best i can come up with is have a static image that says "your gd library
isn't working, unable to create graph, yadda yadda".
Reporter | ||
Comment 2•20 years ago
|
||
The best thing would be for testserver.pl to create an image using GD.pm and
diff it against a known good test image. Then, we can output an error if it
doesn't work.
Gerv
adds GD and Chart testing to testserver.pl
output looks like..
E:\bugzilla\275705>perl testserver.pl http://localhost:81/275705
TEST-OK Got ant picture.
TEST-OK Webserver is executing CGIs.
TEST-OK Webserver is preventing fetch of
http://localhost:81/275705/localconfig.
TEST-OK GD Library generated a good PNG image
TEST-OK GD Library generated a good GIF image
TEST-OK Chart Library generated a good png image
required images coming up. all the images belong in the t/ directory.
Assignee: gerv → bugzilla
Status: NEW → ASSIGNED
the only thing i'm not sure about is if different versions of the GD library
generate different but binaries with the same bitmap -- i'm not sure but i think
there's versions of the GD library that generate uncompressed gifs.
this needs testing on a range of platforms.
Reporter | ||
Comment 9•20 years ago
|
||
Byron: thanks for taking this on :-)
IMO, we should not be testing for or configuring Bugzilla to generate GIFs any
more. It just adds to the support burden, every browser we care about supports
PNGs, and some versions of GD don't support GIF. For example, running this on my
Linux i686 Mandrake 10 machine gives:
TEST-OK GD Library generated a good PNG image
TEST-FAILED GD returned: Can't locate object method "gif" via package
"GD::Image" at ./testserver.pl line 168.
TEST-OK Chart Library generated a good png image
That would be an obvious-by-inspection bug in your image->can() call, but I
still think we should dispense with the GIF business.
Other patch comments:
- you need to clean up after yourself by deleting the images you create if the
test is successful.
- If an image is created but the compare fails, you should WARN, and suggest
they compare the images by eye.
- the script should not by die-ing on errors at any point
- (nit) Bugzilla coding style doesn't have a blank line after an opening or a
closing brace.
- Can we produce some more useful error output if the test fails? Like a
suggestion to read a section of the manual, or check GD versions, or something?
- You should be able to factor out the file comparison code into a common
subroutine.
Gerv
Reporter | ||
Comment 10•20 years ago
|
||
Dave: is it true that libgd 1.x goes with GD.pm 1.x, and libgd 2.x goes with
GD.pm 2.x? If so, we could also at least check for a major version number match
in checksetup.pl. That would help.
Gerv
Assignee | ||
Comment 11•20 years ago
|
||
according to reports.cgi gif is the preferred format.
my $type = $testimg->can('gif') ? "gif" : "png";
until that's changed (topic of another bug i suspect), we need to test the
generation of gifs.
> the script should not by die-ing on errors at any point
it's in an eval block, so i'm doing a throw/catch exception.
hrm, i can't see any way to check the version of libgd that gd.pm is loading.
Reporter | ||
Comment 12•20 years ago
|
||
Byron: reports.cgi is going away as soon as possible. You might say "well, we'll
have a test until it goes", but we definitely don't need to test GIF generation
from GD::Image (new charts), only Chart::Lines (old charts).
If you can't test the libgd version number via GD.pm, a second-best is executing
libgd-config --version, and hoping it's the version GD.pm is loading. On
Windows, I understand that they ship together, so I suspect there's no chance of
a mismatch.
Gerv
Comment 13•20 years ago
|
||
(In reply to comment #10)
> Dave: is it true that libgd 1.x goes with GD.pm 1.x, and libgd 2.x goes with
> GD.pm 2.x? If so, we could also at least check for a major version number match
> in checksetup.pl. That would help.
Yes, that's correct. I've also seen reports that libgd 1.x didn't have a
libgd-config, that it was new in 2.x, but I haven't confirmed that.
Comment 14•20 years ago
|
||
*** Bug 284666 has been marked as a duplicate of this bug. ***
Comment 15•20 years ago
|
||
*** Bug 276832 has been marked as a duplicate of this bug. ***
Comment 16•20 years ago
|
||
*** Bug 257497 has been marked as a duplicate of this bug. ***
Reporter | ||
Comment 17•20 years ago
|
||
byron: are you able to make the markups to this patch? I do like it :-)
Gerv
Assignee | ||
Comment 18•20 years ago
|
||
gerv, yes, it's still on my radar.
Attachment #169982 -
Attachment is obsolete: true
Assignee | ||
Comment 19•20 years ago
|
||
Attachment #169980 -
Attachment is obsolete: true
Attachment #177105 -
Flags: review?(gerv)
Reporter | ||
Comment 20•20 years ago
|
||
Comment on attachment 177105 [details] [diff] [review]
v2
r=gerv, except remove the TEST-INFO line - it breaks scanning down to make sure
everything is "OK".
Gerv
Attachment #177105 -
Flags: review?(gerv) → review+
Reporter | ||
Updated•20 years ago
|
Flags: approval?
Updated•20 years ago
|
Flags: approval? → approval+
Reporter | ||
Comment 21•20 years ago
|
||
Checked in patch (with review markup), for reference.
Gerv
Reporter | ||
Updated•20 years ago
|
Attachment #177105 -
Attachment is obsolete: true
Reporter | ||
Comment 22•20 years ago
|
||
Fixed.
Checking in testserver.pl;
/cvsroot/mozilla/webtools/bugzilla/testserver.pl,v <-- testserver.pl
new revision: 1.5; previous revision: 1.4
done
RCS file: /cvsroot/mozilla/webtools/bugzilla/t/testchart.gif,v
done
Checking in t/testchart.gif;
/cvsroot/mozilla/webtools/bugzilla/t/testchart.gif,v <-- testchart.gif
initial revision: 1.1
done
RCS file: /cvsroot/mozilla/webtools/bugzilla/t/testchart.png,v
done
Checking in t/testchart.png;
/cvsroot/mozilla/webtools/bugzilla/t/testchart.png,v <-- testchart.png
initial revision: 1.1
done
RCS file: /cvsroot/mozilla/webtools/bugzilla/t/testgd.png,v
done
Checking in t/testgd.png;
/cvsroot/mozilla/webtools/bugzilla/t/testgd.png,v <-- testgd.png
initial revision: 1.1
done
Gerv
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
![]() |
||
Updated•20 years ago
|
Target Milestone: --- → Bugzilla 2.20
Updated•20 years ago
|
Flags: documentation?
Updated•13 years ago
|
QA Contact: matty_is_a_geek → default-qa
You need to log in
before you can comment on or make changes to this bug.
Description
•