100% coverage for Xenial

Bug #1637181 reported by Barry Warsaw
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Image
Fix Released
Critical
Barry Warsaw

Bug Description

On Xenial, we don't have 100% coverage so the autopkgtests consistently fail:

https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-xenial/xenial/amd64/u/ubuntu-image/20161027_013351_b5f76@/log.gz

http://autopkgtest.ubuntu.com/packages/ubuntu-image/xenial/amd64

The problem is that we're not covering the `return` line when the `mkfs.ext4` command with -d succeeds because, uh duh, it won't on Xenial.

This prevents the SRU of 0.10 to Xenial.

Barry Warsaw (barry)
Changed in ubuntu-image:
assignee: nobody → Barry Warsaw (barry)
Revision history for this message
Barry Warsaw (barry) wrote :

There's a related issue which should be fixed for Xenial as well. When running the test suite locally in a xenial chroot, `sudo` will fail with the following error:

sudo: no tty present and no askpass program specified

So I need to find a way to run sudo w/o asking for the password in the autopkgtests w/o changing that behavior in production.

Revision history for this message
Barry Warsaw (barry) wrote :

Possible approaches:

* Add $AUTOPKGTEST_NORMAL_USER to sudoers in the test script and add a breaks-testbed Restriction
* Mock the sudo to add -A or -n
* Set $SUDO_ASKPASS to something in the autopkgtests

Revision history for this message
Steve Langasek (vorlon) wrote : Re: [Bug 1637181] Re: 100% coverage for Xenial

On Thu, Oct 27, 2016 at 02:25:29PM -0000, Barry Warsaw wrote:
> Possible approaches:

> * Add $AUTOPKGTEST_NORMAL_USER to sudoers in the test script and add a breaks-testbed Restriction
> * Mock the sudo to add -A or -n
> * Set $SUDO_ASKPASS to something in the autopkgtests

 * skip wrapping the mkfs.ext4 invocation in 'sudo' when uid == 0

Revision history for this message
Barry Warsaw (barry) wrote :

Oh, I like that, great idea.

Revision history for this message
Barry Warsaw (barry) wrote :

Of course, it still means we'd need `Restriction: needs-root` so I'm not sure how much of an advantage that is. I.e. I don't think it really buys you much.

OTOH, since we're releasing each distroseries from a different branch, maybe we just enable `Restriction: needs-root` for the py35 and coverage autopkgtests on the xenial branch and be done with it.

Barry Warsaw (barry)
Changed in ubuntu-image:
status: In Progress → Fix Committed
Barry Warsaw (barry)
Changed in ubuntu-image:
status: Fix Committed → 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.