After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 329413 - Make sure people understand warnings are okay in testboxes
Make sure people understand warnings are okay in testboxes
Status: RESOLVED FIXED
Product: metacity
Classification: Other
Component: general
trunk
Other Linux
: Normal normal
: ---
Assigned To: Metacity maintainers list
Metacity maintainers list
Depends on:
Blocks:
 
 
Reported: 2006-02-01 02:47 UTC by Elijah Newren
Modified: 2006-02-11 04:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to add two messages to testboxes saying that warnings should be ignored (720 bytes, patch)
2006-02-10 04:38 UTC, Thomas Thurman
none Details | Review
Second try, with printfs directly before where they apply (1.49 KB, patch)
2006-02-10 17:42 UTC, Thomas Thurman
committed Details | Review

Description Elijah Newren 2006-02-01 02:47:40 UTC
Just thought I'd file this while I was thinking about it to hopefully prevent others from wasting debugging time on something that doesn't need debugging...

Running src/testboxes results in three warnings (one of which is identical to another).  This is okay, because the tests explicitly check corner cases that should not occur (thus the warnings) in order to see if the behavior is still relatively sane for such cases.  The output of testboxes should probably include "The next test intentionally causes a warning, but it can be ignored" or something like that.
Comment 1 Thomas Thurman 2006-02-10 04:38:34 UTC
Created attachment 59047 [details] [review]
Patch to add two messages to testboxes saying that warnings should be ignored

Here's a patch that makes it print those messages.

2006-02-09  Thomas Thurman <thomas thurman org uk>

        * src/testboxes.c (test_regions_okay, test_clamping_to_region):
        add messages to explain that warnings are harmless
Comment 2 Elijah Newren 2006-02-10 06:04:35 UTC
Cool, thanks.  :)

For future reference, note that patches are easier to review when the -p option to diff is also used.  (Also, as a side note, you can use cvs to create the diffs instead of making a backup copy before doing changes; just use 'cvs diff -up' after modifying files).

Anyway, the patch looks good but just to make it easier for other people trying to understand the testcases later, I'd prefer if the printfs were moved immediately above the tests that intentionally test the weird corner cases.  To do so you'll have to split the second message into two separate ones.  (If it helps, the corner case tests are the last one of each function, plus the fourth to last test of test_clamping_to_region()).  Fix that up and post the new patch here and I'll commit it.  :)
Comment 3 Thomas Thurman 2006-02-10 17:42:43 UTC
Created attachment 59089 [details] [review]
Second try, with printfs directly before where they apply

Funnily enough, I originally wrote it that way, but then moved them to the top of the functions for some reason I can't now recall.

Thanks for the tips about diff!

I was considering making a separate function to print these messages, since they're now the same line three times. In the end I didn't though: it's only one line.
Comment 4 Elijah Newren 2006-02-11 04:04:05 UTC
Committed, thanks!  Do you want the privilege of marking this bug as fixed?
Comment 5 Thomas Thurman 2006-02-11 04:21:16 UTC
I'd love to :) Do I need a special priv to do that? I'm used to bugzilla from work, but I don't see where I can set the resolution on bugzilla.gnome.
Comment 6 Elijah Newren 2006-02-11 04:27:55 UTC
You didn't have editbugs privileges.  I updated that for you, so go ahead.  :)
Comment 7 Thomas Thurman 2006-02-11 04:31:16 UTC
Oh! lovely. Okay, marking FIXED then.