[Python-modules-team] Bug#923826: python-blessed: FTBFS randomly (failing tests)

Santiago Vila sanvila at debian.org
Tue Mar 5 19:09:54 GMT 2019


Package: src:python-blessed
Version: 1.15.0-1
Severity: important
Tags: ftbfs

Dear maintainer:

I tried to build this package in buster but it failed:

--------------------------------------------------------------------------------
[...]
 debian/rules binary-indep
dh binary-indep --with python2,python3 --buildsystem=pybuild
   dh_update_autotools_config -i -O--buildsystem=pybuild
   dh_autoreconf -i -O--buildsystem=pybuild
   dh_auto_configure -i -O--buildsystem=pybuild
I: pybuild base:217: python2.7 setup.py config 
running config
I: pybuild base:217: python3.7 setup.py config 
running config
   dh_auto_build -i -O--buildsystem=pybuild
I: pybuild base:217: /usr/bin/python setup.py build 
running build
running build_py
creating /<<PKGBUILDDIR>>/.pybuild/cpython2_2.7_blessed/build/blessed
copying blessed/terminal.py -> /<<PKGBUILDDIR>>/.pybuild/cpython2_2.7_blessed/build/blessed
copying blessed/keyboard.py -> /<<PKGBUILDDIR>>/.pybuild/cpython2_2.7_blessed/build/blessed
copying blessed/sequences.py -> /<<PKGBUILDDIR>>/.pybuild/cpython2_2.7_blessed/build/blessed
copying blessed/__init__.py -> /<<PKGBUILDDIR>>/.pybuild/cpython2_2.7_blessed/build/blessed
copying blessed/formatters.py -> /<<PKGBUILDDIR>>/.pybuild/cpython2_2.7_blessed/build/blessed
copying blessed/_capabilities.py -> /<<PKGBUILDDIR>>/.pybuild/cpython2_2.7_blessed/build/blessed
creating /<<PKGBUILDDIR>>/.pybuild/cpython2_2.7_blessed/build/blessed/tests
copying blessed/tests/test_core.py -> /<<PKGBUILDDIR>>/.pybuild/cpython2_2.7_blessed/build/blessed/tests
copying blessed/tests/accessories.py -> /<<PKGBUILDDIR>>/.pybuild/cpython2_2.7_blessed/build/blessed/tests
copying blessed/tests/test_wrap.py -> /<<PKGBUILDDIR>>/.pybuild/cpython2_2.7_blessed/build/blessed/tests
copying blessed/tests/__init__.py -> /<<PKGBUILDDIR>>/.pybuild/cpython2_2.7_blessed/build/blessed/tests
copying blessed/tests/test_length_sequence.py -> /<<PKGBUILDDIR>>/.pybuild/cpython2_2.7_blessed/build/blessed/tests
copying blessed/tests/test_formatters.py -> /<<PKGBUILDDIR>>/.pybuild/cpython2_2.7_blessed/build/blessed/tests
copying blessed/tests/test_keyboard.py -> /<<PKGBUILDDIR>>/.pybuild/cpython2_2.7_blessed/build/blessed/tests
copying blessed/tests/test_sequences.py -> /<<PKGBUILDDIR>>/.pybuild/cpython2_2.7_blessed/build/blessed/tests
running egg_info
writing requirements to blessed.egg-info/requires.txt
writing blessed.egg-info/PKG-INFO
writing top-level names to blessed.egg-info/top_level.txt
writing dependency_links to blessed.egg-info/dependency_links.txt
reading manifest file 'blessed.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'blessed.egg-info/SOURCES.txt'
copying blessed/tests/wall.ans -> /<<PKGBUILDDIR>>/.pybuild/cpython2_2.7_blessed/build/blessed/tests
I: pybuild base:217: /usr/bin/python3 setup.py build 
running build
running build_py
creating /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_blessed/build/blessed
copying blessed/terminal.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_blessed/build/blessed
copying blessed/keyboard.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_blessed/build/blessed
copying blessed/sequences.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_blessed/build/blessed
copying blessed/__init__.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_blessed/build/blessed
copying blessed/formatters.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_blessed/build/blessed
copying blessed/_capabilities.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_blessed/build/blessed
creating /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_blessed/build/blessed/tests
copying blessed/tests/test_core.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_blessed/build/blessed/tests
copying blessed/tests/accessories.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_blessed/build/blessed/tests
copying blessed/tests/test_wrap.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_blessed/build/blessed/tests
copying blessed/tests/__init__.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_blessed/build/blessed/tests
copying blessed/tests/test_length_sequence.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_blessed/build/blessed/tests
copying blessed/tests/test_formatters.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_blessed/build/blessed/tests
copying blessed/tests/test_keyboard.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_blessed/build/blessed/tests
copying blessed/tests/test_sequences.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_blessed/build/blessed/tests
running egg_info
writing blessed.egg-info/PKG-INFO
writing dependency_links to blessed.egg-info/dependency_links.txt
writing requirements to blessed.egg-info/requires.txt
writing top-level names to blessed.egg-info/top_level.txt
reading manifest file 'blessed.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'blessed.egg-info/SOURCES.txt'
copying blessed/tests/wall.ans -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_blessed/build/blessed/tests
   dh_auto_test -i -O--buildsystem=pybuild
