gentoo-overlay/sys-apps/systemd/files/0019-test-Don-t-assume-unkn...

45 lines
1.5 KiB
Diff
Raw Normal View History

From 1e4e3a0b8024f005919317f51644b98a446a9426 Mon Sep 17 00:00:00 2001
From: "A. Wilcox" <AWilcox@Wilcox-Tech.com>
Date: Sun, 18 Aug 2024 03:03:22 -0500
Subject: [PATCH 19/34] test: Don't assume unknown errors have their codes
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
glibc will give "Unknown error 200", but musl just says "No error
information", which makes these tests seem to fail.
This cannot be upstreamed.
Signed-off-by: Alexander Miroshnichenko <alex@millerson.name>
---
src/test/test-errno-util.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/test/test-errno-util.c b/src/test/test-errno-util.c
index ab463bd1b394..eafa3624b80e 100644
--- a/src/test/test-errno-util.c
+++ b/src/test/test-errno-util.c
@@ -27,8 +27,8 @@ TEST(STRERROR) {
log_info("STRERROR(%d), STRERROR(%d) → %s, %s", 200, 201, STRERROR(200), STRERROR(201));
const char *a = STRERROR(200), *b = STRERROR(201);
- assert_se(strstr(a, "200"));
- assert_se(strstr(b, "201"));
+ /*assert_se(strstr(a, "200"));
+ assert_se(strstr(b, "201"));*/
/* Check with negative values */
ASSERT_STREQ(a, STRERROR(-200));
@@ -38,7 +38,7 @@ TEST(STRERROR) {
char buf[DECIMAL_STR_MAX(int)];
xsprintf(buf, "%d", INT_MAX); /* INT_MAX is hexadecimal, use printf to convert to decimal */
log_info("STRERROR(%d) → %s", INT_MAX, c);
- assert_se(strstr(c, buf));
+ //assert_se(strstr(c, buf));
}
TEST(STRERROR_OR_ELSE) {
--
2.41.0