From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id wtyXB91WnGZaAy0AWB0awg (envelope-from ) for ; Sat, 20 Jul 2024 20:31:25 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=g3Xm7G4C; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 10AED1E0C3; Sat, 20 Jul 2024 20:31:25 -0400 (EDT) Received: from server2.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 ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id EC51F1E030 for ; Sat, 20 Jul 2024 20:31:22 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4F3333860744 for ; Sun, 21 Jul 2024 00:31:22 +0000 (GMT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 37994385DC32 for ; Sun, 21 Jul 2024 00:31:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 37994385DC32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 37994385DC32 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1721521863; cv=none; b=eqe7Q/n3y0Tc6QKXVX6T6iRI2hdZh2WI9s/jdqZtwH3WwBLpsGPl8pt8Lbr+zFidCwjX/JmDGGHaTqFFbqsglgYCBU6HlMR1cd8QipTL5LYs3XpLpuuDjTCav8xbZL3mxVLea8zWA6OheXWc5wZ7luv3EoHBpavR8SYbEpm33FM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1721521863; c=relaxed/simple; bh=FACfWu2NqX90gkAw4knzsA452clVToVJPa0R9uoEyyk=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=OPYuj9J72zuoMoCPMHtIWlgPw0AGiO0dNXkUYQaOJg+qpppyGX6ZWHkFFyWDDVCWL4fcFqXtlkMzGWzPj8VhqgWCSmeRjFfovNZh04/v8OrmT/fpL2eIAO2N03Bn8BZofKhXy/QzGwBHbZpl8xyOT10HKaSXzY1ZzZzk8BIPFEI= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1721521860; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tn++y95wx8DwUi769JLCtQU/LNv1wSGNAB7uCg1txGY=; b=g3Xm7G4C/QqpXkue30TE5Dmn0MAuSQrv00sLTLFh1Z4WICPrXFrtdkiCxuIwy7cnAKBYJL veIHaMynA4oB5aOAhgThqBKyNBe3nEvc2UBzKvPHLbvcfD29jn5agCWMeAIKTNYPTvI+BC F21Ii2nt+sGDUfHogszHOaK7FOGVxTY= Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-637-Jxzh-BvUMumW5aeX_my4Ig-1; Sat, 20 Jul 2024 20:30:57 -0400 X-MC-Unique: Jxzh-BvUMumW5aeX_my4Ig-1 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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 mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id C60CA1955D47; Sun, 21 Jul 2024 00:30:56 +0000 (UTC) Received: from f40-zbm-amd (unknown [10.22.66.70]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 770DD3000188; Sun, 21 Jul 2024 00:30:55 +0000 (UTC) Date: Sat, 20 Jul 2024 17:30:49 -0700 From: Kevin Buettner To: Tom de Vries Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] [gdb/testsuite] Fix scopes check in gdb.dap/rust-slices.exp Message-ID: <20240720173049.7503e57d@f40-zbm-amd> In-Reply-To: <20240718124132.23642-1-tdevries@suse.de> References: <20240718124132.23642-1-tdevries@suse.de> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP 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.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org On Thu, 18 Jul 2024 14:41:32 +0200 Tom de Vries wrote: > When running test-case gdb.dap/rust-slices.exp on aarch64-linux > (debian 12/bookworm), I run into: > ... > {"request_seq": 6, "type": "response", "command": "scopes", "body": {"scopes": [{"variablesReference": 1, "name": "Locals", "presentationHint": "locals", "expensive": false, "namedVariables": 3, "line": 28, "source": {"name": "rust-slices.rs", "path": "/home/linux/gdb/binutils-gdb.git/gdb/testsuite/gdb.dap/rust-slices.rs"}}, {"variablesReference": 2, "name": "Registers", "presentationHint": "registers", "expensive": false, "namedVariables": 261, "line": 28, "source": {"name": "rust-slices.rs", "path": "/home/linux/gdb/binutils-gdb.git/gdb/testsuite/gdb.dap/rust-slices.rs"}}]}, "success": true, "seq": 20}PASS: gdb.dap/rust-slices.exp: get scopes success > FAIL: gdb.dap/rust-slices.exp: three scopes > PASS: gdb.dap/rust-slices.exp: scope is locals > PASS: gdb.dap/rust-slices.exp: locals presentation hint > PASS: gdb.dap/rust-slices.exp: three vars in scope > ... > > The test-case expects three scopes due to a rust compiler issue: > ... > # There are three scopes because an artificial symbol ends up in the > # DWARF. See https://github.com/rust-lang/rust/issues/125126. > gdb_assert {[llength $scopes] == 3} "three scopes" > ... > but it seems that the version used here (rustc 1.63.0, llvm 14.0.6) doesn't > have this issue. > > Fix this by allowing two or three scopes, and changing the test name to > "two scopes". > > Tested on aarch64-linux. > > PR testsuite/31983 > Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31983 LGTM. Approved-by: Kevin Buettner