test_etree_parser_io_error crashes when compiling lxml inside a chroot

Bug #1190450 reported by Angel Velásquez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxml
Triaged
Undecided
Unassigned

Bug Description

Hi, I am the packager for lxml for the Arch Linux distribution. We have a suite of tools that creates a clean chroot without another packages or dependencies on-the-fly everytime we want to package something, this with the purpose to detect missing dependencies and avoid future problems.

Anyway, in the process of the package creation we run the tests and now this 2 new test are failing.. Seems that the test creates a file and a temp dir and then tries to remove that dir .. and for some reason with the chroot can't create the dirs .. I've tested outside the chroot and the tests run fine, but I'd like to see if anybody have an idea about this.

 here is the output:

======================================================================
ERROR: test_etree_parse_io_error (lxml.tests.test_io.ElementTreeIOTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/unittest/case.py", line 331, in run
    testMethod()
  File "/build/python-lxml/src/lxml-3.2.1/src/lxml/tests/test_io.py", line 268, in test_etree_parse_io_error
    os.rmdir(dn)
OSError: [Errno 2] No such file or directory: '/tmp/DirectoryhedW0c'

======================================================================
ERROR: test_etree_parse_io_error (lxml.tests.test_io.ElementTreeIOTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/unittest/case.py", line 331, in run
    testMethod()
  File "/build/python-lxml/src/lxml-3.2.1/src/lxml/tests/test_io.py", line 268, in test_etree_parse_io_error
    os.rmdir(dn)
OSError: [Errno 2] No such file or directory: '/tmp/DirectoryRKKUyX'
----------------------------------------------------------------------
Ran 1488 tests in 16.374s

FAILED (errors=2)
Comparing with ElementTree 1.3.0

TESTED VERSION: 3.2.1
    Python: sys.version_info(major=2, minor=7, micro=5, releaselevel='final', serial=0)
    lxml.etree: (3, 2, 1, 0)
    libxml used: (2, 9, 1)
    libxml compiled: (2, 9, 1)
    libxslt used: (1, 1, 28)
    libxslt compiled: (1, 1, 28)

make: *** [test_inplace] Error 1
==> ERROR: A failure occurred in check().
    Aborting...
==> ERROR: Build failed, check /var/lib/archbuild/extra-x86_64/angvp/build

Revision history for this message
scoder (scoder) wrote :

Interesting that only those two tests fail. They are not actually testing lxml but are compatibility tests that run against ElementTree. There is a corresponding ETreeIOTestCase class that tests lxml but there the same code seems to work for you....

However, it's difficult to say what's wrong here. Maybe some locale issue with the file system encoding?

Changed in lxml:
status: New → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.