test regression: TestCloneUpgrade.test_clone_upgrade_synthetic

Bug #1510060 reported by Martin Pitt on 2015-10-26
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apt-clone (Ubuntu)
High
Michael Vogt

Bug Description

apt-clone's tests have worked fine in wily (http://autopkgtest.ubuntu.com/packages/a/apt-clone/wily/amd64/) but started failing consistently in xenial (http://autopkgtest.ubuntu.com/packages/a/apt-clone/xenial/amd64/).

This can be reproduced fast in a simple schroot with the test deps installed:

$ cd tests; PYTHONPATH=.. python3 test_clone_upgrade.py -v TestCloneUpgrade.test_clone_upgrade_synthetic
[...]
======================================================================
FAIL: test_clone_upgrade_synthetic (__main__.TestCloneUpgrade)
test clone upgrade with on-the-fly generated chroots
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_clone_upgrade.py", line 58, in test_clone_upgrade_synthetic
    self.assertTrue(len(cache.get_changes()) > 0)
AssertionError: False is not true

I added
            print('--------- %s -----\n%s\n-------------' % (meta, cache.get_changes()))

to the test, and I get

--------- ubuntu-standard -----
[]
--------- ubuntu-desktop -----
[<Package: name:'libvisual-0.4-plugins' architecture='amd64' id:6857>]
--------- kubuntu-desktop -----
[<Package: name:'libvisual-0.4-plugins' architecture='amd64' id:6857>, <Package: name:'lksctp-tools' architecture='amd64' id:9362>]
--------- xubuntu-desktop -----
[<Package: name:'libvisual-0.4-plugins' architecture='amd64' id:6857>]

So the check works for the metapackages except ubuntu-standard. More curiously, when running the test on wily *now*, it also fails, which suggests that perhaps the very late distro-info update for xenial may have influenced this?

But I haven't the slightest idea what this test is trying to do, so I don't know how to fix this.

Martin Pitt (pitti) on 2015-10-26
Changed in apt-clone (Ubuntu):
importance: Undecided → High
assignee: nobody → Michael Vogt (mvo)
Michael Vogt (mvo) wrote :

I tried to reproduce this in a freshly created xenial schroot:

(xenial-amd64)egon@top:~/devel/apt-clone/trunk/tests$ PYTHONPATH=.. python3 test_clone_upgrade.py -v TestCloneUpgrade.test_clone_upgrade_synthetic
test_clone_upgrade_synthetic (__main__.TestCloneUpgrade)
test clone upgrade with on-the-fly generated chroots ... No keyring installed in /tmp/tmp6xbo2nkv/etc/apt/trusted.gpg.d/.No keyring installed in /tmp/tmp9iiq3yqu/etc/apt/trusted.gpg.d/.No keyring installed in /tmp/tmp1jj8qkm0/etc/apt/trusted.gpg.d/.No keyring installed in /tmp/tmp6vdf20bp/etc/apt/trusted.gpg.d/.test_clone_upgrade.py:52: ResourceWarning: unclosed file <_io.TextIOWrapper name=13 mode='r' encoding='ANSI_X3.4-1968'>
  clone = AptClone()
test_clone_upgrade.py:52: ResourceWarning: unclosed file <_io.TextIOWrapper name=14 mode='w' encoding='ANSI_X3.4-1968'>
  clone = AptClone()
No keyring installed in /tmp/tmpi96mkeo3/etc/apt/trusted.gpg.d/.No keyring installed in /tmp/tmpzgfgyh4f/etc/apt/trusted.gpg.d/.test_clone_upgrade.py:52: ResourceWarning: unclosed file <_io.TextIOWrapper name=4 mode='r' encoding='ANSI_X3.4-1968'>
  clone = AptClone()
test_clone_upgrade.py:52: ResourceWarning: unclosed file <_io.TextIOWrapper name=5 mode='w' encoding='ANSI_X3.4-1968'>
  clone = AptClone()
No keyring installed in /tmp/tmp9mam7od6/etc/apt/trusted.gpg.d/.No keyring installed in /tmp/tmpwj3nkit5/etc/apt/trusted.gpg.d/.test_clone_upgrade.py:52: ResourceWarning: unclosed file <_io.TextIOWrapper name=15 mode='r' encoding='ANSI_X3.4-1968'>
  clone = AptClone()
test_clone_upgrade.py:52: ResourceWarning: unclosed file <_io.TextIOWrapper name=16 mode='w' encoding='ANSI_X3.4-1968'>
  clone = AptClone()
/usr/lib/python3.5/unittest/case.py:600: ResourceWarning: unclosed file <_io.TextIOWrapper name=6 mode='r' encoding='ANSI_X3.4-1968'>
  testMethod()
/usr/lib/python3.5/unittest/case.py:600: ResourceWarning: unclosed file <_io.TextIOWrapper name=7 mode='w' encoding='ANSI_X3.4-1968'>
  testMethod()
ok

----------------------------------------------------------------------
Ran 1 test in 139.030s

OK

same when I apt-get source apt-clone

Martin Pitt (pitti) wrote :

Indeed -- the bug was perfectly reproducible yesterday, now it succeeds again in a schroot and with adt-run. So it fixed itself as mysteriously as it arrived :-)

Changed in apt-clone (Ubuntu):
status: New → Fix Released
Michael Vogt (mvo) wrote :

lol and thanks!

Martin Pitt (pitti) wrote :

Not that magical :-( this error returned on http://autopkgtest.ubuntu.com/packages/a/apt-clone/xenial/amd64/.

Changed in apt-clone (Ubuntu):
status: Fix Released → Triaged
Martin Pitt (pitti) wrote :
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers