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>
This commit is contained in:
Bernd Schubert
2025-02-17 19:23:44 +01:00
committed by Bernd Schubert
parent 9971ec56d8
commit 55f696228e
+13
View File
@@ -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'