From 918e8e4b6389ca12303c357c0aa538853de57303 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 31 Mar 2023 14:59:12 +0200 Subject: [PATCH] In Copr, skip tests that fail with OSError: [Errno 95] Operation not supported We regularly needed to comment out the tests in pyxattr to make it build in the @python/python3.N+1 copr. This way, we no longer need to treat this package as a special case. The failures look like this: _________________ test_binary_payload[file via symlink (path)] _________________ subject = (PurePosixPath('/builddir/build/BUILD/pyxattr-0.7.2/tmpfmkeynlv/xattr-jqzu5alt.test.symlink'), False) def test_binary_payload(subject): """test binary values""" item = subject[0] BINVAL = b"abc\0def" > xattr.set(item, USER_ATTR, BINVAL) E OSError: [Errno 95] Operation not supported tests/test_xattr.py:432: OSError ======================= 146 failed, 141 passed in 1.39s ======================== --- pyxattr.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyxattr.spec b/pyxattr.spec index 17b0750..2ae5fb0 100644 --- a/pyxattr.spec +++ b/pyxattr.spec @@ -43,7 +43,8 @@ export TEST_IGNORE_XATTRS=security.selinux # the module is just a C extension => need to add the installed destination to # PYTHONPATH, otherwise it won't be found export PYTHONPATH=%{buildroot}%{python3_sitearch}:$PYTHONPATH -python3 -m pytest tests +# in Copr, skip tests that fail with OSError: [Errno 95] Operation not supported +python3 -m pytest tests %{?copr_projectname:-k 'not (binary_payload or create_on_existing or empty_value or large_value or many_ops or mixed_access or set_get_remove)'} %files -n python3-%{name} %{python3_sitearch}/xattr.cpython-%{python3_version_nodots}*