]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: handle one more error gracefully
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 7 Apr 2023 01:09:01 +0000 (10:09 +0900)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 7 Apr 2023 18:54:23 +0000 (20:54 +0200)
Fixes #27175.

src/test/test-fileio.c

index d8d622e44df0e15d984836cc9cfd30ad2e498694..a570941cf303fe6dd937908c4345c40a86d62f50 100644 (file)
@@ -1067,7 +1067,8 @@ static void test_read_virtual_file_one(size_t max_size) {
                                   IN_SET(r,
                                          -ENOENT,  /* Some of the files might be absent */
                                          -EINVAL,  /* too small reads from /proc/self/pagemap trigger EINVAL */
-                                         -EFBIG)); /* /proc/kcore and /proc/self/pagemap should be too large */
+                                         -EFBIG,   /* /proc/kcore and /proc/self/pagemap should be too large */
+                                         -EBADF)); /* /proc/kcore is masked when we are running in docker. */
                 } else
                         log_info("read_virtual_file(\"%s\", %zu): %s (%zu bytes)", filename, max_size, r ? "non-truncated" : "truncated", size);
         }