From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14624 invoked by alias); 6 Dec 2010 15:02:31 -0000 Received: (qmail 14615 invoked by uid 22791); 6 Dec 2010 15:02:30 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from imr4.ericy.com (HELO imr4.ericy.com) (198.24.6.8) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 06 Dec 2010 15:02:25 +0000 Received: from eusaamw0712.eamcs.ericsson.se ([147.117.20.181]) by imr4.ericy.com (8.14.3/8.14.3/Debian-9.1ubuntu1) with ESMTP id oB6FVFSD007936; Mon, 6 Dec 2010 09:31:16 -0600 Received: from EUSAACMS0703.eamcs.ericsson.se ([169.254.1.63]) by eusaamw0712.eamcs.ericsson.se ([147.117.20.181]) with mapi; Mon, 6 Dec 2010 10:01:55 -0500 From: Marc Khouzam To: "'Joel Brobecker'" CC: "'Tom Tromey'" , "'gdb-patches@sourceware.org'" Date: Mon, 06 Dec 2010 15:02:00 -0000 Subject: [MI] --thread-group test (was: RE: [MI] Duplicate --thread-group flag not detected) Message-ID: References: <20101126163842.GJ2634@adacore.com> <20101202170954.GA3031@adacore.com> <20101204184638.GB3031@adacore.com> <20101206110417.GC3031@adacore.com> In-Reply-To: <20101206110417.GC3031@adacore.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-12/txt/msg00050.txt.bz2 =20 > > The problem is that there is another bug that makes the new tests > > fail, so I had to temporarily comment them out: > > http://sourceware.org/ml/gdb-patches/2010-11/msg00436.html >=20 > Let's not comment them out, but mark them KFAIL instead, if we can. Do I need a PR number to use KFAIL? I don't have one. I used XFAIL instead. Is that right? The annoying part there, is that the tests fails on a timeout, so marking them XFAIL instead of commenting them out makes the test file take 10 seconds more... > > 2010-12-05 Marc Khouzam > >=20 > > * gdb.mi/mi-general.exp: New file. >=20 > Overal, the test seems fine, but I have limited experimence with > MI testcases. >=20 > > +set testfile "basics" > > +set srcfile ${testfile}.c > > +set binfile ${objdir}/${subdir}/mi-basics >=20 > I believe we decided in the past that it was a bad idea to=20 > share the same > example program between testcases. One reason is that, if we split the > gdb.mi testcase in multiple groups to allow more parallel testing, we > might run into troubles. However, I am just saying that for=20 > your info. > It's not your problem, and I know that you have little time for this > testcase, and I already appreciate the effort you put into it. So it's > fine to leave it as is. To be honest, I don't even need a binary for this test, I can test the=20 syntax without actually starting the inferior. I did this in the patch below, but I'm not sure if this follows proper 'protocol'. Just let me know. > > + mi_gdb_test "18-break-insert --thread-group i1 bogus" \ > > + "18\\^error,msg=3D\"Function \\\\\"bogus\\\\\"=20 > not defined.\"" \ > > + "Valid --thread-group flag" >=20 > Do we want to test the MI command with a sequence number. I know that > they are allowed, but aren't they obsolete? We heavily use them in Eclipse :-) And I saw that other tests use them, so I thought it would make a 'syntax' test more complete. Thanks 2010-12-06 Marc Khouzam * gdb.mi/mi-general.exp: New file. ### Eclipse Workspace Patch 1.0 #P src Index: gdb/testsuite/gdb.mi/mi-general.exp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: gdb/testsuite/gdb.mi/mi-general.exp diff -N gdb/testsuite/gdb.mi/mi-general.exp --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gdb/testsuite/gdb.mi/mi-general.exp 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,67 @@ +# Copyright 1999, 2000, 2001, 2002, 2003, 2005, 2007, 2008, 2009, 2010 +# Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# +# test general features of Machine interface (MI) operations +# +# Verify that, the special MI flags --thread-group, --thread, --frame, +# --all, --reverse, are parsed properly. +# The goal is not to test gdb functionality, which is done by other tests, +# but the command syntax and correct output response to MI operations. +# + +load_lib mi-support.exp +set MIFLAGS "-i=3Dmi" + +gdb_exit +if [mi_gdb_start separate-inferior-tty] { + continue +} + +# No need to actually start the inferior as the tests below only verify MI= syntax. +# What we do instead is see that the parsing works, and passes the MI comm= and +# further down to GDB, which will then fail because we didn't start the in= ferior. +# We wouldn't make it that far if the MI syntax parsing failed + +proc test_thread_group_flag {} { + + # If we get to the breakpoint error, it means the -thread-group was pa= rsed properly=20=20=20=20 + mi_gdb_test "18-break-insert --thread-group i1 bogus" \ + "18\\^error,msg=3D\"No symbol table is loaded. Use the \\\\\= "file\\\\\" command.\"" \ + "Valid --thread-group flag" + + # Invalid threadGroupId but it starts with an 'i'. This is a differen= t code path + # than an invalid threadGroupId that does not start with an 'i'. See = below test. + mi_gdb_test "21-break-insert --thread-group iX main" \ + "21\\^error,msg=3D\"Invalid thread group for the --thread-gro= up option\"" \ + "Invalid --thread-group flag which starts with an i" + + setup_xfail *-*-* + mi_gdb_test "25-break-insert --thread-group XYZ main" \ + "25\\^error,msg=3D\"Invalid thread group id\"" \ + "Invalid --thread-group flag which does not start with an i" + + setup_xfail *-*-* + mi_gdb_test "36-break-insert --thread-group i1 --thread-group i2 main"= \ + "36\\^error,msg=3D\"Duplicate '--thread-group' option\n\"" \ + "Duplicate --thread-group flag" +} + + +test_thread_group_flag + +mi_gdb_exit +return 0