diff options
author | Simon McVittie <smcv@debian.org> | 2019-06-24 09:12:03 +0100 |
---|---|---|
committer | Simon McVittie <smcv@debian.org> | 2020-12-19 14:50:10 +0000 |
commit | f7e0ef7a9ab0ba1b305b14bcd5f6f7052a6bdb7e (patch) | |
tree | 393b0fed79ae252d3507d317f7504702c47beed3 | |
parent | 6ed6fc95c4676a5e69874ec580ce5d9ed989dca2 (diff) |
test_api_base: Skip test if filesystem is unsuitable
When run on disorderfs (an artificial FUSE filesystem used by the
Reproducible Builds project to detect filesystem order dependencies),
we cannot map the file to detect holes. The same is likely to be true
for other simple FUSE filesystems.
Signed-off-by: Simon McVittie <smcv@debian.org>
Forwarded: https://github.com/intel/bmap-tools/pull/59
Applied-upstream: 3.6, commit:0a3609b29250822aef918cb2913cc6360b9053a0
Gbp-Pq: Name test_api_base-Skip-test-if-filesystem-is-unsuitable.patch
-rw-r--r-- | tests/test_api_base.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test_api_base.py b/tests/test_api_base.py index dfad251..093ccf0 100644 --- a/tests/test_api_base.py +++ b/tests/test_api_base.py @@ -135,6 +135,12 @@ def _do_test(image, image_size, delete=True): have to be automatically deleted. """ + try: + Filemap.filemap(image) + except Filemap.ErrorNotSupp as e: + sys.stderr.write('%s\n' % e) + return + # Make sure the temporary files start with the same name as 'image' in # order to simplify debugging. prefix = os.path.splitext(os.path.basename(image))[0] + '.' |