From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id sK52E5Nnml+NfQAAWB0awg (envelope-from ) for ; Thu, 29 Oct 2020 02:56:19 -0400 Received: by simark.ca (Postfix, from userid 112) id 4250A1EFC1; Thu, 29 Oct 2020 02:56:19 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 877C71E552 for ; Thu, 29 Oct 2020 02:56:18 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B6E9D3858004; Thu, 29 Oct 2020 06:56:17 +0000 (GMT) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id C354E3858004 for ; Thu, 29 Oct 2020 06:56:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org C354E3858004 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tdevries@suse.de X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id C4550ACD8 for ; Thu, 29 Oct 2020 06:56:14 +0000 (UTC) Date: Thu, 29 Oct 2020 07:56:13 +0100 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [committed][gdb/testsuite] Fix DUPLICATEs in gdb.threads/tls.exp Message-ID: <20201029065611.GA8542@delia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) 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: , Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" Hi, With test-case gdb.threads/tls.exp, we get these: ... DUPLICATE: gdb.threads/tls.exp: selected thread: 4 DUPLICATE: gdb.threads/tls.exp: selected thread: 2 DUPLICATE: gdb.threads/tls.exp: selected thread: 3 ... Fix these using with_test_prefix. Tested on x86_64-linux. Committed to trunk. Thanks, - Tom [gdb/testsuite] Fix DUPLICATEs in gdb.threads/tls.exp gdb/testsuite/ChangeLog: 2020-10-29 Tom de Vries * gdb.threads/tls.exp: Fix DUPLICATEs. --- gdb/testsuite/gdb.threads/tls.exp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/gdb.threads/tls.exp b/gdb/testsuite/gdb.threads/tls.exp index 8147a6c132..77916e758d 100644 --- a/gdb/testsuite/gdb.threads/tls.exp +++ b/gdb/testsuite/gdb.threads/tls.exp @@ -127,7 +127,9 @@ proc check_thread_stack {number spin_threads spin_threads_level} { upvar $spin_threads tarr upvar $spin_threads_level tarrl - select_thread $number + with_test_prefix "thread stack" { + select_thread $number + } send_gdb "where\n" gdb_expect { -re ".*(\[0-9\]+)\[ \t\]+$hex in spin \\(vp=(0x\[0-9a-f\]+).*\r\n$gdb_prompt $" { @@ -257,7 +259,10 @@ set thrs_in_spin 0 foreach i [array names spin_threads] { if {$spin_threads($i) == 1} { incr thrs_in_spin - select_thread $i + + with_test_prefix "spin_threads" { + select_thread $i + } set level $spin_threads_level($i) # We expect to be in sem_wait, but if the thread has not yet # been scheduled, we might be in sem_post still. We could be at