diff options
author | Bernd Schubert <bschubert@ddn.com> | 2025-02-17 19:23:44 +0100 |
---|---|---|
committer | Bernd Schubert <bernd@bsbernd.com> | 2025-02-17 20:27:35 +0100 |
commit | 55f696228e5728cd89008e0af1ca5178bd4b9fb6 (patch) | |
tree | 056436431c9619950054e4f043f222953d22d9c6 | |
parent | 9971ec56d848519a1a5d4dc27ac709d90ff03e4b (diff) | |
download | libfuse-55f696228e5728cd89008e0af1ca5178bd4b9fb6.tar.gz |
tests: Skip the ioctl test for x86 cross compilation
Probably some weird corner case in cross compilation,
for now we ignore this.
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
-rwxr-xr-x | test/test_examples.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/test_examples.py b/test/test_examples.py index e0fb8c4..54a2f88 100755 --- a/test/test_examples.py +++ b/test/test_examples.py @@ -284,6 +284,11 @@ def test_ioctl(tmpdir, output_checker): progname = pjoin(basename, 'example', 'ioctl') if not os.path.exists(progname): pytest.skip('%s not built' % os.path.basename(progname)) + + # Check if binary is 32-bit + file_output = subprocess.check_output(['file', progname]).decode() + if 'ELF 32-bit' in file_output and platform.machine() == 'x86_64': + pytest.skip('ioctl test not supported for 32-bit binary on 64-bit system') mnt_dir = str(tmpdir) testfile = pjoin(mnt_dir, 'fioc') @@ -427,6 +432,14 @@ def test_dev_auto_unmount(short_tmpdir, output_checker, intended_user): @pytest.mark.skipif(os.getuid() != 0, reason='needs to run as root') def test_cuse(output_checker): + progname = pjoin(basename, 'example', 'cuse') + if not os.path.exists(progname): + pytest.skip('%s not built' % os.path.basename(progname)) + + # Check if binary is 32-bit + file_output = subprocess.check_output(['file', progname]).decode() + if 'ELF 32-bit' in file_output and platform.machine() == 'x86_64': + pytest.skip('cuse test not supported for 32-bit binary on 64-bit system') # Valgrind warns about unknown ioctls, that's ok output_checker.register_output(r'^==([0-9]+).+unhandled ioctl.+\n' |