aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rwxr-xr-xtest/test_examples.py13
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'