From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by sourceware.org (Postfix) with ESMTPS id BF4B23858C56 for ; Tue, 17 May 2022 12:04:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BF4B23858C56 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f49.google.com with SMTP id a14-20020a7bc1ce000000b00393fb52a386so1262514wmj.1 for ; Tue, 17 May 2022 05:04:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=sT2ZA/FeHpuqUdvWpUyHv0VcGHi4cY9jv33jZhshWWY=; b=IQ5UGRYGu7lWxlxnU+vH84X4YOTZPc+GpJTPh62k6qu2EVor2jwTsnbMXfM2mCOwA0 if5ie9wfFHdaRrjDmEeMy3HxVnx2DH8micc43e+78q7KQNmuWDOy1iLx10T6wDBAwLyQ xznM0+Qn7Jd8ao4p/75HRT3CwDkz4JDojzByLefIr1P5zk/TgNSal95FSXm5yrsvz3T5 9ANnipUcIyJj8GtyA2e4c5to4FFvNG4YRGDvom0SHwriJfchTql3obLlp0v6oqFN7xSF vvY55nQL4mdugf9/2zF/+BDLvNMtg7uZexV0KBvgpb0zk4xCgj6hbf1Tigev2QaS7tSR bY/A== X-Gm-Message-State: AOAM533c6Q1eq/2gihJERI0U1kDP6kgBpbZFv860wbUFZieCn+B2RIMJ Go67P7fJs77t+oD9AZvkQaKJQsFLYME= X-Google-Smtp-Source: ABdhPJzQ5TRtc5Yn7YtHA4dYlek+ImBu//0dmP423fVuTKU//cXFuQCJQEr/4I9lX+Gm4ZNz3/f7qg== X-Received: by 2002:a1c:4b14:0:b0:394:2ece:c049 with SMTP id y20-20020a1c4b14000000b003942ecec049mr32450334wma.158.1652789056767; Tue, 17 May 2022 05:04:16 -0700 (PDT) Received: from ?IPV6:2001:8a0:f924:2600:209d:85e2:409e:8726? ([2001:8a0:f924:2600:209d:85e2:409e:8726]) by smtp.gmail.com with ESMTPSA id e12-20020adfa44c000000b0020c5253d8dcsm12036721wra.40.2022.05.17.05.04.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 17 May 2022 05:04:15 -0700 (PDT) Message-ID: Date: Tue, 17 May 2022 13:04:14 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH 5/5] Make gdb_test's question non-optional if specified Content-Language: en-US To: Simon Marchi , gdb-patches@sourceware.org References: <20220330192929.3161015-1-pedro@palves.net> <20220330192929.3161015-6-pedro@palves.net> From: Pedro Alves In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-11.0 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 May 2022 12:04:19 -0000 On 2022-05-17 12:41, Simon Marchi wrote: > I see this failure starting with this patch: > > $ make check TESTS="gdb.python/py-connection.exp" RUNTESTFLAGS="--target_board=native-gdbserver" > (gdb) PASS: gdb.python/py-connection.exp: info connections while the connection is still around > disconnect^M > Ending remote debugging.^M > (gdb) FAIL: gdb.python/py-connection.exp: kill the inferior > Thanks, I've pushed the patch below to fix it. >From a1f2ddd38378c8db63e75daa28b7e304c2fd774f Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Tue, 17 May 2022 12:53:32 +0100 Subject: [PATCH] Fix gdb.python/py-connection.exp with remote targets After the patch to make gdb_test's question non-optional when specified, gdb.python/py-connection.exp started failing like so: $ make check TESTS="gdb.python/py-connection.exp" RUNTESTFLAGS="--target_board=native-gdbserver" (gdb) PASS: gdb.python/py-connection.exp: info connections while the connection is still around disconnect^M Ending remote debugging.^M (gdb) FAIL: gdb.python/py-connection.exp: kill the inferior The problem is that "disconnect" when debugging with the native target asks the user whether to kill the program, while with remote targets, it doesn't. Fix it by explicitly killing before disconnecting. Tested with --target_board unix, native-gdbserver, and native-extended-gdbserver. Change-Id: Icd85015c76deb84b71894715d43853c1087eba0b --- gdb/testsuite/gdb.python/py-connection.exp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/gdb.python/py-connection.exp b/gdb/testsuite/gdb.python/py-connection.exp index c56aba33e4c..91315eb1af4 100644 --- a/gdb/testsuite/gdb.python/py-connection.exp +++ b/gdb/testsuite/gdb.python/py-connection.exp @@ -55,8 +55,8 @@ gdb_test "python print('Same object: %s' % (conn is conn2))" "True" # starts to return False. gdb_test "info connections" "\r\n\\* 1 .*" \ "info connections while the connection is still around" -gdb_test "disconnect" "" "kill the inferior" \ - "A program is being debugged already\\. Kill it\\? .*y or n. $" "y" +gdb_test "with confirm off -- kill" "" "kill inferior" +gdb_test "disconnect" gdb_test "info connections" "No connections\\." \ "info connections now all the connections have gone" gdb_test "python print(conn)" "" \ base-commit: 49a73ab9d345e1cd412a93b34a0b8c166603d80e -- 2.36.0