test-sleep: skip test_fiemap upon inapproriate ioctl for device.

On v4.4 kernels, on top of btrfs ephemeral lxd v3.0 containers generate this
other error code, instead of not supported. Skip the test for both error codes.

Gbp-Pq: Topic debian
Gbp-Pq: Name UBUNTU-test-sleep-skip-test_fiemap-upon-inapproriate-ioctl-.patch
This commit is contained in:
Dimitri John Ledkov 2018-08-01 20:09:39 +01:00 committed by liaoxianfu
parent 8e2aa5d1ba
commit 3c857da754
1 changed files with 1 additions and 1 deletions

View File

@ -53,7 +53,7 @@ static int test_fiemap_one(const char *path) {
if (fd < 0) if (fd < 0)
return log_error_errno(errno, "failed to open %s: %m", path); return log_error_errno(errno, "failed to open %s: %m", path);
r = read_fiemap(fd, &fiemap); r = read_fiemap(fd, &fiemap);
if (r == -EOPNOTSUPP) if (IN_SET(r, -EOPNOTSUPP, -ENOTTY))
exit(log_tests_skipped("Not supported")); exit(log_tests_skipped("Not supported"));
if (r < 0) if (r < 0)
return log_error_errno(r, "Unable to read extent map for '%s': %m", path); return log_error_errno(r, "Unable to read extent map for '%s': %m", path);