This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH] Fix Gold/strip discrepancies for PR 11786
- From: Stan Shebs <stanshebs at earthlink dot net>
- To: gdb-patches at sourceware dot org
- Date: Wed, 06 Nov 2013 14:23:17 -0800
- Subject: Re: [PATCH] Fix Gold/strip discrepancies for PR 11786
- Authentication-results: sourceware.org; auth=none
- References: <yjt24n85x78h dot fsf at ruffy dot mtv dot corp dot google dot com> <20131031154957 dot GA11260 at host2 dot jankratochvil dot net> <CADPb22QKBpYpmmZzeKJy7JWukpfkTQcYZDm+KeEkr6K_92LJ2A at mail dot gmail dot com> <87li13shk2 dot fsf at fleche dot redhat dot com> <CADPb22QNaGzvagsDwgt2mAVOQw9kQxtKbnHKtnTbUMy-7xaJhw at mail dot gmail dot com> <20131105172219 dot GA21529 at host2 dot jankratochvil dot net> <CADPb22Tcg9g=pCG1q07hK6DkRnTQop7bZynqnoN+upiuDBWsZA at mail dot gmail dot com> <20131105180547 dot GA24004 at host2 dot jankratochvil dot net> <CADPb22S4ivEm=abcrxLBQwiB9yrB7CryvOBNi+rh-GdOpek5nQ at mail dot gmail dot com> <20131106212434 dot GA4193 at host2 dot jankratochvil dot net>
On 11/6/13 1:24 PM, Jan Kratochvil wrote:
> On Wed, 06 Nov 2013 22:14:27 +0100, Doug Evans wrote:
>> It will basically say tests are in general not required to following
>> the GDB coding standards,
> What is the reason for it?
> I would find more logical to say tests should follow the same rules as GDB
> code, unless there is a specific reason for it. Such as importing an existing
> external reproducer, machine generated output etc.
> If GDB coding standards are not acceptable for testcases then it looks to me
> as an indication the GDB coding standards should be changed.
The point of the testsuite is to check GDB behavior on programs in
general. We would look pretty foolish if someone were to encounter a
GDB bug that only occurred in source that did not follow the GDB
standard, and we were unable to detect it because our regression tests
did not include code written in a variety of styles.
As examples, the GNU style prefers to have braces on lines by
themselves, and to not have side-effecting code in conditionals, even
though there are millions of lines of code written that way. Without a
testsuite including these common usages, it would be easy to introduce
bugs in single-stepping and breakpoint handling that our regression
testing could not catch.