Merge ~morphis/snappy-hwe-snaps/+git/engineering-tests:feature/add-test-for-ethernet-enablement into ~snappy-hwe-team/snappy-hwe-snaps/+git/engineering-tests:master

Proposed by Simon Fels on 2017-02-20
Status: Merged
Approved by: Konrad Zapałowicz on 2017-06-06
Approved revision: 8a5cf9dcf8e72795d273f6d5cd16583d90d7612d
Merged at revision: 2a176cd5fa0ea4594df636b6609bae9b38ed73b8
Proposed branch: ~morphis/snappy-hwe-snaps/+git/engineering-tests:feature/add-test-for-ethernet-enablement
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/engineering-tests:master
Diff against target: 118 lines (+59/-2)
1 file modified
network-manager/units/network-manager.pxu (+59/-2)
Reviewer Review Type Date Requested Status
System Enablement Bot continuous-integration 2017-02-20 Approve on 2017-06-06
Konrad Zapałowicz (community) ack Approve on 2017-06-06
Jim Hodapp (community) Approve on 2017-03-02
Review via email: mp+317753@code.launchpad.net

Description of the change

Add an additional test to cover ethernet enablement as a dependency for other test cases.

Also make WoL test depending on hardware support.

To post a comment you must log in.
review: Needs Fixing (continuous-integration)
review: Needs Fixing (continuous-integration)
Konrad Zapałowicz (kzapalowicz) wrote :

+1

review: Approve (code)
Jim Hodapp (jhodapp) wrote :

Some changes needed, see inline below.

review: Needs Fixing
Simon Fels (morphis) :
Jim Hodapp (jhodapp) wrote :

LGTM

review: Approve
Konrad Zapałowicz (kzapalowicz) wrote :

one typo

review: Needs Fixing (code)
Konrad Zapałowicz (kzapalowicz) wrote :

ack

review: Approve (ack)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/network-manager/units/network-manager.pxu b/network-manager/units/network-manager.pxu
2index b66bc0e..27d9b8b 100644
3--- a/network-manager/units/network-manager.pxu
4+++ b/network-manager/units/network-manager.pxu
5@@ -22,7 +22,39 @@ _steps:
6 _verification:
7 1. Check that /var/crash is empty.
8
9+id: network_manager/ethernet/enable_support
10+category_id: network_manager
11+plugin: manual
12+_summary: Ethernet support for NetworkManager needs to be manually enabled
13+_purpose:
14+ By default ethernet support is disabled in the network-manager snap. In order
15+ to be able to get it managed through NetworkManager a few manual steps need to
16+ be performed.
17+_steps:
18+ 1. Create /etc/netplan/00-default-nm-renderer.yaml with the following content:
19+ .
20+ network:
21+ renderer: NetworkManager
22+ .
23+ 2. Drop any other files from /etc/netplan and reboot the device.
24+_verification:
25+ NOTE: The device may get another IP address assigned as before. Use a network
26+ scanner or a monitor+keyboard to check which IP address it got assigned.
27+ .
28+ Once the device is rebooted you should be able to connect to it by using the
29+ network connection offered on the ethernet port. When logged into the device
30+ verify NetworkManager automatically connected the ethernet port:
31+ .
32+ $ network-manager.nmcli d
33+ DEVICE TYPE STATE CONNECTION
34+ eth0 ethernet connected eth0
35+ [...]
36+ .
37+ The state of all ethernet devices with a plugged cable and a working network
38+ behind should be 'connected'.
39+
40 id: network_manager/ethernet/all_ports_detected
41+depends: network_manager/ethernet/enable_support
42 category_id: network_manager
43 plugin: manual
44 _summary: NetworkManager should detect all available ethernet ports
45@@ -39,6 +71,7 @@ _verification:
46 Both steps should show the same list of ethernet network interfaces.
47
48 id: network_manager/ethernet/auto_connected
49+depends: network_manager/ethernet/enable_support
50 category_id: network_manager
51 plugin: manual
52 _summary: NetworkManager should auto-connect any ethernet port with a link
53@@ -66,6 +99,7 @@ _verification:
54 for example.
55
56 id: network_manager/ethernet/auto_connect_existing_connection
57+depends: network_manager/ethernet/enable_support
58 category_id: network_manager
59 plugin: manual
60 _summary: Cable plug/unplug should give an existing connection
61@@ -92,10 +126,10 @@ _summary: Check if ethernet device is unmanaged.
62 _purpose:
63 Check if the ethernet device is not managed by Network Manager.
64 .
65- NOTE: This only applies to device where ethernet is not managed by
66+ NOTE: This only applies to devices where ethernet is not managed by
67 NetworkManager. Check if /etc/netplan/00-default-nm-renderer.yaml
68 exists. If it does not, then NetworkManager doesn't touch any
69- ethernet connection.
70+ ethernet connection. If it exists, skip this test.
71 _steps:
72 1. Execute the following command to retrieve the list of all detected connections.
73 Note, the AP number is listed from the previous test:
74@@ -201,7 +235,28 @@ _verification:
75 IP6.DOMAIN[1]: gateway
76 -------------------------------------------------------------------------------
77
78+id: network_manager/ethernet/device_supports_wol
79+depends: network_manager/ethernet/enable_support
80+category_id: network_manager
81+plugin: manual
82+_summary: Verify that the device under test has support for Wake-on-LAN
83+_purpose:
84+ Verify that the device you're running the tests on supports Wake-on-LAN. For
85+ example, devices like the Raspberry PI (1-3) do not support Wake-on-LAN.
86+_steps:
87+ Verify that your device supports Wake-on-LAN. You can look into the specs
88+ for your device, ask the vendor or search through the internet.
89+ .
90+ For example the Raspberry PI can't suspend to RAM which is discussed and
91+ outlined in https://github.com/raspberrypi/linux/issues/1281 which also
92+ makes Wake-on-LAN impossible.
93+_verification:
94+ If device does not support Wake-on-LAN please SKIP this test case and all
95+ depending test cases will be skipped too. If Wake-on-LAN is supported mark
96+ test as PASSED.
97+
98 id: network_manager/ethernet/uses_global_wol
99+depends: network_manager/ethernet/device_supports_wol
100 category_id: network_manager
101 plugin: manual
102 _summary: Ethernet connections are using global wake-on-lan setting
103@@ -224,6 +279,7 @@ _verification:
104 802-3-ethernet.wake-on-lan: 1 (default)
105
106 id: network_manager/ethernet/has_wol_enabled_by_default
107+depends: network_manager/ethernet/device_supports_wol
108 category_id: network_manager
109 plugin: manual
110 _summary: Ethernet port has wake-on-lan enabled by default
111@@ -247,6 +303,7 @@ _verification:
112 set which marks the port as waking up on the magic packet.
113
114 id: network_manager/ethernet/wakes_up_with_wol
115+depends: network_manager/ethernet/device_supports_wol
116 category_id: network_manager
117 plugin: manual
118 _summary: Wake on LAN configured by NetworkManager can wake up the device

Subscribers

People subscribed via source and target branches

to all changes: