From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22955 invoked by alias); 13 Aug 2015 15:49:17 -0000 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 Received: (qmail 22943 invoked by uid 89); 13 Aug 2015 15:49:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: e06smtp13.uk.ibm.com Received: from e06smtp13.uk.ibm.com (HELO e06smtp13.uk.ibm.com) (195.75.94.109) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Thu, 13 Aug 2015 15:49:15 +0000 Received: from /spool/local by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 13 Aug 2015 16:49:10 +0100 Received: from d06dlp01.portsmouth.uk.ibm.com (9.149.20.13) by e06smtp13.uk.ibm.com (192.168.101.143) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 13 Aug 2015 16:49:05 +0100 X-MailFrom: arnez@linux.vnet.ibm.com X-RcptTo: gdb-patches@sourceware.org Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id 51F0D17D8067 for ; Thu, 13 Aug 2015 16:50:38 +0100 (BST) Received: from d06av12.portsmouth.uk.ibm.com (d06av12.portsmouth.uk.ibm.com [9.149.37.247]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t7DFn5iu32702712 for ; Thu, 13 Aug 2015 15:49:05 GMT Received: from d06av12.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av12.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t7DFn3ON010558 for ; Thu, 13 Aug 2015 09:49:04 -0600 Received: from br87z6lw.de.ibm.com (dyn-9-152-212-192.boeblingen.de.ibm.com [9.152.212.192]) by d06av12.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id t7DFn1Et010496 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA256 bits=256 verify=NO); Thu, 13 Aug 2015 09:49:02 -0600 From: Andreas Arnez To: Pedro Alves Cc: gdb-patches@sourceware.org, Ulrich Weigand , Yao Qi Subject: Re: [PING][PATCH] gnu_vector.exp: Avoid some more known FAILs References: <878u9hwxa1.fsf@br87z6lw.de.ibm.com> <55CB2870.5050903@redhat.com> Date: Thu, 13 Aug 2015 15:49:00 -0000 In-Reply-To: <55CB2870.5050903@redhat.com> (Pedro Alves's message of "Wed, 12 Aug 2015 12:05:20 +0100") Message-ID: <87r3n76vf6.fsf@br87z6lw.de.ibm.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15081315-0013-0000-0000-000005039BB8 X-IsSubscribed: yes X-SW-Source: 2015-08/txt/msg00359.txt.bz2 On Wed, Aug 12 2015, Pedro Alves wrote: > On 08/11/2015 06:27 PM, Andreas Arnez wrote: >> +gdb_test_multiple "return (int4) \{4, 2, 7, 6\}" $test { >> + -re "#0 .* main .*$gdb_prompt $" { >> + if { $ok } { >> + pass $test >> + gdb_test "continue" "4 2 7 6\r\n.*" "verify vector return value" >> + } >> + } >> + -re "The location .* is unknown.\r\n.* return value .* will be ignored.\r\n" { >> + kfail "gdb/8549" $test >> + set ok 0 >> + exp_continue >> + } >> + -re "Make add_some_intvecs return now. .y or n. $" { >> + send_gdb "y\n" >> + exp_continue >> + } >> +} > > If this fails without matching the first pattern above, then we can > end up with a duplicate test message (kfail + fail). That's true. Thanks for pointing out. > Maybe do something like this instead: > > set test "set vector return value" > set should_kfail 0 > set finished 0 > gdb_test_multiple "return (int4) \{4, 2, 7, 6\}" $test { > -re "#0 .* main .*$gdb_prompt $" { > set finished 1 > } > -re "The location .* is unknown.\r\n.* return value .* will be ignored.\r\n" { > set should_kfail 1 > exp_continue > } > -re "Make add_some_intvecs return now. .y or n. $" { > send_gdb "y\n" > exp_continue > } > } > if { $finished } { > if { $should_kfail } { > kfail "gdb/8549" $test > } else { > pass $test > gdb_test "continue" "4 2 7 6\r\n.*" "verify vector return value" > } > } Right, that would be an option. After thinking about this a bit I slightly prefer to go even one step further, like in the approach below. In my view, it more clearly separates the steps and is more easily extensible at the end. But maybe I've been thinking about this too much already ;-) OK with this change? set test "return from vector-valued function" set should_kfail 0 gdb_test_multiple "return (int4) \{4, 2, 7, 6\}" $test { -re "#0 .* main .*$gdb_prompt $" { pass $test } -re "The location .* is unknown.\r\n.* return value .* will be ignored.\r\n" { set should_kfail 1 exp_continue } -re "Make add_some_intvecs return now. .y or n. $" { send_gdb "y\n" exp_continue } } set test "verify vector return value" gdb_test_multiple "continue" $test { -re "4 2 7 6\r\n.*$gdb_prompt $" { pass $test } -re "10 20 48 72\r\n.*$gdb_prompt $" { if { $should_kfail } { kfail "gdb/8549" $test } else { fail $test } } }