]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-process-util: also add EROFS to the list of "good" errors 21217/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 3 Nov 2021 08:39:16 +0000 (09:39 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 3 Nov 2021 08:39:16 +0000 (09:39 +0100)
It is only added in the one place where we actually try to set the
setting to a new value. Before we were testing if we can set to it the
existing value, which was a noop. We could still get a permission error,
but this is the first place where we would propagate EROFS.

src/test/test-procfs-util.c

index fb9894d2806349afa29fe60b040308122ed33838..b5016ecd2d7407979432b09ae63f06ff1b9f996d 100644 (file)
@@ -51,7 +51,7 @@ int main(int argc, char *argv[]) {
 
                 r = procfs_tasks_set_limit(v-1);
                 log_info_errno(r, "procfs_tasks_set_limit: %m");
-                assert_se(r >= 0 || ERRNO_IS_PRIVILEGE(r));
+                assert_se(r >= 0 || ERRNO_IS_PRIVILEGE(r) || r == -EROFS);
 
                 assert_se(procfs_get_threads_max(&w) >= 0);
                 assert_se(r >= 0 ? w == v - 1 : w == v);