tests: new test to check interfaces after reboot the system #4078

Merged
merged 11 commits into from Dec 4, 2017

Conversation

Projects
None yet
5 participants
Contributor

sergiocazzolato commented Oct 25, 2017

This is created to cover this bug https://bugs.launchpad.net/snapd/+bug/1721518

sergiocazzolato added some commits Oct 25, 2017

codecov-io commented Oct 25, 2017

Codecov Report

Merging #4078 into master will increase coverage by 1.73%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4078      +/-   ##
==========================================
+ Coverage   76.19%   77.92%   +1.73%     
==========================================
  Files         445      446       +1     
  Lines       38773    30820    -7953     
==========================================
- Hits        29542    24016    -5526     
+ Misses       7217     4793    -2424     
+ Partials     2014     2011       -3
Impacted Files Coverage Δ
cmd/snap-repair/cmd_list.go 80% <0%> (-7.18%) ⬇️
cmd/snap-repair/trusted.go 66.66% <0%> (-4.77%) ⬇️
polkit/pid_start_time.go 66.66% <0%> (-4.31%) ⬇️
cmd/snap-update-ns/freezer.go 52.17% <0%> (-4.08%) ⬇️
snap/snaptest/snaptest.go 46.87% <0%> (-3.78%) ⬇️
release/uname_linux.go 71.42% <0%> (-3.58%) ⬇️
interfaces/mount/entry.go 63.93% <0%> (-3.48%) ⬇️
interfaces/connection.go 65% <0%> (-3.34%) ⬇️
cmd/snap/notes.go 76.05% <0%> (-2.9%) ⬇️
arch/arch.go 45.09% <0%> (-2.73%) ⬇️
... and 373 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f513da7...94ab1a6. Read the comment docs.

zyga approved these changes Oct 30, 2017

+1

mvo5 approved these changes Nov 8, 2017

Thanks for taking this on!

Please check $SPREAD_REBOOT and don't do reboot forever.

Contributor

sergiocazzolato commented Nov 10, 2017

@zyga change applied, thanks for reviewing

Contributor

sergiocazzolato commented Nov 13, 2017

@mvo5 @zyga @stolowski, I see the test is failing and aparently it is because of the bug.
After the reboot I see:

  • snap interfaces
    error: no interfaces found

zyga approved these changes Nov 16, 2017

Contributor

zyga commented Nov 22, 2017

Hmm, so indeed the test shows that after reboot we have no interfaces at all:

+ snap interfaces
error: no interfaces found

Two comments to understand this better.

+ This test checks if the interfaces are listed after the machine
+ is rebooted. The test is also checking the interfaces after a
+ snap is installed and removed.
+
@zyga

zyga Nov 22, 2017

Contributor

Can you please add:

debug: |
    snap list
tests/regression/lp-1721518/task.yaml
+execute: |
+ # install test-snapd-tools and reboot
+ if [ "$SPREAD_REBOOT" = 0 ]; then
+ snap install test-snapd-tools
@zyga

zyga Nov 22, 2017

Contributor

Can you please move CONNECTED_PATTERN=":core-support +core:core-support-plug" above and then add the same test after the snap is installed but before we reboot? snap interfaces | MATCH "$CONNECTED_PATTERN"

Contributor

sergiocazzolato commented Nov 30, 2017

@zyga, I see this when I debug it, does it help?

linode:ubuntu-16.04-64 .../tests/regression/lp-1721518# sudo test-snapd-tools.echo pwpw
cannot perform operation: mount --rbind /dev /tmp/snap.rootfs_DS6k3C//dev: No such file or directory

linode:ubuntu-16.04-64 .../tests/regression/lp-1721518# ls -al /tmp/
total 48
drwxrwxrwt 11 root root 4096 Nov 30 02:31 .
drwxr-xr-x 25 root root 4096 Nov 30 02:16 ..
drwxrwxrwt  2 root root 4096 Nov 30 02:17 .font-unix
drwxrwxrwt  2 root root 4096 Nov 30 02:17 .ICE-unix
drwx------  2 root root 4096 Nov 30 02:30 snap.rootfs_PA6OXy
drwx------  2 root root 4096 Nov 30 02:31 snap.rootfs_PqQb20
drwx------  3 root root 4096 Nov 30 02:17 systemd-private-de4dce0fc42544b18001d55aaec4948c-colord.service-H5suY6
drwx------  3 root root 4096 Nov 30 02:17 systemd-private-de4dce0fc42544b18001d55aaec4948c-systemd-timesyncd.service-Pi8Kft
drwxrwxrwt  2 root root 4096 Nov 30 02:17 .Test-unix
-rw-------  1 root root 2176 Nov 30 02:17 tmp.bnpHqcN6wt
drwxrwxrwt  2 root root 4096 Nov 30 02:17 .X11-unix
drwxrwxrwt  2 root root 4096 Nov 30 02:17 .XIM-unix

@sergiocazzolato sergiocazzolato merged commit 6759ccd into snapcore:master Dec 4, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment