Cannot pass testsuite on a fresh install

Bug #1042208 reported by Paul Sokolovsky
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro Image Tools
Fix Released
High
Paul Sokolovsky

Bug Description

Trying to run "testr run" (after "test init" of course) on a workstation with Precise:

$ testr run
running=python -m subunit.run linaro_image_tools.tests.test_suite
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.builder:Local package 'bar' not included
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
ERROR:linaro_image_tools:Couldn't read partition table for a reasonable time for device /tmp/tmpnCcT2G
WARNING:linaro_image_tools:Failed to umount bar, but ignoring it because of a previous error
WARNING:linaro_image_tools:Sub process "umount" returned a non-zero value: 1
String or Integer object expected for key, unicode found

Testsuite apparently fails, but testr doesn't give explicit failure message, nor there appears to be a way to run tests in verbose mode to get more detailed error information.

Related branches

Revision history for this message
Paul Sokolovsky (pfalcon) wrote :

Note that error at the end is similar to bug #892020.

Revision history for this message
Paul Sokolovsky (pfalcon) wrote :
Download full text (9.9 KiB)

Running testsuite with a decent testrunner, like nosetests:

$ nosetests -s
.......................................F............................................................................................................................................................................................................................................................................................................................................................................................................................EEEEE...........................................................................................................................................................................................Error in local_atexit:
Traceback (most recent call last):
  File "/home/pfalcon/devel/linaro/linaro-image-tools/trunk/linaro_image_tools/media_create/chroot_utils.py", line 208, in run_local_atexit_funcs
    func()
  File "/home/pfalcon/devel/linaro/linaro-image-tools/trunk/linaro_image_tools/media_create/chroot_utils.py", line 170, in undo
    new_path = os.path.join(directory, os.path.basename(filepath))
  File "/usr/lib/python2.7/posixpath.py", line 112, in basename
    i = p.rfind('/') + 1
AttributeError: 'NoneType' object has no attribute 'rfind'
E.......................................................................................E...............................E...............
======================================================================
ERROR: linaro_image_tools.hwpack.tests.test_script.ScriptTests.test_builds_a_hwpack
----------------------------------------------------------------------
_StringException: Traceback (most recent call last):
  File "/home/pfalcon/devel/linaro/linaro-image-tools/trunk/linaro_image_tools/hwpack/tests/test_script.py", line 86, in test_builds_a_hwpack
    stdout, stderr = self.run_script([config.filename, "1.0"])
  File "/home/pfalcon/devel/linaro/linaro-image-tools/trunk/linaro_image_tools/hwpack/tests/test_script.py", line 49, in run_script
    cmdline, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
    raise child_exception
AttributeError: 'NoneType' object has no attribute 'rfind'

======================================================================
ERROR: linaro_image_tools.hwpack.tests.test_script.ScriptTests.test_errors_on_missing_configfile
----------------------------------------------------------------------
_StringException: Traceback (most recent call last):
  File "/home/pfalcon/devel/linaro/linaro-image-tools/trunk/linaro_image_tools/hwpack/tests/test_script.py", line 59, in test_errors_on_missing_configfile
    ["nonexistant", "1.0"], expected_returncode=1)
  File "/home/pfalcon/devel/linaro/linaro-image-tools/trunk/linaro_image_tools/hwpack/tests/test_script.py", line 49, in run_script
    cmdline, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
    raise ...

Revision history for this message
Paul Sokolovsky (pfalcon) wrote :

Ok, so let's go clean-room and try fresh Precise install on an EC2 instance.

I create oen with AMI: ubuntu/images/ebs/ubuntu-precise-12.04-amd64-server-20120424 (ami-a29943cb)

And then:

$ sudo apt-get update
$ sudo apt-get install testrepository python-testtools python-debian \
        python-argparse dpkg-dev python-parted dbus udisks python-dbus python-apt \
        qemu-kvm util-linux apt-utils pyflakes
$ sudo apt-get install bzr
$ bzr branch lp:linaro-image-tools
$ testr init
$ testr run

Revision history for this message
Paul Sokolovsky (pfalcon) wrote :
Download full text (5.6 KiB)

Result:

$ testr run
running=python -m subunit.run linaro_image_tools.tests.test_suite
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.builder:Local package 'bar' not included
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, plea...

Read more...

Revision history for this message
Paul Sokolovsky (pfalcon) wrote :

Ok, previous test results were from running on tiny instance, here's from small one:

