~snappy-dev/snapd/+git/snapd-pawel:kvm-interfaces-check-selinux

Last commit made on 2019-12-06
Get this branch:
git clone -b kvm-interfaces-check-selinux https://git.launchpad.net/~snappy-dev/snapd/+git/snapd-pawel

Branch merges

Branch information

Name:
kvm-interfaces-check-selinux
Repository:
lp:~snappy-dev/snapd/+git/snapd-pawel

Recent commits

69499fe... by Paweł Stołowski

Test for SELinux denials in interfaces-kvm spread test.

d98f715... by Michael Vogt

Merge pull request #7860 from stolowski/update-selinux-for-kmod

selinux: update policy to allow modifications related to kmod backend

5c3b47c... by Michael Vogt

Merge pull request #7771 from stolowski/snapctl-is-connected

o/hookstate/ctlcmd: snapctl is-connected command

7ba4ea1... by Paweł Stołowski

Merge branch 'master' into snapctl-is-connected

de52fb0... by Paweł Stołowski

Update SELinux policy to allow modifications related to /etc/modules-load.d/ (etc_t).

b1bff80... by Paweł Stołowski

Merge pull request #7859 from stolowski/disable-mount-ns-test

tests: disable mount-ns test on 16.04 for now

5cedb8d... by Paweł Stołowski

Disable mount-ns test on 16.04 for now until ns changes are fixed.

bd9c677... by Maciej Borzecki

Merge pull request #7846 from mvo5/core20-devicemgr-install-2.1

devicestate: add missing test for failing task setup-run-system

9a78b4d... by Claudio Matsuoka

Merge pull request #7835 from mvo5/gadget-validate-missing-duplicate-test

gadget: add missing test for duplicate detection of roles

eeff8f7... by Ian Johnson

Merge pull request #7843 from anonymouse64/bugfix/test-snapctl-help-context-env

tests/cmd/snapctl: unset SNAP_CONTEXT for the suite

This test specifically would fail when go was run from a snap, because snap-confine for the go snap would set SNAP_COOKIE from here:

https://github.com/snapcore/snapd/blob/9b212f0a9f5afb81ab28db632807c9402a69b780/cmd/snap-confine/snap-confine.c#L462-L463

which would then cause snapctl to pick up the SNAP_CONTEXT variable and not see that the SNAP_COOKIE variable is unset and show a help message. So if we unset this environment variable when running this test suite, we are protected against this possibility.

For reference, the test would fail like this:

```
----------------------------------------------------------------------
FAIL: main_test.go:108: snapctlSuite.TestSnapctlHelp

main_test.go:61:
    c.Assert(snapctlOptions.ContextID, Equals, s.expectedContextID)
... obtained string = "dFPq0qs83PLy2tHK5YmFVss3v1V6yVGvjwDhwp1H80yD"
... expected string = ""

main_test.go:117:
    c.Check(err, IsNil)
... value client.ConnectionError = client.ConnectionError{Err:(*url.Error)(0xc0000206c0)} ("cannot communicate with server: Post http://127.0.0.1:34175/v2/snapctl: EOF")

OOPS: 2 passed, 1 FAILED
--- FAIL: TestT (0.05s)
FAIL
```