From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27979 invoked by alias); 4 May 2011 17:46:51 -0000 Received: (qmail 27961 invoked by uid 22791); 4 May 2011 17:46:50 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 04 May 2011 17:46:36 +0000 Received: (qmail 21174 invoked from network); 4 May 2011 17:46:35 -0000 Received: from unknown (HELO ?192.168.1.4?) (janisjo@127.0.0.2) by mail.codesourcery.com with ESMTPA; 4 May 2011 17:46:35 -0000 Message-ID: <4DC1910A.8040603@codesourcery.com> Date: Wed, 04 May 2011 17:46:00 -0000 From: Janis Johnson User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8 MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: [RFA] bailing out of tests with multiple errors or timeouts Content-Type: multipart/mixed; boundary="------------080406060203000500000608" 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/msg00102.txt.bz2 This is a multi-part message in MIME format. --------------080406060203000500000608 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-length: 491 Several gdb tests get multiple ERRORS and/or timeouts for some multilibs of some embedded targets, with a few tests timing out a dozen times. I would like to modify these tests to look for the first expected ERROR or timeout and then bail out with an indication that the remainder of the test has been skipped. I haven't found a standard way to do this; any suggestions? I've attached a couple of examples as a starting point for discussion. Janis Johnson CodeSourcery / Mentor Graphics --------------080406060203000500000608 Content-Type: text/plain; name="gdb-20110504-2" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="gdb-20110504-2" Content-length: 1597 2011-05-04 Janis Johnson * gdb.threads/manythreads.exp: Bail out after an error that indicates the test might have further errors. * gdb.threads/staticthreads.exp: Bail out after a timeout that indicates the test might have further timeouts. Index: testsuite/gdb.threads/manythreads.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.threads/manythreads.exp,v retrieving revision 1.22 diff -u -p -r1.22 manythreads.exp --- testsuite/gdb.threads/manythreads.exp 19 Jan 2011 17:21:39 -0000 1.22 +++ testsuite/gdb.threads/manythreads.exp 4 May 2011 17:34:16 -0000 @@ -97,6 +97,11 @@ gdb_test_multiple $cmd $cmd { fail $cmd } } + eof { + fail "$cmd (Process no longer exists)" + fail "Remainder of test" + return + } } gdb_test_no_output "thread name zardoz" "give a name to the thread" Index: testsuite/gdb.threads/staticthreads.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.threads/staticthreads.exp,v retrieving revision 1.13 diff -u -p -r1.13 staticthreads.exp --- testsuite/gdb.threads/staticthreads.exp 1 Jan 2011 15:33:50 -0000 1.13 +++ testsuite/gdb.threads/staticthreads.exp 4 May 2011 17:34:16 -0000 @@ -54,6 +54,12 @@ gdb_test_multiple "continue" "$test" { -re "Program received signal .*$gdb_prompt " { kfail gdb/1328 "$test" } + timeout { + # A timeout here often indicates more timeouts later in the test. + fail "$test (timeout)" + fail "Remainder of test" + return + } } --------------080406060203000500000608--