You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
1.2 KiB
29 lines
1.2 KiB
1 month ago
|
From 62cbc9f00697003069f1c263c0ab3361f0ea4b6a Mon Sep 17 00:00:00 2001
|
||
|
From: Daan De Meyer <daan.j.demeyer@gmail.com>
|
||
|
Date: Sat, 6 May 2023 11:33:22 +0200
|
||
|
Subject: [PATCH] test-specifier: Ignore -ENOPKG from specifier_printf()
|
||
|
|
||
|
If /etc/machine-id contains "uninitialized", specifier_printf() with
|
||
|
%m will fail with ENOPKG, so ignore that error as well.
|
||
|
|
||
|
(cherry picked from commit 7429c8fe57bef84c3ff6ebd94b560356752af0bc)
|
||
|
|
||
|
Related: RHEL-27512
|
||
|
---
|
||
|
src/test/test-specifier.c | 2 +-
|
||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/src/test/test-specifier.c b/src/test/test-specifier.c
|
||
|
index 4a8ff4bd10..d0adc1a87d 100644
|
||
|
--- a/src/test/test-specifier.c
|
||
|
+++ b/src/test/test-specifier.c
|
||
|
@@ -136,7 +136,7 @@ TEST(specifiers) {
|
||
|
xsprintf(spec, "%%%c", s->specifier);
|
||
|
|
||
|
r = specifier_printf(spec, SIZE_MAX, specifier_table, NULL, NULL, &resolved);
|
||
|
- if (s->specifier == 'm' && IN_SET(r, -ENOENT, -ENOMEDIUM)) /* machine-id might be missing in build chroots */
|
||
|
+ if (s->specifier == 'm' && IN_SET(r, -ENOENT, -ENOMEDIUM, -ENOPKG)) /* machine-id might be missing in build chroots */
|
||
|
continue;
|
||
|
assert_se(r >= 0);
|
||
|
|