summaryrefslogtreecommitdiff
path: root/src/test/test-xattr-util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2022-10-10 11:06:56 +0200
committerLennart Poettering <lennart@poettering.net>2022-10-10 16:00:15 +0200
commit00675c363ffdb0144873ae24ce555556aedcab0d (patch)
treecb704aa245834efce4ec64d17870304b276a7dfc /src/test/test-xattr-util.c
parentdcf1bf3b6dd934d3af629a1f9f24e083fce85255 (diff)
downloadsystemd-00675c363ffdb0144873ae24ce555556aedcab0d.tar.gz
tree-wide: add ERRNO_IS_XATTR_ABSENT() helper
We check the same list of error codes on various xattr operations, and we should on some more. Add a common helper for this purpose.
Diffstat (limited to 'src/test/test-xattr-util.c')
-rw-r--r--src/test/test-xattr-util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/test-xattr-util.c b/src/test/test-xattr-util.c
index 2ddb4b4b84..02fba3d6ff 100644
--- a/src/test/test-xattr-util.c
+++ b/src/test/test-xattr-util.c
@@ -46,7 +46,7 @@ TEST(getxattr_at_malloc) {
fd = open("/", O_RDONLY|O_DIRECTORY|O_CLOEXEC|O_NOCTTY);
assert_se(fd >= 0);
r = getxattr_at_malloc(fd, "usr", "user.idontexist", 0, &value);
- assert_se(r == -ENODATA || ERRNO_IS_NOT_SUPPORTED(r));
+ assert_se(r < 0 && ERRNO_IS_XATTR_ABSENT(r));
safe_close(fd);
fd = open(x, O_PATH|O_CLOEXEC);