From: Yu Watanabe Date: Fri, 7 Apr 2023 01:09:01 +0000 (+0900) Subject: test: handle one more error gracefully X-Git-Tag: v254-rc1~782 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b6b446cb62d3b2fe2a605b69ea8c287dd9713308;p=thirdparty%2Fsystemd.git test: handle one more error gracefully Fixes #27175. --- diff --git a/src/test/test-fileio.c b/src/test/test-fileio.c index d8d622e44df..a570941cf30 100644 --- a/src/test/test-fileio.c +++ b/src/test/test-fileio.c @@ -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); }