From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 46125 invoked by alias); 4 May 2016 18:04:27 -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 46115 invoked by uid 89); 4 May 2016 18:04:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_PASS autolearn=ham version=3.3.2 spammy=160504, morning X-HELO: usplmg20.ericsson.net Received: from usplmg20.ericsson.net (HELO usplmg20.ericsson.net) (198.24.6.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 04 May 2016 18:04:16 +0000 Received: from EUSAAHC003.ericsson.se (Unknown_Domain [147.117.188.81]) by usplmg20.ericsson.net (Symantec Mail Security) with SMTP id FB.39.09012.B023A275; Wed, 4 May 2016 19:31:56 +0200 (CEST) Received: from [142.133.110.144] (147.117.188.8) by smtp-am.internal.ericsson.com (147.117.188.83) with Microsoft SMTP Server id 14.3.248.2; Wed, 4 May 2016 14:04:13 -0400 Subject: Re: [PATCH] Add mi-threads-interrupt.exp test (PR 20039) To: Pedro Alves , References: <1462305612-16493-1-git-send-email-simon.marchi@ericsson.com> <5983d4d2-016a-8020-c109-cb7ea2cfd179@redhat.com> From: Simon Marchi Message-ID: <572A399C.60902@ericsson.com> Date: Wed, 04 May 2016 18:04:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2016-05/txt/msg00062.txt.bz2 On 16-05-04 05:20 AM, Pedro Alves wrote: > On 05/03/2016 10:57 PM, Pedro Alves wrote: >> AFAICS, the test relies on "set mi-async off". Could you make sure that >> if you run it against a board file that forces that on, the test either >> passes (probably with -exec-interrupt in async mode) or is skipped? >> See mi_detect_async and the async global. > > Woke up this morning realizing that I hadn't done this for so long > myself that I had forgotten how I used to do it. We don't really > need a board file -- as described in the TestingGDB wiki page [1], > we can use GDBFLAGS from the command line for this: > > $ make check RUNTESTFLAGS="GDBFLAGS='-ex set\ mi-async\ on'" TESTS="gdb.mi/mi-threads-interrupt.exp" > ... > FAIL: gdb.mi/mi-threads-interrupt.exp: interrupt #1 (unknown output after running) > FAIL: gdb.mi/mi-threads-interrupt.exp: continue #2 > > [1] https://sourceware.org/gdb/wiki/TestingGDB > > Thanks, > Pedro Alves > Why would it make sense to set async on in a board file? My understanding is that the board file defines the debug target side of things, but the fact that MI is sync or async (or that we use MI at all) is not decided by the debug target. I would think that it's up to the tests to set async however they want it, depending on what they test. In this particular case, wouldn't it be better to run both the test in sync and async modes, as we do often for non-stop? So, for example: proc test_continue_interrupt { async } { with_test_prefix "async=$async" { ... } } foreach async {on off} { test_continue_interrupt $async } It hacked the test quickly, and it shouldn't be too hard to do. Thanks, Simon