From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29777 invoked by alias); 19 Mar 2008 21:12:33 -0000 Received: (qmail 29765 invoked by uid 22791); 19 Mar 2008 21:12:33 -0000 X-Spam-Check-By: sourceware.org Received: from mtagate5.de.ibm.com (HELO mtagate5.de.ibm.com) (195.212.29.154) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 19 Mar 2008 21:12:11 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate5.de.ibm.com (8.13.8/8.13.8) with ESMTP id m2JLC6QA365498 for ; Wed, 19 Mar 2008 21:12:06 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v8.7) with ESMTP id m2JLC61S1990854 for ; Wed, 19 Mar 2008 22:12:06 +0100 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m2JLC6Dv023154 for ; Wed, 19 Mar 2008 22:12:06 +0100 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with SMTP id m2JLC5AG023151; Wed, 19 Mar 2008 22:12:06 +0100 Message-Id: <200803192112.m2JLC5AG023151@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Wed, 19 Mar 2008 22:12:05 +0100 Subject: Re: [rfc] Fix info spu mailbox command To: deuling@de.ibm.com (Markus Deuling) Date: Wed, 19 Mar 2008 21:12:00 -0000 From: "Ulrich Weigand" Cc: brobecker@adacore.com (Joel Brobecker), gdb-patches@sourceware.org (GDB Patches), drow@false.org (Daniel Jacobowitz) In-Reply-To: <47E16070.1080600@de.ibm.com> from "Markus Deuling" at Mar 19, 2008 07:50:24 PM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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: 2008-03/txt/msg00290.txt.bz2 Markus Deuling wrote: > Joel Brobecker schrieb: > > After having looked at your previous patch, it looks like you probably > > wanted to only xfail the test when the 0x number (mailbox number?) is > > 0xc0000000, but anything else is an unexpected FAIL. Also, I don't think > > you need the "default" block. So I think your test should look like this: > > > > gdb_test_multiple "info spu mailbox" "$msg" { > > -re "SPU Outbound Mailbox.*0x00000000.*SPU Outbound Interrupt Mailbox.*0x00000000.*$gdb_prompt $" { > > pass "$msg" > > } > > -re "SPU Outbound Mailbox.*0xc0000000.*SPU Outbound Interrupt Mailbox.*0xc0000000.*$gdb_prompt $" { > > xfail "$msg" > > } > > } > > > > Hm, yes and no. Maybe it was not a good idea from me to check for 0xc.... Before that kernel patch > the data came from an uninitialised variable so it might have been 0xc... accidently. > I haven't seen cases != 0xc but this does not mean that this can't happen. > > Only thing I can say for sure is that 0x00000000 should be the initial content. Everything else is > XFAIL because of old kernel version. I guess the best would be something like: gdb_test_multiple "info spu mailbox" "$msg" { -re "SPU Outbound Mailbox.*0x00000000.*SPU Outbound Interrupt Mailbox.*0x00000000.*$gdb_prompt $" { pass "$msg" } # Older kernels had a bug that caused them to return arbitrary values when # attempting to read from an empty mailbox via spufs. -re "SPU Outbound Mailbox.*0x.*SPU Outbound Interrupt Mailbox.*0x.*$gdb_prompt $" { xfail "$msg" } } This does verify that GDB works as expected and prints the proper message, but at the same time does not verify the actual mailbox contents -- acknowledging that buggy kernels may in fact return arbitrary values here. Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com