From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id KZxbIepsM2ba6gIAWB0awg (envelope-from ) for ; Thu, 02 May 2024 06:37:30 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=rniUUe9B; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=gcrYoxSr; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=rniUUe9B; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=gcrYoxSr; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 6C60B1E0C1; Thu, 2 May 2024 06:37:30 -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 BB9BF1E030 for ; Thu, 2 May 2024 06:37:27 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B93383858416 for ; Thu, 2 May 2024 10:37:26 +0000 (GMT) Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2a07:de40:b251:101:10:150:64:2]) by sourceware.org (Postfix) with ESMTPS id C13423858D34 for ; Thu, 2 May 2024 10:37:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C13423858D34 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C13423858D34 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a07:de40:b251:101:10:150:64:2 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714646228; cv=none; b=wZ1FOGB9dw8J9Idlw+qp81caKX68YOgte5EkP8ApJj7Q67M4RSYSI/M11U0943a1gC0HFxxDgg7i6zc0XxSRBMFRMvmsvBk/VRLxMP/7BJehLZQcxnA4tO305ucJcVACdX1Io9Lw9W+r/sa6xqFR8KEwraTxuqspANNg+pYF3B4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714646228; c=relaxed/simple; bh=x/cTdIkJKL7e38pCWivDxaP8Qgdo4icDgChHNKri1zI=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature: Message-ID:Date:MIME-Version:Subject:To:From; b=NMQC8BJxpeogpNSUaLlCiuWPAfPCaY/3tkXwUf9IqU7047C2cib/QV9+dza01Twa+7VJ245BCy9amC1QrizBqfrORJ6cUe4/7gqpP01ub2gMCLEA9rThqAz4DqQXX3eFwZU1ZhbB6mUUHhcp27YiISilhCYczhdTsIpsN4kRTyU= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 7D9D61FB8D; Thu, 2 May 2024 10:37:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1714646221; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/INJ9xHVZw6LlhtCR6kYcAQhFV4G6J5L4aAzOIZSWGY=; b=rniUUe9B74R0MJVqHjhkMwX3YHbDQ5NOw7LVHtJ4raoxoxHQAyKW8iTPuSkjvhETyWKbAT 3xqjTnEFP9VO75YYUTkSfcGqR16iz/+DnwyZFssQmzfZD6gwhx5VPHK6P2eEcTyUGLIHac 0VUyEWXLiiG+2iQ0FdSLXqv14P9FHi4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1714646221; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/INJ9xHVZw6LlhtCR6kYcAQhFV4G6J5L4aAzOIZSWGY=; b=gcrYoxSrawXKO8cwWad0UhjcReSAhI8bt+mab7wWs3lTYCu1nrenJZe4/kcnd98yLdCPVU N2yQiDpmhSqQ8wBw== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1714646221; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/INJ9xHVZw6LlhtCR6kYcAQhFV4G6J5L4aAzOIZSWGY=; b=rniUUe9B74R0MJVqHjhkMwX3YHbDQ5NOw7LVHtJ4raoxoxHQAyKW8iTPuSkjvhETyWKbAT 3xqjTnEFP9VO75YYUTkSfcGqR16iz/+DnwyZFssQmzfZD6gwhx5VPHK6P2eEcTyUGLIHac 0VUyEWXLiiG+2iQ0FdSLXqv14P9FHi4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1714646221; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/INJ9xHVZw6LlhtCR6kYcAQhFV4G6J5L4aAzOIZSWGY=; b=gcrYoxSrawXKO8cwWad0UhjcReSAhI8bt+mab7wWs3lTYCu1nrenJZe4/kcnd98yLdCPVU N2yQiDpmhSqQ8wBw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 3E58B1386E; Thu, 2 May 2024 10:37:01 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 3zpaBs1sM2b7EgAAD6G6ig (envelope-from ); Thu, 02 May 2024 10:37:01 +0000 Message-ID: <6f42cbea-053c-4c49-b82b-428bf55ec101@suse.de> Date: Thu, 2 May 2024 12:37:23 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3] [gdb/testsuite] New test: gdb.base/check-errno.exp To: Kevin Buettner , gdb-patches@sourceware.org References: <20240502013934.389445-1-kevinb@redhat.com> Content-Language: en-US From: Tom de Vries In-Reply-To: <20240502013934.389445-1-kevinb@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Level: X-Spamd-Result: default: False [-4.29 / 50.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; XM_UA_NO_VERSION(0.01)[]; MID_RHS_MATCH_FROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo, imap1.dmz-prg2.suse.org:rdns] X-Spam-Score: -4.29 X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_NONE, SPF_PASS, 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 5/2/24 03:38, Kevin Buettner wrote: > Printing the value of 'errno' from GDB is sometimes problematic. The > situation has improved in recent years, though there are still > scenarios for which "print errno" doesn't work. > > The test, gdb.base/check-errno.exp, introduced by this commit, > tests whether or not GDB can print errno with a binary compiled > in the following different ways: > > - default: no switches aside from -g (and whatever else is added by the > testing framework) > - macros: macros included in the debuginfo; this is enabled by using > -g3 when using gcc or clang > - static: statically linked binary > - static-macros: statically linked binary w/ macro definitions included > in debuginfo > - pthreads: libpthread linked binary > - pthreads-macros: libpthread linked binary w/ macro definitions included > in debuginfo > - pthreads-static: Statically linked against libpthread > - pthreads-static-macros: Statically linked against libpthread w/ macro > definitions Hi, I applied the patch, and ran the test-case on leap 15.5. With glibc debuginfo installed, I get: ... FAIL: gdb.base/check-errno.exp: default: print errno FAIL: gdb.base/check-errno.exp: default: print (int) errno FAIL: gdb.base/check-errno.exp: default: check errno value from corefile FAIL: gdb.base/check-errno.exp: static: print errno FAIL: gdb.base/check-errno.exp: static: check errno value from corefile FAIL: gdb.base/check-errno.exp: pthreads-static: print errno FAIL: gdb.base/check-errno.exp: pthreads-static: check errno value from corefile ... Without glibc debuginfo installed, I get: ... FAIL: gdb.base/check-errno.exp: default: print (int) errno FAIL: gdb.base/check-errno.exp: static: print errno FAIL: gdb.base/check-errno.exp: static: check errno value from corefile FAIL: gdb.base/check-errno.exp: pthreads-static: print errno FAIL: gdb.base/check-errno.exp: pthreads-static: check errno value from corefile ... Then I ran it on tumbleweed. With and without glibc debuginfo installed, I get: ... FAIL: gdb.base/check-errno.exp: static: print errno FAIL: gdb.base/check-errno.exp: static: check errno value from corefile FAIL: gdb.base/check-errno.exp: pthreads-static: print errno FAIL: gdb.base/check-errno.exp: pthreads-static: check errno value from corefile ... Looking in more detail at the first two FAILs of leap 15.5 with glibc debug info installed, we have: ... (gdb) print errno^M Cannot find thread-local storage for process 2259, shared library /lib64/libc.so.6:^M Cannot find thread-local variables on this target^M (gdb) FAIL: gdb.base/check-errno.exp: default: print errno print (int) errno^M Cannot find thread-local storage for process 2259, shared library /lib64/libc.so.6:^M Cannot find thread-local variables on this target^M (gdb) FAIL: gdb.base/check-errno.exp: default: print (int) errno ... I think some of these are FAILs due to using a glibc version that doesn't have libpthreads merged. Leap 15.5 uses glibc 2.31. libpthreads was merged into libc in version 2.34. Current tumbleweed uses 2.39. FWIW, in a fedora rawhide container I get: ... XPASS: gdb.base/check-errno.exp: static-macros: print (int) errno XPASS: gdb.base/check-errno.exp: pthreads-static-macros: print (int) errno ... That matches your description, but I think these xpasses shouldn't be there. Thanks, - Tom