Source: librepo
Version: 1.14.5-1
Severity: serious
Tags: ftbfs patch
X-Debbugs-Cc: Holger Levsen <hol...@debian.org>

https://buildd.debian.org/status/logs.php?pkg=librepo&ver=1.14.5-1

...
======================================================================
ERROR: test_download_packages_with_resume_02 
(tests.test_yum_package_downloading.TestCaseYumPackagesDownloading.test_download_packages_with_resume_02)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/<<PKGBUILDDIR>>/tests/python/tests/test_yum_package_downloading.py", 
line 757, in test_download_packages_with_resume_02
    xattr.setxattr(fn,
OSError: [Errno 122] Operation not supported

----------------------------------------------------------------------
Ran 108 tests in 4.250s

FAILED (errors=1)


50% tests passed, 1 tests failed out of 2

Total Test time (real) =   4.86 sec

The following tests FAILED:
          2 - test_python (Failed)
Errors while running CTest
make[2]: *** [Makefile:74: test] Error 8


I cannot reproduce the problem on the porterbox, but the attached
patch should fix it.
>From abe71cef88bcdc550782e55063584b753e967627 Mon Sep 17 00:00:00 2001
From: Adrian Bunk <b...@debian.org>
Date: Fri, 6 Jan 2023 00:43:23 +0200
Subject: test_yum_package_downloading.py: Don't hardcode a value for
 EOPNOTSUPP

For historical reasons, errno numbers are not the same on all
architectures (compatibility with other operating systems already
available on the same hardware was considered more important than
having the same numbers on all Linux architectures).

Use errno.EOPNOTSUPP instead of hardcoding a number.
---
 tests/python/tests/test_yum_package_downloading.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/python/tests/test_yum_package_downloading.py 
b/tests/python/tests/test_yum_package_downloading.py
index 0364be0..28ededa 100644
--- a/tests/python/tests/test_yum_package_downloading.py
+++ b/tests/python/tests/test_yum_package_downloading.py
@@ -758,7 +758,7 @@ class TestCaseYumPackagesDownloading(TestCaseWithServer):
                            "user.Librepo.DownloadInProgress".encode("utf-8"),
                            "".encode("utf-8"))
         except IOError as err:
-            if err.errno == 95:
+            if err.errno == errno.EOPNOTSUPP:
                 self.skipTest('extended attributes are not supported')
             raise
 
-- 
2.30.2

Reply via email to