From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7332 invoked by alias); 28 Feb 2003 17:58:31 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 7325 invoked from network); 28 Feb 2003 17:58:30 -0000 Received: from unknown (HELO jackfruit.Stanford.EDU) (171.64.38.136) by 172.16.49.205 with SMTP; 28 Feb 2003 17:58:30 -0000 Received: (from carlton@localhost) by jackfruit.Stanford.EDU (8.11.6/8.11.6) id h1SHwSE15307; Fri, 28 Feb 2003 09:58:28 -0800 X-Authentication-Warning: jackfruit.Stanford.EDU: carlton set sender to carlton@math.stanford.edu using -f To: Daniel Jacobowitz Cc: gdb@sources.redhat.com Subject: Re: [rfc] xfailed tests in gdb.c++/classes.exp References: <200302280501.h1S51oS26231@duracef.shout.net> <20030228151521.GA23038@nevyn.them.org> From: David Carlton Date: Fri, 28 Feb 2003 17:58:00 -0000 In-Reply-To: <20030228151521.GA23038@nevyn.them.org> Message-ID: User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-02/txt/msg00610.txt.bz2 On Fri, 28 Feb 2003 10:15:21 -0500, Daniel Jacobowitz said: > The consensus is obviously that this output is OK. David, please do > add the new pass patterns. Done; patch below. Interestingly, it turns out that some of the 'ptype class/struct' tests in that file also contained setup_xfails that should be treated as FAIL as well as treated as PASS (accepting structs with missing protected/private protection specifiers); I deleted those setup_xfail lines, too, but left those tests as FAIL. (GDB currently passes the tests in question.) I'd also forgotten that there were XFAILs in there that I actually am seeing that weren't related to this issue: yet another instance of the nested types bug. I'll prepare a patch for that shortly. (Whoops: reading the patch below, I got class public_class slightly wrong; I'll commit another patch for that in a sec.) David Carlton carlton@math.stanford.edu 2003-02-28 David Carlton * gdb.c++/classes.exp (test_ptype_class_objects): Accept it if we print class instead of struct and/or superfluous protection specifiers, as long as the resulting output is equivalent to the source code. Delete FIXME from end of messages on tests that don't need fixing. Index: classes.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.c++/classes.exp,v retrieving revision 1.14 diff -u -p -r1.14 classes.exp --- classes.exp 13 Feb 2003 21:33:20 -0000 1.14 +++ classes.exp 28 Feb 2003 17:44:14 -0000 @@ -55,7 +55,7 @@ proc test_ptype_class_objects {} { # Note that struct members are public by default, so we don't print # "public:" for the public members of structs. - # Accept it as an expected failure if gdb just fails to distinguish between + # Accept it if gdb just fails to distinguish between # class and struct, and everything else is OK. send_gdb "ptype struct default_public_struct\n" @@ -64,8 +64,7 @@ proc test_ptype_class_objects {} { pass "ptype struct default_public_struct" } -re "type = class default_public_struct \{$nl.*int a;${ws}int b;$nl.*\}$nl$gdb_prompt $" { - setup_xfail "*-*-*" - fail "ptype struct default_public_struct" + pass "ptype struct default_public_struct" } -re ".*$gdb_prompt $" { fail "ptype struct default_public_struct" } timeout { fail "ptype struct default_public_struct (timeout)" ; return } @@ -73,7 +72,7 @@ proc test_ptype_class_objects {} { # Note that struct members are public by default, so we don't print # "public:" for the public members of structs. - # Accept it as an expected failure if gdb just fails to distinguish between + # Accept it if gdb just fails to distinguish between # class and struct, and everything else is OK. send_gdb "ptype struct explicit_public_struct\n" @@ -82,75 +81,70 @@ proc test_ptype_class_objects {} { pass "ptype struct explicit_public_struct" } -re "type = class explicit_public_struct \{$nl.*int a;${ws}int b;$nl.*\}$nl$gdb_prompt $" { - setup_xfail "*-*-*" - fail "ptype struct explicit_public_struct" + pass "ptype struct explicit_public_struct" } -re ".*$gdb_prompt $" { fail "ptype struct explicit_public_struct" } timeout { fail "ptype struct explicit_public_struct (timeout)" ; return } } - # Accept it as an expected failure if gdb just fails to distinguish between + # Accept it if gdb just fails to distinguish between # class and struct, and everything else is OK. send_gdb "ptype struct protected_struct\n" gdb_expect { -re "type = struct protected_struct \{${ws}protected:${ws}int a;${ws}int b;$nl\}$nl$gdb_prompt $" { - pass "ptype struct protected_struct (FIXME)" + pass "ptype struct protected_struct" } -re "type = class protected_struct \{${ws}protected:${ws}int a;${ws}int b;$nl.*\}$nl$gdb_prompt $" { - setup_xfail "*-*-*" - fail "ptype struct protected_struct (FIXME)" + pass "ptype struct protected_struct" } -re ".*$gdb_prompt $" { fail "ptype struct protected_struct" } timeout { fail "ptype struct protected_struct (timeout)" ; return } } - # Accept it as an expected failure if gdb just fails to distinguish between + # Accept it if gdb just fails to distinguish between # class and struct, and everything else is OK. send_gdb "ptype struct private_struct\n" gdb_expect { -re "type = struct private_struct \{${ws}private:${ws}int a;${ws}int b;$nl\}$nl$gdb_prompt $" { - pass "ptype struct private_struct (FIXME)" + pass "ptype struct private_struct" } -re "type = class private_struct \{${ws}private:${ws}int a;${ws}int b;$nl.*\}$nl$gdb_prompt $" { - setup_xfail "*-*-*" - fail "ptype struct private_struct (FIXME)" + pass "ptype struct private_struct" } -re ".*$gdb_prompt $" { fail "ptype struct private_struct" } timeout { fail "ptype struct private_struct (timeout)" ; return } } - # Accept it as an expected failure if gdb just fails to distinguish between + # Accept it if gdb just fails to distinguish between # class and struct, and everything else is OK. send_gdb "ptype struct mixed_protection_struct\n" gdb_expect { -re "type = struct mixed_protection_struct \{${ws}int a;${ws}int b;${ws}private:${ws}int c;${ws}int d;${ws}protected:${ws}int e;${ws}int f;${ws}public:${ws}int g;${ws}private:${ws}int h;${ws}protected:${ws}int i;$nl\}$nl$gdb_prompt $" { - pass "ptype struct mixed_protection_struct (FIXME)" + pass "ptype struct mixed_protection_struct" } -re "type = struct mixed_protection_struct \{${ws}public:${ws}int a;${ws}int b;${ws}private:${ws}int c;${ws}int d;${ws}protected:${ws}int e;${ws}int f;${ws}public:${ws}int g;${ws}private:${ws}int h;${ws}protected:${ws}int i;$nl.*\}$nl$gdb_prompt $" { pass "ptype struct mixed_protection_struct (extra public)" } -re "type = class mixed_protection_struct \{${ws}public:${ws}int a;${ws}int b;${ws}private:${ws}int c;${ws}int d;${ws}protected:${ws}int e;${ws}int f;${ws}public:${ws}int g;${ws}private:${ws}int h;${ws}protected:${ws}int i;$nl.*\}$nl$gdb_prompt $" { - setup_xfail "*-*-*" - fail "ptype struct mixed_protection_struct (FIXME)" + pass "ptype struct mixed_protection_struct" } -re ".*$gdb_prompt $" { fail "ptype struct mixed_protection_struct" } timeout { fail "ptype struct mixed_protection_struct (timeout)" ; return } } - # Accept it as an expected failure if gdb just fails to distinguish between + # Accept it if gdb just fails to distinguish between # class and struct, and everything else is OK. send_gdb "ptype class public_class\n" gdb_expect { -re "type = class public_class \{${ws}public:${ws}int a;${ws}int b;$nl.*\}$nl$gdb_prompt $" { - pass "ptype class public_class (FIXME)" + pass "ptype class public_class" } -re "type = struct public_class \{${ws}int a;${ws}int b;$nl\}$nl$gdb_prompt $" { - setup_xfail "*-*-*" - fail "ptype class public_class (FIXME)" + fail "ptype class public_class" } -re ".*$gdb_prompt $" { fail "ptype class public_class" } timeout { fail "ptype class public_class (timeout)" ; return } @@ -162,14 +156,13 @@ proc test_ptype_class_objects {} { pass "ptype class protected_class" } -re "type = struct protected_class \{${ws}int a;${ws}int b;$nl\}$nl$gdb_prompt $" { - setup_xfail "*-*-*" fail "ptype class protected_class" } -re ".*$gdb_prompt $" { fail "ptype class protected_class" } timeout { fail "ptype class protected_class (timeout)" ; return } } - # Accept it as an expected failure if gdb just emits a superflous "private:" + # Accept it if gdb just emits a superflous "private:" # attribute, since classes default to private and for consistency with # structs (where we don't print the "public:" attribute) we don't print # the "private:" attribute. @@ -177,11 +170,10 @@ proc test_ptype_class_objects {} { send_gdb "ptype class default_private_class\n" gdb_expect { -re "type = class default_private_class \{${ws}int a;${ws}int b;$nl.*\}$nl$gdb_prompt $" { - pass "ptype class default_private_class (FIXME)" + pass "ptype class default_private_class" } -re "type = class default_private_class \{${ws}private:${ws}int a;${ws}int b;$nl.*\}$nl$gdb_prompt $" { - setup_xfail "*-*-*" - fail "ptype class default_private_class (FIXME)" + pass "ptype class default_private_class" } -re ".*$gdb_prompt $" { fail "ptype class default_private_class" } timeout { fail "ptype class default_private_class (timeout)" ; return } @@ -193,10 +185,9 @@ proc test_ptype_class_objects {} { pass "ptype class explicit_private_class" } -re "type = class explicit_private_class \{${ws}int a;${ws}int b;$nl.*\}$nl$gdb_prompt $" { - pass "ptype class explicit_private_class (OK for HP aCC)" + pass "ptype class explicit_private_class" } -re "type = struct explicit_private_class \{${ws}int a;${ws}int b;$nl.*\}$nl$gdb_prompt $" { - setup_xfail "*-*-*" fail "ptype class explicit_private_class" } -re ".*$gdb_prompt $" { fail "ptype class explicit_private_class" } @@ -209,7 +200,6 @@ proc test_ptype_class_objects {} { pass "ptype class mixed_protection_class" } -re "type = struct mixed_protection_class \{${ws}int a;${ws}int b;${ws}int c;${ws}int d;${ws}int e;${ws}int f;${ws}int g;${ws}int h;${ws}int i;$nl.*\}$nl$gdb_prompt $" { - setup_xfail "*-*-*" fail "ptype class mixed_protection_class" } -re ".*$gdb_prompt $" { fail "ptype class mixed_protection_class" }