test regression: TestCloneUpgrade.test_clone_upgrade_synthetic

Bug #1510060 reported by Martin Pitt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apt-clone (Ubuntu)
Invalid
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)
Changed in apt-clone (Ubuntu):
importance: Undecided → High
assignee: nobody → Michael Vogt (mvo)
Revision history for this message
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

Revision history for this message
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
Revision history for this message
Michael Vogt (mvo) wrote :

lol and thanks!

Revision history for this message
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
Revision history for this message
Martin Pitt (pitti) wrote :
Revision history for this message
Steve Langasek (vorlon) wrote :

bug fixed itself again, without any change to apt-clone; apt-clone autopkgtests pass in bionic...

Changed in apt-clone (Ubuntu):
status: Triaged → Invalid
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

FTR this is back in Hirsute and seems it was back bug force-badtested in focal& groovy.
See bug 1902830

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.