From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id DF16C3847802 for ; Wed, 14 Jul 2021 16:11:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DF16C3847802 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 16EGB8As004900 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 14 Jul 2021 12:11:13 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 16EGB8As004900 Received: from [10.0.0.11] (192-222-157-6.qc.cable.ebox.net [192.222.157.6]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id D626D1E01B; Wed, 14 Jul 2021 12:11:07 -0400 (EDT) Subject: Re: [PATCH 03/11] gdb: make inferior_list use intrusive_list To: Tom de Vries , Pedro Alves , gdb-patches@sourceware.org Cc: Simon Marchi References: <20210622165704.2404007-1-simon.marchi@polymtl.ca> <20210622165704.2404007-4-simon.marchi@polymtl.ca> <41c21f12-6343-e957-0769-4f3bc5b29433@palves.net> <4bfa12c2-38ec-4424-689d-6476a20e7fe6@suse.de> From: Simon Marchi Message-ID: <61f3cd99-8b32-e14a-117e-52aa4c7e6343@polymtl.ca> Date: Wed, 14 Jul 2021 12:11:07 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <4bfa12c2-38ec-4424-689d-6476a20e7fe6@suse.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Wed, 14 Jul 2021 16:11:08 +0000 X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Wed, 14 Jul 2021 16:11:20 -0000 On 2021-07-14 2:34 a.m., Tom de Vries wrote: > On 7/5/21 5:44 PM, Pedro Alves wrote: >> On 2021-06-22 5:56 p.m., Simon Marchi wrote: >>> From: Pedro Alves >>> >>> Change inferior_list, the global list of inferiors, to use >>> intrusive_list. I think most other changes are somewhat obvious >>> fallouts from this change. >>> >>> There is a small change in behavior in scoped_mock_context. Before this >>> patch, constructing a scoped_mock_context would replace the whole >>> inferior list with only the new mock inferior. Tests using two >>> scoped_mock_contexts therefore needed to manually link the two inferiors >>> together, as the second scoped_mock_context would bump the first mock >>> inferior from the thread list. With this patch, a scoped_mock_context >>> adds its mock inferior to the inferior list on construction, and removes >>> it on destruction. This means that tests run with mock inferiors in the >>> inferior list in addition to any pre-existing inferiors (there is always >>> at least one). There is no possible pid clash problem, since each >>> scoped mock inferior uses its own process target, and pids are per >>> process target. >> > > Starting this commit, I see this FAIL: > ... > (gdb) PASS: gdb.threads/fork-plus-threads.exp: detach-on-fork=off: no > threads left > info inferiors > Num Description Connection Executable > * 1 > /home/vries/gdb_versions/devel/build/gdb/testsuite/outputs/gdb.threads/fork-plus-threads/fork-plus-threads > > 2 > /home/vries/gdb_versions/devel/build/gdb/testsuite/outputs/gdb.threads/fork-plus-threads/fork-plus-threads > > 3 > /home/vries/gdb_versions/devel/build/gdb/testsuite/outputs/gdb.threads/fork-plus-threads/fork-plus-threads > > 4 > /home/vries/gdb_versions/devel/build/gdb/testsuite/outputs/gdb.threads/fork-plus-threads/fork-plus-threads > > 5 > /home/vries/gdb_versions/devel/build/gdb/testsuite/outputs/gdb.threads/fork-plus-threads/fork-plus-threads > > 6 > /home/vries/gdb_versions/devel/build/gdb/testsuite/outputs/gdb.threads/fork-plus-threads/fork-plus-threads > > 7 > /home/vries/gdb_versions/devel/build/gdb/testsuite/outputs/gdb.threads/fork-plus-threads/fork-plus-threads > > 8 > /home/vries/gdb_versions/devel/build/gdb/testsuite/outputs/gdb.threads/fork-plus-threads/fork-plus-threads > > 9 > /home/vries/gdb_versions/devel/build/gdb/testsuite/outputs/gdb.threads/fork-plus-threads/fork-plus-threads > > 10 > /home/vries/gdb_versions/devel/build/gdb/testsuite/outputs/gdb.threads/fork-plus-threads/fork-plus-threads > > 11 > /home/vries/gdb_versions/devel/build/gdb/testsuite/outputs/gdb.threads/fork-plus-threads/fork-plus-threads > > (gdb) FAIL: gdb.threads/fork-plus-threads.exp: detach-on-fork=off: only > inferior 1 left > ... > > The test fails because it expects only inferior 1. > > Is this a regression? I see this regression. I might have dismissed those failures thinking that they were part of the tests that are always racy, not sure. But I see it failing consistently starting with this patch. Simon