teknoraver / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone

Blame SOURCES/0001-test-acl-util-output-more-debug-info.patch

d0811f
From 8cad57ed62a642515670ba79dddb30193456e803 Mon Sep 17 00:00:00 2001
d0811f
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
d0811f
Date: Fri, 7 Aug 2020 18:54:37 +0200
d0811f
Subject: [PATCH] test-acl-util: output more debug info
d0811f
d0811f
For some reason this failed in koji build on s390x:
d0811f
--- command ---
d0811f
16:12:46 PATH='/builddir/build/BUILD/systemd-stable-246.1/s390x-redhat-linux-gnu:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin' SYSTEMD_LANGUAGE_FALLBACK_MAP='/builddir/build/BUILD/systemd-stable-246.1/src/locale/language-fallback-map' SYSTEMD_KBD_MODEL_MAP='/builddir/build/BUILD/systemd-stable-246.1/src/locale/kbd-model-map' /builddir/build/BUILD/systemd-stable-246.1/s390x-redhat-linux-gnu/test-acl-util
d0811f
--- stdout ---
d0811f
-rw-r-----. 1 mockbuild mock 0 Aug  7 16:12 /tmp/test-empty.7RzmEc
d0811f
other::---
d0811f
--- stderr ---
d0811f
Assertion 'r >= 0' failed at src/test/test-acl-util.c:42, function test_add_acls_for_user(). Aborting.
d0811f
---
d0811f
 src/test/test-acl-util.c | 4 ++++
d0811f
 1 file changed, 4 insertions(+)
d0811f
d0811f
diff --git a/src/test/test-acl-util.c b/src/test/test-acl-util.c
d0811f
index df879747f5..9f0e594e67 100644
d0811f
--- a/src/test/test-acl-util.c
d0811f
+++ b/src/test/test-acl-util.c
d0811f
@@ -7,6 +7,7 @@
d0811f
 
d0811f
 #include "acl-util.h"
d0811f
 #include "fd-util.h"
d0811f
+#include "format-util.h"
d0811f
 #include "string-util.h"
d0811f
 #include "tmpfile-util.h"
d0811f
 #include "user-util.h"
d0811f
@@ -18,6 +19,8 @@ static void test_add_acls_for_user(void) {
d0811f
         uid_t uid;
d0811f
         int r;
d0811f
 
d0811f
+        log_info("/* %s */", __func__);
d0811f
+
d0811f
         fd = mkostemp_safe(fn);
d0811f
         assert_se(fd >= 0);
d0811f
 
d0811f
@@ -39,6 +42,7 @@ static void test_add_acls_for_user(void) {
d0811f
                 uid = getuid();
d0811f
 
d0811f
         r = add_acls_for_user(fd, uid);
d0811f
+        log_info_errno(r, "add_acls_for_user(%d, "UID_FMT"): %m", fd, uid);
d0811f
         assert_se(r >= 0);
d0811f
 
d0811f
         cmd = strjoina("ls -l ", fn);