From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by sourceware.org (Postfix) with ESMTPS id D1699385840C for ; Tue, 29 Aug 2023 15:27:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D1699385840C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 156F01F45B for ; Tue, 29 Aug 2023 15:27:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1693322835; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=qYKVb/wq+I6nVJNL80L/mafmqtX7ylJjhsXLH9t0tzs=; b=nGzGXQuyjEd1FQZz7EnLhnXgwS55ubkS72jQP1YUjFTX3StbDUc2Qe7w1uWskL8TKg9bva gBYhjEMz5ly0KBHsd8IkXJ6FLs1oVSdWxjLm+4RDXXIGSRDms8SCjbToFWZXnIjaKVndfO bEUp6KVg8pIYfPlevMeI2VrPdW+yqn4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1693322835; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=qYKVb/wq+I6nVJNL80L/mafmqtX7ylJjhsXLH9t0tzs=; b=IOTCSBjQmKfkaURLwIKg69yDF130m6syc0nlVuq1R5inhy6a7c4Aiq0AWEOZ4gNk8ZUG61 0uCww7m2Cdd1tICQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 0116513301 for ; Tue, 29 Aug 2023 15:27:14 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id mVSmOlIO7mQ3IgAAMHmgww (envelope-from ) for ; Tue, 29 Aug 2023 15:27:14 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [pushed 1/4] [gdb/testsuite] Fix false negative in have_host_locale Date: Tue, 29 Aug 2023 17:27:39 +0200 Message-Id: <20230829152742.7695-1-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_SHORT,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 List-Id: In test-case gdb.tui/pr30056.exp we check for: ... require {have_host_locale C.UTF-8} ... The "C.UTF-8" is normalized by have_host_locale to "c.utf8", before trying to find it in the list returned by host_locales. On my development platform, "locale -a" lists C.utf8, which is normalized to "c.utf8" by host_locales, so there's a match and have_host_locale returns true. On another platform however, "locale -a" lists C.UTF-8, which is normalized to "c.utf-8" by host_locales, so there's no match and have_host_locale returns false. Fix this by also dropping the dash in host_locales. Tested on x86_64-linux. --- gdb/testsuite/lib/gdb.exp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index bcf536e0cc5..1b9179401c4 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -9936,6 +9936,8 @@ gdb_caching_proc host_locales { } { # Normalize items to lower-case. set l [lmap v $l { string tolower $v }] + # Normalize items to without dash. + set l [lmap v $l { string map { "-" "" } $v }] return $l } base-commit: 130e33d8617e7663b397f35d34f3c2b2f48d9cfc -- 2.35.3