From 018b6f45483941e70df37661986bae39b0c90849 Mon Sep 17 00:00:00 2001 From: Anita Zhang Date: Wed, 21 Oct 2020 01:52:53 -0700 Subject: [PATCH] oomd: use ERRNO_IS_NOT_SUPPORTED and ERRNO_IS_PRIVILEGE --- src/oom/test-oomd-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/oom/test-oomd-util.c b/src/oom/test-oomd-util.c index 38cae9e034..5e7c187154 100644 --- a/src/oom/test-oomd-util.c +++ b/src/oom/test-oomd-util.c @@ -57,7 +57,7 @@ static void test_oomd_cgroup_kill(void) { /* If we don't have permissions to set xattrs we're likely in a userns or missing capabilities */ r = cg_set_xattr(SYSTEMD_CGROUP_CONTROLLER, cgroup, "user.oomd_test", "test", 4, 0); - if (IN_SET(r, -EPERM, -ENOTSUP)) + if (ERRNO_IS_PRIVILEGE(r) || ERRNO_IS_NOT_SUPPORTED(r)) return (void) log_tests_skipped("Cannot set user xattrs"); /* Do this twice to also check the increment behavior on the xattrs */