$ testr run
[...]
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
WARNING:linaro_image_tools.hwpack.hardwarepack_format:The format '1.0' is deprecated, please update your hardware pack configuration.
======================================================================
ERROR: linaro_image_tools.media_create.tests.test_media_create.TestBoards.test_run_mkimage
----------------------------------------------------------------------
Traceback (most recent call last):
  File "linaro_image_tools/media_create/tests/test_media_create.py", line 2245, in test_run_mkimage
    stdout=open('/dev/null', 'w'), as_root=False)
  File "linaro_image_tools/media_create/boards.py", line 1660, in _run_mkimage
    proc = cmd_runner.run(cmd, as_root=as_root, stdout=stdout)
  File "linaro_image_tools/cmd_runner.py", line 63, in run
    return Popen(args, stdin=stdin, stdout=stdout, stderr=stderr, cwd=cwd)
  File "linaro_image_tools/cmd_runner.py", line 83, in __init__
    super(Popen, self).__init__(args, env=env, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
ERROR:linaro_image_tools:Couldn't read partition table for a reasonable time for device /tmp/tmpYRoWPz
WARNING:linaro_image_tools:Failed to umount bar, but ignoring it because of a previous error
WARNING:linaro_image_tools:Sub process "umount" returned a non-zero value: 1
String or Integer object expected for key, unicode found

Revision history for this message
Paul Sokolovsky (pfalcon) wrote :
Download full text (11.3 KiB)

nosetests to the rescue on details:

$ nosetests -s
.......................................F............................................................................................................................................................................................................................................................................................................................................................................................................................EEEEE................................................................................E..........................................................................................................Error in local_atexit:
Traceback (most recent call last):
  File "/home/ubuntu/linaro-image-tools/linaro_image_tools/media_create/chroot_utils.py", line 208, in run_local_atexit_funcs
    func()
  File "/home/ubuntu/linaro-image-tools/linaro_image_tools/media_create/chroot_utils.py", line 170, in undo
    new_path = os.path.join(directory, os.path.basename(filepath))
  File "/usr/lib/python2.7/posixpath.py", line 112, in basename
    i = p.rfind('/') + 1
AttributeError: 'NoneType' object has no attribute 'rfind'
E.......................................................................................E..........................E....E...............
======================================================================
ERROR: linaro_image_tools.hwpack.tests.test_script.ScriptTests.test_builds_a_hwpack
----------------------------------------------------------------------
_StringException: Traceback (most recent call last):
  File "/home/ubuntu/linaro-image-tools/linaro_image_tools/hwpack/tests/test_script.py", line 86, in test_builds_a_hwpack
    stdout, stderr = self.run_script([config.filename, "1.0"])
  File "/home/ubuntu/linaro-image-tools/linaro_image_tools/hwpack/tests/test_script.py", line 49, in run_script
    cmdline, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
    raise child_exception
AttributeError: 'NoneType' object has no attribute 'rfind'

======================================================================
ERROR: linaro_image_tools.hwpack.tests.test_script.ScriptTests.test_errors_on_missing_configfile
----------------------------------------------------------------------
_StringException: Traceback (most recent call last):
  File "/home/ubuntu/linaro-image-tools/linaro_image_tools/hwpack/tests/test_script.py", line 59, in test_errors_on_missing_configfile
    ["nonexistant", "1.0"], expected_returncode=1)
  File "/home/ubuntu/linaro-image-tools/linaro_image_tools/hwpack/tests/test_script.py", line 49, in run_script
    cmdline, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
    raise child_exception
AttributeError: 'NoneType' object has no attribute 'rfind'

==================================================================...

Changed in linaro-image-tools:
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Paul Sokolovsky (pfalcon) wrote :

Ok, by doing:

$ sudo apt-get install linaro-image-tools

I was able to cut number of errors to:

FAILED (errors=2, failures=1)

I.e. linaro-image-tools development testsuite depends on (another?) version of linaro-image-tools being installed. What it tests in testcases depending on this is unclear...

Revision history for this message
Paul Sokolovsky (pfalcon) wrote :

Ok, one test failure is due to non-documented "pep8" dependency.

Revision history for this message
Paul Sokolovsky (pfalcon) wrote :

Patch to update README to partially fix the issues above is submitted.

Revision history for this message
Paul Sokolovsky (pfalcon) wrote :

Ok, with:

sudo add-apt-repository ppa:linaro-maintainers/tools

I was able (without pre-installing linaro-image-tools package!) to get test run with just issue from bug #892020. So, need to make explicit in README that PPA is mandatory. (Second good thing would be to figure what exact custom-patched we depend on, why teh changes still not in upstream, etc.)

Revision history for this message
Paul Sokolovsky (pfalcon) wrote :

From PPA following packages are upgraded wrt to pristine versions:

The following packages will be upgraded:
  python-testrepository python-testtools testrepository

Changed in linaro-image-tools:
assignee: nobody → Paul Sokolovsky (pfalcon)
milestone: none → 2012.09
Revision history for this message
Paul Sokolovsky (pfalcon) wrote :

This was addressed as much as was possible.

Changed in linaro-image-tools:
status: Confirmed → Fix Released
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.