I: pybuild base:217: cd /<<PKGBUILDDIR>>/.pybuild/cpython2_2.7_blessed/build; python2.7 -m pytest 
============================= test session starts ==============================
platform linux2 -- Python 2.7.16rc1, pytest-3.10.1, py-1.7.0, pluggy-0.8.0
rootdir: /<<PKGBUILDDIR>>, inifile: tox.ini
collected 306 items

blessed/tests/test_core.py ............................................. [ 14%]
................                                                         [ 19%]
blessed/tests/test_formatters.py .................                       [ 25%]
blessed/tests/test_keyboard.py ..............

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! KeyboardInterrupt !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
/<<PKGBUILDDIR>>/.pybuild/cpython2_2.7_blessed/build/blessed/tests/test_keyboard.py:333: KeyboardInterrupt
(to show a full traceback on KeyboardInterrupt use --fulltrace)
========================== 92 passed in 10.72 seconds ==========================
F.......................... [ 38%]
.                                                                        [ 39%]
blessed/tests/test_length_sequence.py .................................. [ 50%]
.................                                                        [ 55%]
blessed/tests/test_sequences.py ........................................ [ 68%]
........................................................................ [ 92%]
.....                                                                    [ 94%]
blessed/tests/test_wrap.py ..................                            [100%]

=================================== FAILURES ===================================
______________________ test_keystroke_0s_raw_input_ctrl_c ______________________

    @pytest.mark.skipif(os.environ.get('TRAVIS', None) is not None,
                        reason="travis-ci does not handle ^C very well.")
    def test_keystroke_0s_raw_input_ctrl_c():
        "0-second keystroke with raw allows receiving ^C."
        pid, master_fd = pty.fork()
        if pid == 0:  # child
            cov = init_subproc_coverage('test_keystroke_0s_raw_input_ctrl_c')
            term = TestTerminal()
            read_until_semaphore(sys.__stdin__.fileno(), semaphore=SEMAPHORE)
            with term.raw():
                os.write(sys.__stdout__.fileno(), RECV_SEMAPHORE)
                inp = term.inkey(timeout=0)
                os.write(sys.__stdout__.fileno(), inp.encode('latin1'))
            if cov is not None:
                cov.stop()
                cov.save()
            os._exit(0)
    
        with echo_off(master_fd):
            os.write(master_fd, SEND_SEMAPHORE)
            # ensure child is in raw mode before sending ^C,
            read_until_semaphore(master_fd)
            os.write(master_fd, u'\x03'.encode('latin1'))
            output = read_until_eof(master_fd)
        pid, status = os.waitpid(pid, 0)
        assert (output == u'\x03' or
                output == u'' and not os.isatty(0))
>       assert os.WEXITSTATUS(status) == 0
E       assert 2 == 0
E        +  where 2 = <built-in function WEXITSTATUS>(512)
E        +    where <built-in function WEXITSTATUS> = os.WEXITSTATUS

blessed/tests/test_keyboard.py:348: AssertionError
==================== 1 failed, 305 passed in 27.54 seconds =====================
E: pybuild pybuild:338: test: plugin distutils failed with: exit code=1: cd /<<PKGBUILDDIR>>/.pybuild/cpython2_2.7_blessed/build; python2.7 -m pytest 
dh_auto_test: pybuild --test --test-pytest -i python{version} -p 2.7 returned exit code 13
make: *** [debian/rules:7: binary-indep] Error 25
dpkg-buildpackage: error: debian/rules binary-indep subprocess returned exit status 2
--------------------------------------------------------------------------------

The build was made in one of my autobuilders with "dpkg-buildpackage -A".

The failure happens randomly, i.e. sometimes it fails, sometimes it does not,
so I don't have a "recipe" to reproduce it as such, but the "randomness"
is reproducible in my autobuilders (i.e. when I build it a lot of times,
there are always some failed builds).

I've put several failed build logs here for reference:

https://people.debian.org/~sanvila/build-logs/python-blessed/

If you need a test machine to reproduce this, please contact me
privately and I could provide ssh access to a machine where it happens
(caveat: randomly and maybe with low probability).

If this is really a bug in one of the build-depends, please use reassign and affects,
so that this is still visible in the BTS web page for this package.

Thanks.



More information about the Python-modules-team mailing list