From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18019 invoked by alias); 1 May 2011 09:17:12 -0000 Received: (qmail 18009 invoked by uid 22791); 1 May 2011 09:17:11 -0000 X-SWARE-Spam-Status: No, hits=-6.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 01 May 2011 09:16:55 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p419Gajh013609 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 1 May 2011 05:16:36 -0400 Received: from host1.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p419GXh7031983 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 1 May 2011 05:16:35 -0400 Received: from host1.jankratochvil.net (localhost [127.0.0.1]) by host1.jankratochvil.net (8.14.4/8.14.4) with ESMTP id p419GXgh005589; Sun, 1 May 2011 11:16:33 +0200 Received: (from jkratoch@localhost) by host1.jankratochvil.net (8.14.4/8.14.4/Submit) id p419GVS2005587; Sun, 1 May 2011 11:16:31 +0200 Date: Sun, 01 May 2011 09:17:00 -0000 From: Jan Kratochvil To: Pedro Alves Cc: gdb-patches@sourceware.org, Marek Polacek , Joel Brobecker Subject: Re: [RFC] Fixing gdb.base/completion.exp (PR testsuite/12649) Message-ID: <20110501091630.GA16372@host1.jankratochvil.net> References: <4DB82F26.30801@redhat.com> <4DB85510.90808@redhat.com> <201104281519.21615.pedro@codesourcery.com> <201104281614.31962.pedro@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201104281614.31962.pedro@codesourcery.com> User-Agent: Mutt/1.5.21 (2010-09-15) 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: 2011-05/txt/msg00001.txt.bz2 On Thu, 28 Apr 2011 17:14:31 +0200, Pedro Alves wrote: > set oldtimeout1 $timeout > -set timeout 30 > +set timeout 10 10 is too low for parallel runs where machine can be in 20+ load. I do not see this test needs to excercise $timeout, I would even remove this whole override. > @@ -114,7 +113,6 @@ gdb_expect { > #exp_internal 0 > > send_gdb "show output\t" > -sleep 1 > gdb_expect { > -re "^show output-radix $"\ > { send_gdb "\n" ### gdb_expect { ### -re "Default output radix for printing of values is 10\\..*$gdb_prompt $"\ ### { pass "complete 'show output'"} ### -re ".*$gdb_prompt $" { fail "complete 'show output'"} > @@ -125,16 +123,6 @@ gdb_expect { > timeout {fail "(timeout) complete 'show output'"} > } > } > - -re "^show output$"\ > - { send_gdb "\n" > - gdb_expect { > - -re "Default output radix for printing of values is 10\\..*$gdb_prompt $"\ > - { fail "complete 'show output'"} > - -re ".*$gdb_prompt $" { fail "complete 'show output'"} > - timeout { fail "(timeout) complete 'show output'"} > - } > - > - } > > -re ".*$gdb_prompt $" { fail "complete 'show output'" } > timeout { fail "(timeout) complete 'show output'" } The problem with this proposed intermediate step is that it in fact brings a testsuite regression. Original "sleep 1" was there to ensure all the output has been caught. This was racy but in most cases it worked. Now it will false PASS with regressing GDB where the current FSF GDB HEAD testcase would correctly FAIL. If GDB outputs "show output-radix " first and after 0.5sec it yet outputs "foobar" the original testcase correctly FAILed while the current testcase will falsely PASS. The "complete" command appraoch does introduce this new kind of race. But the patch can be commited in two parts if it is preferred although reviewing these racy send_gdb-gdb_expect cases for the intermediate step is tricky and it gets dropped immediately afterwards. > @@ -410,7 +365,7 @@ gdb_expect { > timeout {fail "(timeout) complete 'p \"break1.'"} > } > } > - -re "^p \"break1\\..*$" > + -re "^p \"break1\\...*$" > { send_gdb "\n" > gdb_expect { > -re ".*$gdb_prompt $" { fail "complete 'p \"break1.'"} I do not see this change as valid/relevant. Thanks, Jan