summaryrefslogtreecommitdiff
path: root/src/test/test-errno-util.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2022-10-10 21:19:43 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2022-10-11 16:58:21 +0200
commitf69ae8585f5ce6cd8d1e6f3ccd6c9c2cf153e846 (patch)
tree44c2365d8498d234b4f9dd686135438548f1345b /src/test/test-errno-util.c
parenta6e016af0106d4204ec4718ecfdc137355656241 (diff)
downloadsystemd-f69ae8585f5ce6cd8d1e6f3ccd6c9c2cf153e846.tar.gz
tree-wide: define and use STRERROR_OR_EOF()
Diffstat (limited to 'src/test/test-errno-util.c')
-rw-r--r--src/test/test-errno-util.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/test-errno-util.c b/src/test/test-errno-util.c
index 284f451002..f858927c92 100644
--- a/src/test/test-errno-util.c
+++ b/src/test/test-errno-util.c
@@ -41,4 +41,10 @@ TEST(STRERROR) {
assert_se(strstr(c, buf));
}
+TEST(STRERROR_OR_ELSE) {
+ log_info("STRERROR_OR_ELSE(0, \"EOF\") → %s", STRERROR_OR_EOF(0));
+ log_info("STRERROR_OR_ELSE(EPERM, \"EOF\") → %s", STRERROR_OR_EOF(EPERM));
+ log_info("STRERROR_OR_ELSE(-EPERM, \"EOF\") → %s", STRERROR_OR_EOF(-EPERM));
+}
+
DEFINE_TEST_MAIN(LOG_INFO);