This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] Merge mi-cli.exp and mi2-cli.exp
- From: Stan Shebs <stanshebs at earthlink dot net>
- To: gdb-patches at sourceware dot org
- Date: Tue, 04 Sep 2012 17:29:14 -0700
- Subject: Re: [RFC] Merge mi-cli.exp and mi2-cli.exp
- References: <1346419770-5718-1-git-send-email-yao@codesourcery.com> <k21s1o$aps$1@ger.gmane.org>
On 9/3/12 2:08 AM, Vladimir Prus wrote:
On 31.08.2012 17:29, Yao Qi wrote:
Unless I miss something, the intention of copying tests here is to test
both '-i=mi' and '-i=mi2' respectively. However, this duplicates the
code,
and increase the effort to maintain, IMO.
Yep, that was the intent -- with the extra twist that tests for MI and
MI2 are not necessary
identical. In other words, MI2 tests are tests for MI2 when MI2 was
declared "done", and the
idea was that the output with "-i=mi2" would remain the same for
years. -i=mi is our current
version of MI, which may evolve, and when MI3 is declared "done", the
current tests will
be copied to mi3-* tests to keep backward compatibility in future.
I am not quite sure how relevant this plan is these days.
That plan has pretty much fallen by the wayside. We should probably
declare the current MI behavior as the "done" form of MI3, and disallow
any incompatible changes. If someone wants to get ambitious, they are
free to specify and implement MI4. :-)
On the original question, I tend to agree with leaving the test files
separate. Shared code risks being unable to detect when the MI code is
broken for one of the MI versions, but not the other; this is a rare
case where we want the tests to be a little more brittle than usual.
Stan
stan@codesourcery.com