ryantimwilson / rpms / systemd

Forked from rpms/systemd a month ago
Clone
4eda52
From e43e8caf2f2699de7da1f072bcc7c25e125313e4 Mon Sep 17 00:00:00 2001
4eda52
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
4eda52
Date: Wed, 3 Nov 2021 09:39:16 +0100
4eda52
Subject: [PATCH] test-process-util: also add EROFS to the list of "good"
4eda52
 errors
4eda52
4eda52
It is only added in the one place where we actually try to set the
4eda52
setting to a new value. Before we were testing if we can set to it the
4eda52
existing value, which was a noop. We could still get a permission error,
4eda52
but this is the first place where we would propagate EROFS.
4eda52
4eda52
(cherry picked from commit 6434a83d01d96e9f9a17ed9ce1f04a7d64859950)
4eda52
4eda52
Related: #2017035
4eda52
---
4eda52
 src/test/test-procfs-util.c | 2 +-
4eda52
 1 file changed, 1 insertion(+), 1 deletion(-)
4eda52
4eda52
diff --git a/src/test/test-procfs-util.c b/src/test/test-procfs-util.c
4eda52
index 876ef40dfd..f19a41475d 100644
4eda52
--- a/src/test/test-procfs-util.c
4eda52
+++ b/src/test/test-procfs-util.c
4eda52
@@ -52,7 +52,7 @@ int main(int argc, char *argv[]) {
4eda52
 
4eda52
                 r = procfs_tasks_set_limit(v-1);
4eda52
                 log_info_errno(r, "procfs_tasks_set_limit: %m");
4eda52
-                assert_se(r >= 0 || ERRNO_IS_PRIVILEGE(r));
4eda52
+                assert_se(r >= 0 || ERRNO_IS_PRIVILEGE(r) || r == -EROFS);
4eda52
 
4eda52
                 assert_se(procfs_get_threads_max(&w) >= 0);
4eda52
                 assert_se(r >= 0 ? w == v - 1 : w == v);