From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id xoHGB9sS118UUgAAWB0awg (envelope-from ) for ; Mon, 14 Dec 2020 02:23:07 -0500 Received: by simark.ca (Postfix, from userid 112) id 133981F0AA; Mon, 14 Dec 2020 02:23:07 -0500 (EST) 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 5BE741E590 for ; Mon, 14 Dec 2020 02:23:06 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AB7643854801; Mon, 14 Dec 2020 07:23:05 +0000 (GMT) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id C09743854801 for ; Mon, 14 Dec 2020 07:23:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org C09743854801 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 DC91CAC10 for ; Mon, 14 Dec 2020 07:23:01 +0000 (UTC) Date: Mon, 14 Dec 2020 08:23:00 +0100 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [PATCH][gdb/testsuite] Handle no glibc debuginfo in gdb.base/solib-corrupted.exp Message-ID: <20201214072259.GA6243@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, When running test-case gdb.base/solib-corrupted.exp on SLE-11, I get: ... (gdb) PASS: gdb.base/solib-corrupted.exp: normal list p/x _r_debug->r_map->l_next = _r_debug->r_map^M '_r_debug' has unknown type; cast it to its declared type^M (gdb) FAIL: gdb.base/solib-corrupted.exp: make solibs looping ... The reason that _r_debug has unknown type is that glibc debuginfo is not installed. The test-case attempts to detect this but doesn't handle this particular error string. Fix this by adding the "unknown type" line to the regexp detecting missing glibc debuginfo. Tested on x86_64-linux. Any comments? Thanks, - Tom [gdb/testsuite] Handle no glibc debuginfo in gdb.base/solib-corrupted.exp gdb/testsuite/ChangeLog: 2020-12-14 Tom de Vries PR testsuite/26962 * gdb.base/solib-corrupted.exp: Handle "'_r_debug' has unknown type; cast it to its declared type". --- gdb/testsuite/gdb.base/solib-corrupted.exp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.base/solib-corrupted.exp b/gdb/testsuite/gdb.base/solib-corrupted.exp index 5ee943cae1..902ef9cc7a 100644 --- a/gdb/testsuite/gdb.base/solib-corrupted.exp +++ b/gdb/testsuite/gdb.base/solib-corrupted.exp @@ -64,10 +64,20 @@ if { [llength $probes] == 0 } { gdb_test "info sharedlibrary" "From * To .*" "normal list" +set no_glibc_debuginfo_re1 "No symbol \"_r_debug\" in current context\\." +set no_glibc_debuginfo_re2 \ + [concat \ + "Attempt to extract a component of a value that is not a structure" \ + " pointer\\."] +set no_glibc_debuginfo_re3 \ + "'_r_debug' has unknown type; cast it to its declared type" +set no_glibc_debuginfo_re \ + "($no_glibc_debuginfo_re1|$no_glibc_debuginfo_re2|$no_glibc_debuginfo_re3)" + # GDB checks there for matching L_PREV. set test "make solibs looping" gdb_test_multiple "p/x _r_debug->r_map->l_next = _r_debug->r_map" $test { - -re "(No symbol \"_r_debug\" in current context\\.|Attempt to extract a component of a value that is not a structure pointer\\.)\r\n$gdb_prompt $" { + -re "$no_glibc_debuginfo_re\r\n$gdb_prompt $" { # glibc debug info is not available and it is too difficult to find and # parse it from this testcase without the gdb supporting functions. xfail $test