test-suite fails in autopkgtest environment

Bug #1075976 reported by Dimitri John Ledkov on 2012-11-07
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Auto Package Testing
Undecided
Unassigned
upstart (Ubuntu)
Medium
James Hunt

Bug Description

1) DONE merge lp:~stgraber/upstart/upstart-initctl2dot-python3
2) TODO merge lp:~xnox/upstart/fix-qemu-test
3) TODO merge above into lp:ubuntu/upstart
4) TODO merge lp:~xnox/ubuntu/raring/upstart/autopkgtest

Then autopkgtest work in jenkins.

James Hunt (jamesodhunt) wrote :

There are a few problems here...

1) autopkgtest is running the tests are root, which isn't permissible for Upstart.

    adt-run claims to be able to run tests as a non-root user, but that functionality is currently broken (see Debian bug 686292).

2) autopkgtest uses libeatmydata with LD_PRELOAD which causes some tests to fail since data isn't persisted to disk.
    I've raised an MP to add a --no-eat option for auto-package-testing but aside from unsetting LD_PRELOAD, I'm not sure how
    this option could actually be specified for the Upstart autopkg build?
    See: lp:~jamesodhunt/auto-package-testing/partial-fix-for-bug-1075976

    I've also updated xnox's branch with some tweaks: lp:~jamesodhunt/ubuntu/raring/upstart/autopkgtest

3) Some of the Upstart tests in the Ubuntu package are racy. This has been fixed upstream and the next Ubuntu release
     will thus grab those fixes but due to (2), we're hitting these races.

4) The test environment provided by adt appears to not have a controlling terminal which causes one of the test failures
    (see bug 888910 - fixed in upstream Upstart).

I wonder if we should create a "test" ("test_init" - pun intended :-) that runs before the others that essentially sets up the required environment to avoid duplication:

- creates user
- modifies dbus config for Upstart

In fact, since the DEP-8 spec makes no mention of test setup/teardown or indeed the order in which tests are run but the latter does appear to be sequential we should atleast put recommendations in place on this topic since it can't be that uncommon a requirement.

James Hunt (jamesodhunt) wrote :

Looks like eatmydata is a redherring and that it might be something adt-virt-null is doing that is causing (some of) the failures.

Changed in upstart (Ubuntu):
importance: Undecided → Medium
James Hunt (jamesodhunt) wrote :

Responding to my comments in #1...

1) Resolved (aka "worked around")

My lp:~jamesodhunt/ubuntu/raring/upstart/autopkgtest branch now runs both make_check and user_session tests successfully.

However, I had to throw sacrificial chickens through flaming hoops to get this to work (although it's very simple when you do work out what's happening ;-). autopkgtest could be changed to remove the need for flaming hoops, chickens and sharp knives. See bug 1079358.

2) Red herring.

3) New Ubuntu Upstart release, including these changes is currently being prepared, so fixed.

4) Red herring.

James Hunt (jamesodhunt) on 2012-11-20
Changed in upstart (Ubuntu):
assignee: nobody → James Hunt (jamesodhunt)
status: New → In Progress
James Hunt (jamesodhunt) wrote :

Added an explicit initctl2dot test after stgraber spotted it is currently broken.

Dimitri John Ledkov (xnox) wrote :

jenkins is now running jobs as user and gives you root if requested via needs-root stanza.

Changed in auto-package-testing:
status: New → Fix Released
description: updated
description: updated
James Hunt (jamesodhunt) on 2012-12-11
Changed in upstart (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers