From SRS0=gtrb=U5=lists.debian.org=bounce-debian-hurd=samuel.thibault=ens-lyon.org@bounce.ens-lyon.org Thu Feb  6 19:12:58 2025
Return-Path: <SRS0=gtrb=U5=lists.debian.org=bounce-debian-hurd=samuel.thibault=ens-lyon.org@bounce.ens-lyon.org>
X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on
	begin.youpi.perso.aquilenet.fr
X-Spam-Level: *
X-Spam-Status: No, score=1.8 required=8.0 tests=BAYES_50,
	HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,PDS_OTHER_BAD_TLD
	autolearn=disabled version=4.0.1
X-Spam-Language: 
Delivered-To: samuel.thibault@aquilenet.fr
Received: from mail.aquilenet.fr [185.233.100.1]
	by begin.youpi.perso.aquilenet.fr with IMAP (fetchmail-6.4.39)
	for <samy@localhost> (single-drop); Thu, 06 Feb 2025 19:12:58 +0100 (CET)
Received: from localhost (localhost [127.0.0.1])
	by hera.aquilenet.fr (Postfix) with ESMTP id C2C541DC
	for <samuel.thibault@aquilenet.fr>; Thu,  6 Feb 2025 19:10:39 +0100 (CET)
Authentication-Results: hera.aquilenet.fr;
	none
X-Virus-Scanned: Debian amavis at hera.aquilenet.fr
Received: from hera.aquilenet.fr ([127.0.0.1])
 by localhost (hera.aquilenet.fr [127.0.0.1]) (amavis, port 10024) with ESMTP
 id 2ivx2bpeUVRS for <samuel.thibault@aquilenet.fr>;
 Thu,  6 Feb 2025 19:10:39 +0100 (CET)
Received: from sonata.ens-lyon.org (domu-toccata.ens-lyon.fr [140.77.166.138])
	by hera.aquilenet.fr (Postfix) with ESMTPS id 0E7097E
	for <samuel.thibault@aquilenet.fr>; Thu,  6 Feb 2025 19:10:38 +0100 (CET)
Received: from localhost (localhost [127.0.0.1])
	by sonata.ens-lyon.org (Postfix) with ESMTP id D0329A1B11
	for <samuel.thibault@aquilenet.fr>; Thu,  6 Feb 2025 19:10:37 +0100 (CET)
Received: from sonata.ens-lyon.org ([127.0.0.1])
	by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id BYy_DS2vh1Y1 for <samuel.thibault@aquilenet.fr>;
	Thu,  6 Feb 2025 19:10:37 +0100 (CET)
X-policyd-weight: using cached result; rate:hard: -6.1
Received: from bendel.debian.org (bendel.debian.org [82.195.75.100])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by sonata.ens-lyon.org (Postfix) with ESMTPS id B5ECAA048D
	for <samuel.thibault@ens-lyon.org>; Thu,  6 Feb 2025 19:10:37 +0100 (CET)
Received: from localhost (localhost [127.0.0.1])
	by bendel.debian.org (Postfix) with QMQP
	id 0DE6D20805; Thu,  6 Feb 2025 18:10:37 +0000 (UTC)
X-Mailbox-Line: From debian-hurd-request@lists.debian.org  Thu Feb  6 18:10:36 2025
Old-Return-Path: <crupest@crupest.life>
X-Original-To: lists-debian-hurd@bendel.debian.org
Delivered-To: lists-debian-hurd@bendel.debian.org
Received: from localhost (localhost [127.0.0.1])
	by bendel.debian.org (Postfix) with ESMTP id E0DF920604
	for <lists-debian-hurd@bendel.debian.org>; Thu,  6 Feb 2025 18:10:16 +0000 (UTC)
X-Virus-Scanned: at lists.debian.org with policy bank en-lt
X-Amavis-Spam-Status: No, score=-3.807 tagged_above=-10000 required=5.3
	tests=[BAYES_00=-2, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FOURLA=0.1,
	FROM_SUSPICIOUS_NTLD=0.499, LDO_WHITELIST=-5, PDS_OTHER_BAD_TLD=1.999,
	RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001,
	RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RDNS_NONE=0.793]
	autolearn=no autolearn_force=no
Received: from bendel.debian.org ([127.0.0.1])
	by localhost (lists.debian.org [127.0.0.1]) (amavisd-new, port 2525)
	with ESMTP id A61-d8dPifef for <lists-debian-hurd@bendel.debian.org>;
	Thu,  6 Feb 2025 18:10:10 +0000 (UTC)
X-policyd-weight: using cached result; rate: -4.6
Received: from mail.crupest.life (unknown [43.135.94.23])
	(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)
	(Client did not present a certificate)
	by bendel.debian.org (Postfix) with ESMTPS id 41B18207D6
	for <debian-hurd@lists.debian.org>; Thu,  6 Feb 2025 18:10:10 +0000 (UTC)
From: Yuqian Yang <crupest@crupest.life>
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crupest.life;
	s=mail; t=1738865406;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:cc:mime-version:mime-version:
	 content-transfer-encoding:content-transfer-encoding:
	 in-reply-to:in-reply-to:references:references;
	bh=G4FeyHegi7b8S2/gxTTP/mU64L2vU3v1ZwIgas9igXU=;
	b=YsP4Q/XEOaDpghujZA1Dd35f0BSCqCtBXoBHk1omyKvh5zR6ovt2G9Qu9AHzu3ny4leSH7
	QwGsU5gojpWRw9xwB4YqL/QAZnMkd9kFBkCOb9i//0EjAbOEJ7i9jbUDLOdVGNLMJoyTT8
	owq0y9ln+9vvrDgYul/ZYPel72BV8+JmhcFOWl3meKxRGUs8mR4XsLpD7fSjdWZQclhZZX
	m4cpuy7Px1iEz25Lm/Xj1Bc9fGaEsbtG90m+D5FiVRlH75CMjxhhw2NjKhysldMmjJf0IP
	gxaGxKr1wjzI15GjEPqq7MsYa3ma4VXtw/A/s1i3s4glzq/jEzUZQXDH8uD7DQ==
To: debian-hurd@lists.debian.org
Cc: Yuqian Yang <crupest@crupest.life>
Subject: [PATCH 3/6] GNU/Hurd: fix errno and message.
Date: Fri,  7 Feb 2025 02:09:25 +0800
Message-ID: <20250206180928.1878-4-crupest@crupest.life>
In-Reply-To: <20250206180928.1878-1-crupest@crupest.life>
References: <20250206180928.1878-1-crupest@crupest.life>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Rc-Virus: 2007-09-13_01
X-Rc-Spam: 2008-11-04_01
Resent-Message-ID: <oOvp7xiZUIN.A.EGtN.csPpnB@bendel>
Resent-From: debian-hurd@lists.debian.org
X-Mailing-List: <debian-hurd@lists.debian.org> archive/latest/31741
X-Loop: debian-hurd@lists.debian.org
List-Id: <debian-hurd.lists.debian.org>
List-URL: <https://lists.debian.org/debian-hurd/>
List-Post: <mailto:debian-hurd@lists.debian.org>
List-Help: <mailto:debian-hurd-request@lists.debian.org?subject=help>
List-Subscribe: <mailto:debian-hurd-request@lists.debian.org?subject=subscribe>
List-Unsubscribe: <mailto:debian-hurd-request@lists.debian.org?subject=unsubscribe>
Precedence: list
Resent-Sender: debian-hurd-request@lists.debian.org
List-Archive: https://lists.debian.org/msgid-search/20250206180928.1878-4-crupest@crupest.life
Resent-Date: Thu,  6 Feb 2025 18:10:37 +0000 (UTC)
X-Rspamd-Action: no action
X-Rspamd-Server: hera
X-Rspamd-Queue-Id: C2C541DC
X-Spamd-Bar: ----
X-Spamd-Result: default: False [-4.81 / 15.00];
	BAYES_HAM(-3.00)[99.99%];
	NEURAL_HAM(-3.00)[-0.999];
	MID_CONTAINS_FROM(1.00)[];
	R_MISSING_CHARSET(0.50)[];
	MAILLIST(-0.20)[generic];
	MIME_GOOD(-0.10)[text/plain];
	HAS_LIST_UNSUB(-0.01)[];
	FORGED_RECIPIENTS_MAILLIST(0.00)[];
	RCVD_TLS_LAST(0.00)[];
	MIME_TRACE(0.00)[0:+];
	ARC_NA(0.00)[];
	RCPT_COUNT_TWO(0.00)[2];
	FORGED_SENDER_MAILLIST(0.00)[];
	FROM_NEQ_ENVFROM(0.00)[crupest@crupest.life,SRS0=gtrb=U5=lists.debian.org=bounce-debian-hurd=samuel.thibault=ens-lyon.org@bounce.ens-lyon.org];
	FROM_HAS_DN(0.00)[];
	TO_DN_SOME(0.00)[];
	RCVD_COUNT_SEVEN(0.00)[9]
