test: don't expect that clone() always makes it to the kernel

We might get EPERM on certain clone() flag combinations. Apparently in
Docker for example.

Prompted by: https://github.com/systemd/systemd/pull/19800#issuecomment-854196491
This commit is contained in:
Lennart Poettering
2021-06-04 13:38:00 +02:00
parent 19c79550b4
commit d414f41535
+1 -1
View File
@@ -316,7 +316,7 @@ static void test_raw_clone(void) {
errno = 0;
assert_se(raw_clone(CLONE_FS|CLONE_NEWNS) == -1);
assert_se(errno == EINVAL);
assert_se(errno == EINVAL || ERRNO_IS_PRIVILEGE(errno)); /* Certain container environments prohibit namespaces to us, don't fail in that case */
}
static void test_physical_memory(void) {