From 3c857da754665189425243d03d42b340f2dffe3b Mon Sep 17 00:00:00 2001 From: Dimitri John Ledkov Date: Wed, 1 Aug 2018 20:09:39 +0100 Subject: [PATCH] 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 --- src/test/test-sleep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/test-sleep.c b/src/test/test-sleep.c index 5aebcdd9..85576f29 100644 --- a/src/test/test-sleep.c +++ b/src/test/test-sleep.c @@ -53,7 +53,7 @@ static int test_fiemap_one(const char *path) { if (fd < 0) return log_error_errno(errno, "failed to open %s: %m", path); r = read_fiemap(fd, &fiemap); - if (r == -EOPNOTSUPP) + if (IN_SET(r, -EOPNOTSUPP, -ENOTTY)) exit(log_tests_skipped("Not supported")); if (r < 0) return log_error_errno(r, "Unable to read extent map for '%s': %m", path);