Status: RO
X-Status: A
Content-Length: 2353

GNU/Hurd uses different errno values and messages.
Port related things for it.
---
 absl/base/internal/strerror_test.cc   | 5 +++++
 absl/log/log_modifier_methods_test.cc | 6 ++++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/absl/base/internal/strerror_test.cc b/absl/base/internal/strerror_test.cc
index e32d5b5c..2b631b40 100644
--- a/absl/base/internal/strerror_test.cc
+++ b/absl/base/internal/strerror_test.cc
@@ -38,8 +38,13 @@ TEST(StrErrorTest, ValidErrorCode) {
 
 TEST(StrErrorTest, InvalidErrorCode) {
   errno = ERANGE;
+#ifdef __GNU__
+  EXPECT_THAT(absl::base_internal::StrError(1),
+              AnyOf(Eq("(os/kern) invalid address"), Eq("Unknown error 1")));
+#else
   EXPECT_THAT(absl::base_internal::StrError(-1),
               AnyOf(Eq("No error information"), Eq("Unknown error -1")));
+#endif
   EXPECT_THAT(errno, Eq(ERANGE));
 }
 
diff --git a/absl/log/log_modifier_methods_test.cc b/absl/log/log_modifier_methods_test.cc
index 4ccde404..9b6a7ec8 100644
--- a/absl/log/log_modifier_methods_test.cc
+++ b/absl/log/log_modifier_methods_test.cc
@@ -180,7 +180,8 @@ TEST(TailCallsModifiesTest, WithPerror) {
       test_sink,
       Send(AllOf(TextMessage(AnyOf(Eq("hello world: Bad file number [9]"),
                                    Eq("hello world: Bad file descriptor [9]"),
-                                   Eq("hello world: Bad file descriptor [8]"))),
+                                   Eq("hello world: Bad file descriptor [8]"),
+                                   Eq("hello world: Bad file descriptor [1073741833]"))),
                  ENCODED_MESSAGE(HasValues(ElementsAre(
                      EqualsProto(R"pb(literal: "hello world")pb"),
                      EqualsProto(R"pb(literal: ": ")pb"),
@@ -188,7 +189,8 @@ TEST(TailCallsModifiesTest, WithPerror) {
                            EqualsProto(R"pb(str: "Bad file descriptor")pb")),
                      EqualsProto(R"pb(literal: " [")pb"),
                      AnyOf(EqualsProto(R"pb(str: "8")pb"),
-                           EqualsProto(R"pb(str: "9")pb")),
+                           EqualsProto(R"pb(str: "9")pb"),
+                           EqualsProto(R"pb(str: "1073741833")pb")),
                      EqualsProto(R"pb(literal: "]")pb")))))));
 
   test_sink.StartCapturingLogs();
-- 
Yuqian Yang <crupest@crupest.life>


