Merge ~raharper/curtin:fix/vmtest-dont-clobber-cls-collect-scripts into curtin:master

Proposed by Ryan Harper
Status: Merged
Merged at revision: 5c7d667737664d088069cb7290ceedb2081df783
Proposed branch: ~raharper/curtin:fix/vmtest-dont-clobber-cls-collect-scripts
Merge into: curtin:master
Diff against target: 30 lines (+6/-2)
2 files modified
tests/vmtests/__init__.py (+3/-0)
tests/vmtests/test_lvm_raid.py (+3/-2)
Reviewer Review Type Date Requested Status
Server Team CI bot continuous-integration Needs Fixing
Scott Moser (community) Approve
Ryan Harper (community) Approve
Review via email: mp+355550@code.launchpad.net

Commit message

vmtests: prevent tests from modifying cls.collect_scripts

vmtests now has a set of collect scripts which are shared in all
subclassed tests and should not be modifed by the subclass. Fix
test_lvm_raid.py which modified cls.collect_scripts to use
extra_collect_scripts and update the base class to raise a RuntimeError
if a subclass presents a modified cls.collect_scripts.

To post a comment you must log in.
Revision history for this message
Ryan Harper (raharper) wrote :

vmtest run started here:

https://jenkins.ubuntu.com/server/job/curtin-vmtest-devel-debug/104/console

This will fix up current curtin-vmtest failures.

Revision history for this message
Server Team CI bot (server-team-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Ryan Harper (raharper) wrote :

2 errors and 1 failure:

Ran 3333 tests in 21326.658s

FAILED (SKIP=384, errors=2, failures=1)
Mon, 24 Sep 2018 21:22:32 +0000: vmtest end [1] in 21335s

The two failures were the MultipathBasic tests which are known to fail from time to time.

The failure was a missing DNS entry in test_network_vlan.TrustyHWEXTestNetworkVlan, which we've seen before.

I'll repeat this vmtest on those 3 tests and see if we get positive results.

Revision history for this message
Ryan Harper (raharper) wrote :

And we have success on repeat:

Ran 33 tests in 291.964s

OK (SKIP=6)
Mon, 24 Sep 2018 22:00:19 +0000: vmtest end [0] in 299s

https://jenkins.ubuntu.com/server/job/curtin-vmtest-devel-debug/105/console

Revision history for this message
Ryan Harper (raharper) wrote :

I'm going to mark approved to land this so we don't break jenkins storage again tonight.

review: Approve
Revision history for this message
Server Team CI bot (server-team-bot) :
review: Approve (continuous-integration)
Revision history for this message
Scott Moser (smoser) wrote :

we do need some better way of doing this... collect needs just to be more general purpose.
but for now this is good enough.

thank you.

review: Approve
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

FAILED: Autolanding.
More details in the following jenkins job:
https://jenkins.ubuntu.com/server/job/curtin-autoland-test/28/
Executed test runs:
    None: https://jenkins.ubuntu.com/server/job/admin-lp-git-autoland/107/console

review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/tests/vmtests/__init__.py b/tests/vmtests/__init__.py
2index 7e31491..af75599 100644
3--- a/tests/vmtests/__init__.py
4+++ b/tests/vmtests/__init__.py
5@@ -831,6 +831,9 @@ class VMBaseClass(TestCase):
6 cls.collect_scripts = (
7 DEFAULT_COLLECT_SCRIPTS['common'] +
8 DEFAULT_COLLECT_SCRIPTS[cls.target_distro])
9+ else:
10+ raise RuntimeError('cls collect scripts not empty: %s' %
11+ cls.collect_scripts)
12
13 # append extra from subclass
14 if cls.extra_collect_scripts:
15diff --git a/tests/vmtests/test_lvm_raid.py b/tests/vmtests/test_lvm_raid.py
16index 0c50941..99a33f2 100644
17--- a/tests/vmtests/test_lvm_raid.py
18+++ b/tests/vmtests/test_lvm_raid.py
19@@ -14,8 +14,9 @@ class TestLvmOverRaidAbs(TestMdadmAbs, TestLvmAbs):
20 dirty_disks = True
21 extra_disks = ['10G'] * 4
22
23- collect_scripts = TestLvmAbs.collect_scripts
24- collect_scripts += TestMdadmAbs.collect_scripts + [textwrap.dedent("""
25+ extra_collect_scripts = TestLvmAbs.extra_collect_scripts
26+ extra_collect_scripts += TestMdadmAbs.extra_collect_scripts
27+ extra_collect_scripts += [textwrap.dedent("""
28 cd OUTPUT_COLLECT_D
29 ls -al /dev/md* > dev_md
30 cp -a /etc/mdadm etc_mdadm

Subscribers

People subscribed via source and target branches