Merge ~morphis/snappy-hwe-snaps/+git/engineering-tests:reorganize-tests into ~snappy-hwe-team/snappy-hwe-snaps/+git/engineering-tests:master

Proposed by Simon Fels
Status: Merged
Approved by: Jim Hodapp
Approved revision: fd348c84be38346b9ea1f6198f93ae5f5129ddcc
Merged at revision: 0df00c14056af9c14241308ec85a294c93e97058
Proposed branch: ~morphis/snappy-hwe-snaps/+git/engineering-tests:reorganize-tests
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/engineering-tests:master
Diff against target: 2185 lines (+1024/-112)
23 files modified
bin/run-bluez-tests (+1/-1)
bin/run-modem-manager-tests (+1/-1)
bin/run-network-manager-tests (+1/-1)
bin/run-pulseaudio-tests (+1/-1)
bin/run-tpm-tests (+5/-0)
bin/run-wifi-ap-tests (+1/-1)
bin/run-wireless-tools-tests (+1/-1)
bluez/manage.py (+10/-0)
bluez/units/bluez.pxu (+155/-0)
dev/null (+0/-102)
modem-manager/manage.py (+10/-0)
modem-manager/units/modem-manager.pxu (+79/-0)
network-manager/manage.py (+10/-0)
network-manager/units/network-manager.pxu (+255/-0)
pulseaudio/manage.py (+10/-0)
pulseaudio/units/pulseaudio.pxu (+80/-0)
snapcraft.yaml (+28/-4)
tpm/manage.py (+10/-0)
tpm/units/tpm.pxu (+135/-0)
wifi-ap/manage.py (+10/-0)
wifi-ap/units/wifi-ap.pxu (+111/-0)
wireless-tools/manage.py (+10/-0)
wireless-tools/units/wireless-tools.pxu (+100/-0)
Reviewer Review Type Date Requested Status
Jim Hodapp (community) code Approve
System Enablement Bot continuous-integration Needs Fixing
Review via email: mp+312574@code.launchpad.net

Description of the change

Reorganize tests into separate functional providers.

This splits the existing test cases into different functional (per snap for now) providers to allow other QA snaps to easily reuse those.

This also fixes up a few syntax errors in the test cases which lead to not working tests which were introduced from former merge proposals.

To post a comment you must log in.
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Jim Hodapp (jhodapp) wrote :

LGTM

review: Approve (code)
Revision history for this message
Simon Fels (morphis) wrote :

@Jim: can you top-approve?

Revision history for this message
Simon Fels (morphis) :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/bin/run-bluez-tests b/bin/run-bluez-tests
index 459c80d..fa2d908 100755
--- a/bin/run-bluez-tests
+++ b/bin/run-bluez-tests
@@ -1,5 +1,5 @@
1#!/bin/sh1#!/bin/sh
2export PATH="$PATH:$SNAP/usr/sbin"2export PATH="$PATH:$SNAP/usr/sbin"
3exec python3 $(which plainbox) \3exec python3 $(which plainbox) \
4 run -i '2016.com.canonical.system-enablement::bluez.*' \4 run -i '2016.com.canonical.bluez::bluez.*' \
5 "$@"5 "$@"
diff --git a/bin/run-modem-manager-tests b/bin/run-modem-manager-tests
index c2d5832..02fea4b 100755
--- a/bin/run-modem-manager-tests
+++ b/bin/run-modem-manager-tests
@@ -1,5 +1,5 @@
1#!/bin/sh1#!/bin/sh
2export PATH="$PATH:$SNAP/usr/sbin"2export PATH="$PATH:$SNAP/usr/sbin"
3exec python3 $(which plainbox) \3exec python3 $(which plainbox) \
4 run -i '2016.com.canonical.system-enablement::modem_manager.*' \4 run -i '2016.com.canonical.modem-manager::modem_manager.*' \
5 "$@"5 "$@"
diff --git a/bin/run-network-manager-tests b/bin/run-network-manager-tests
index 9d76ecb..7f90af1 100755
--- a/bin/run-network-manager-tests
+++ b/bin/run-network-manager-tests
@@ -1,5 +1,5 @@
1#!/bin/sh1#!/bin/sh
2export PATH="$PATH:$SNAP/usr/sbin"2export PATH="$PATH:$SNAP/usr/sbin"
3exec python3 $(which plainbox) \3exec python3 $(which plainbox) \
4 run -i '2016.com.canonical.system-enablement::network_manager.*' \4 run -i '2016.com.canonical.network-manager::network_manager.*' \
5 "$@"5 "$@"
diff --git a/bin/run-pulseaudio-tests b/bin/run-pulseaudio-tests
index 40036f5..4e0b088 100755
--- a/bin/run-pulseaudio-tests
+++ b/bin/run-pulseaudio-tests
@@ -1,5 +1,5 @@
1#!/bin/sh1#!/bin/sh
2export PATH="$PATH:$SNAP/usr/sbin"2export PATH="$PATH:$SNAP/usr/sbin"
3exec python3 $(which plainbox) \3exec python3 $(which plainbox) \
4 run -i '2016.com.canonical.system-enablement::pulseaudio.*' \4 run -i '2016.com.canonical.pulseaudio::pulseaudio.*' \
5 "$@"5 "$@"
diff --git a/bin/run-tpm-tests b/bin/run-tpm-tests
6new file mode 1007556new file mode 100755
index 0000000..ea48ca1
--- /dev/null
+++ b/bin/run-tpm-tests
@@ -0,0 +1,5 @@
1#!/bin/sh
2export PATH="$PATH:$SNAP/usr/sbin"
3exec python3 $(which plainbox) \
4 run -i '2016.com.canonical.tpm::tpm.*' \
5 "$@"
diff --git a/bin/run-tpm1.2-tests b/bin/run-tpm1.2-tests
0deleted file mode 1007556deleted file mode 100755
index afdfd53..0000000
--- a/bin/run-tpm1.2-tests
+++ /dev/null
@@ -1,5 +0,0 @@
1#!/bin/sh
2export PATH="$PATH:$SNAP/usr/sbin"
3exec python3 $(which plainbox) \
4 run -i '2016.com.canonical.system-enablement::tpm1.2.*' \
5 "$@"
diff --git a/bin/run-wifi-ap-tests b/bin/run-wifi-ap-tests
index 010fed7..0d7dce0 100755
--- a/bin/run-wifi-ap-tests
+++ b/bin/run-wifi-ap-tests
@@ -1,5 +1,5 @@
1#!/bin/sh1#!/bin/sh
2export PATH="$PATH:$SNAP/usr/sbin"2export PATH="$PATH:$SNAP/usr/sbin"
3exec python3 $(which plainbox) \3exec python3 $(which plainbox) \
4 run -i '2016.com.canonical.system-enablement::wifi_ap.*' \4 run -i '2016.com.canonical.wifi-ap::wifi_ap.*' \
5 "$@"5 "$@"
diff --git a/bin/run-wireless-tools-tests b/bin/run-wireless-tools-tests
index 29cd139..69f5769 100755
--- a/bin/run-wireless-tools-tests
+++ b/bin/run-wireless-tools-tests
@@ -1,5 +1,5 @@
1#!/bin/sh1#!/bin/sh
2export PATH="$PATH:$SNAP/usr/sbin"2export PATH="$PATH:$SNAP/usr/sbin"
3exec python3 $(which plainbox) \3exec python3 $(which plainbox) \
4 run -i '2016.com.canonical.system-enablement::wireless-tools.*' \4 run -i '2016.com.canonical.wireless-tools::wireless-tools.*' \
5 "$@"5 "$@"
diff --git a/bluez/manage.py b/bluez/manage.py
6new file mode 1007556new file mode 100755
index 0000000..78b0dbd
--- /dev/null
+++ b/bluez/manage.py
@@ -0,0 +1,10 @@
1#!/usr/bin/env python3
2from plainbox.provider_manager import setup, N_
3
4setup(
5 name='plainbox-provider-bluez',
6 namespace='2016.com.canonical.bluez',
7 version="1.0",
8 description=N_("Plainbox provider for the BlueZ snap"),
9 gettext_domain="2016_com_canonical_bluez",
10)
diff --git a/bluez/units/bluez.pxu b/bluez/units/bluez.pxu
0new file mode 10064411new file mode 100644
index 0000000..682bb31
--- /dev/null
+++ b/bluez/units/bluez.pxu
@@ -0,0 +1,155 @@
1# Copyright 2016 Canonical Ltd.
2# All rights reserved.
3#
4# Written by:
5# Jim Hodapp <jim.hodapp@canonical.com>
6
7unit: category
8id: bluez
9_name: Bluez
10
11id: bluez/setup/ensure_interface_connection_setup
12category_id: bluez
13_description: Ensure that the bluez interface is connected
14plugin: manual
15_steps:
16 1. Connect required bluez slot/plug
17 .
18 $ sudo snap connect bluez:client bluez:service
19 .
20_verification:
21 Verify that you see the following when running snap interfaces bluez:
22 bluez:service bluez:client
23
24id: bluez/scan/get_all
25category_id: bluez
26plugin: manual
27depends: bluez/setup/ensure_interface_connection_setup
28_summary: All Bluetooth devices in range are listed
29_purpose:
30 Check if all powered on devices that are within range as listed.
31_steps:
32 1. Execute the following command to retrieve the list of all Bluetooth devices:
33 .
34 $ /snap/bin/bluez.bluetoothctl
35 [bluetooth]# scan on
36 .
37_verification:
38 Your expected Bluetooth device(s) is/are shown in the output list such as:
39 [NEW] Device 04:52:C7:0D:0C:03 QC 35s
40
41id: bluez/connection/pair_and_connect
42category_id: bluez
43plugin: manual
44depends: bluez/setup/ensure_interface_connection_setup
45_summary: A Bluetooth device of choice is paired and connected
46_purpose:
47 Check if your Bluetooth device of choice can be paired to the host system.
48_steps:
49 1. Execute the following command to pair and connect your device to the host
50 system using the address listed in the previous scan test:
51 .
52 [bluetooth]# pair <device_address>
53 [bluetooth]# connect <device_address>
54 .
55_verification:
56 You should see output similar to the following:
57 Attempting to pair with 04:52:C7:0D:0C:03
58 [CHG] Device 04:52:C7:0D:0C:03 Connected: yes
59 [CHG] Device 04:52:C7:0D:0C:03 Modalias: bluetooth:v009Ep400Cd0106
60 [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00000000-deca-fade-deca-deafdecacaff
61 [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00001101-0000-1000-8000-00805f9b34fb
62 [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00001108-0000-1000-8000-00805f9b34fb
63 [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000110b-0000-1000-8000-00805f9b34fb
64 [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000110c-0000-1000-8000-00805f9b34fb
65 [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
66 [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000111e-0000-1000-8000-00805f9b34fb
67 [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00001200-0000-1000-8000-00805f9b34fb
68 [CHG] Device 04:52:C7:0D:0C:03 ServicesResolved: yes
69 [CHG] Device 04:52:C7:0D:0C:03 Paired: yes
70 Pairing successful
71 [CHG] Device 04:52:C7:0D:0C:03 ServicesResolved: no
72 [CHG] Device 04:52:C7:0D:0C:03 Connected: no
73 Attempting to connect to 04:52:C7:0D:0C:03
74 [CHG] Device 04:52:C7:0D:0C:03 Connected: yes
75 [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00000000-deca-fade-deca-deafdecacaff
76 [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00001101-0000-1000-8000-00805f9b34fb
77 [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00001108-0000-1000-8000-00805f9b34fb
78 [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000110b-0000-1000-8000-00805f9b34fb
79 [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000110c-0000-1000-8000-00805f9b34fb
80 [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
81 [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000111e-0000-1000-8000-00805f9b34fb
82 [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000112f-0000-1000-8000-00805f9b34fb
83 [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00001200-0000-1000-8000-00805f9b34fb
84 Connection successful
85 [CHG] Device 04:52:C7:0D:0C:03 ServicesResolved: yes
86
87id: bluez/audio/a2dp_ubuntu_classic
88category_id: bluez
89plugin: manual
90depends: bluez/connection/pair_and_connect
91_summary: Stream audio to Bluetooth headset
92_purpose:
93 Verify that you can stream music to a Bluetooth headset via A2DP on Ubuntu
94 Classic. Note: Skip this test if not running Ubuntu Classic.
95_steps:
96 1. Follow the previous tests to list, pair and connect your headset.
97 Navigate to the Sound panel in System Settings, select your headset device
98 in the Output tab, and make sure that Mode is set to A2DP. Then press the
99 Test Sound button and test each speaker.
100_verification:
101 Verify that you can hear the test sound "Front left", "Front right" in each
102 speaker respectively.
103
104id: bluez/audio/a2dp_disconnect
105category_id: bluez
106plugin: manual
107depends: bluez/audio/a2dp_ubuntu_classic
108_summary: Disconnect Bluetooth headset
109_purpose:
110 Verify that you can disconnect Bluetooth headset while streaming and audio
111 playback switches back to the device's primary speaker.
112_steps:
113 1. Follow the previous tests to start streaming audio to the headset via
114 A2DP. Then execute the following command to disconnect the headset from
115 active A2DP streaming:
116 .
117 [<device_name>]# disconnect <device_address>
118_verification:
119 Verify that you see output similar to the following:
120 Attempting to disconnect from 04:52:C7:0D:0C:03
121 [CHG] Device 04:52:C7:0D:0C:03 ServicesResolved: no
122 Successful disconnected
123 [CHG] Device 04:52:C7:0D:0C:03 Connected: no
124 [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Key: 0x0110
125 [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x40
126 [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x0c
127 [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x02
128 [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x41
129 [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x00
130 [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x61
131 [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x71
132 [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0xcd
133 [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x92
134 [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x6c
135
136id: bluez/connection/pair_and_connect_hid
137category_id: bluez
138plugin: manual
139depends: bluez/setup/ensure_interface_connection_setup
140_summary: A Bluetooth HID device (e.g. keyboard, mouse) is connected and paired
141_purpose:
142 Check if your Bluetooth HID device of choice (e.g. keyboard, mouse) can be
143 paired to the host system.
144_steps:
145 1. Execute the following command to pair and connect your HID device to the
146 host system:
147 .
148 [bluetooth]# scan on
149 [bluetooth]# pair <device_address>
150 [bluetooth]# connect <device_address>
151 .
152_verification:
153 Open a text editor and make sure you can type text from the HID keyboard
154 into the text box. If testing a mouse, ensure that the cursor moves when
155 moving your HID mouse.
diff --git a/modem-manager/manage.py b/modem-manager/manage.py
0new file mode 100755156new file mode 100755
index 0000000..8570bb9
--- /dev/null
+++ b/modem-manager/manage.py
@@ -0,0 +1,10 @@
1#!/usr/bin/env python3
2from plainbox.provider_manager import setup, N_
3
4setup(
5 name='plainbox-provider-modem-manager',
6 namespace='2016.com.canonical.modem-manager',
7 version="1.0",
8 description=N_("Plainbox provider for the ModemManager snap"),
9 gettext_domain="2016_com_canonical_modem_manager",
10)
diff --git a/modem-manager/units/modem-manager.pxu b/modem-manager/units/modem-manager.pxu
0new file mode 10064411new file mode 100644
index 0000000..02da607
--- /dev/null
+++ b/modem-manager/units/modem-manager.pxu
@@ -0,0 +1,79 @@
1# Copyright 2016 Canonical Ltd.
2# All rights reserved.
3#
4# Written by:
5# Jim Hodapp <jim.hodapp@canonical.com>
6
7unit: category
8id: modem_manager
9_name: Modem Manager
10
11id: modem_manager/setup/ensure_interface_connection_setup
12category_id: modem_manager
13_description: Ensure that the modem-manager interface is connected
14plugin: manual
15_steps:
16 1. Connect required modem-manager slot/plug
17 .
18 $ sudo snap connect modem-manager:mmcli modem-manager:service
19 $ sudo snap connect network-manager:nmcli network-manager:service
20 $ sudo snap connect network-manager:modem-manager modem-manager:service
21 $ sudo snap connect network-manager:ppp ubuntu-core:ppp
22 .
23_verification:
24 Verify that you see the following when running snap interfaces:
25 modem-manager:service modem-manager:mmcli,network-manager:modem-manager
26 network-manager:service network-manager:nmcli
27 :ppp network-manager
28
29id: modem_manager/modems/get_all
30category_id: modem_manager
31plugin: manual
32depends: modem_manager/setup/ensure_interface_connection_setup
33_summary: All active modem configuration items are listed
34_purpose:
35 Check if the modem shows up as being recognized by modem-manager.
36_steps:
37 1. Execute the following command to retrieve the list of all detected modems:
38 .
39 $ /snap/bin/modem-manager.mmcli -L
40_verification:
41 Your expected modem is shown in the output list.
42
43id: modem_manager/modems/get_info
44category_id: modem_manager
45plugin: manual
46depends: modem_manager/setup/ensure_interface_connection_setup
47_summary: All modem information listed
48_purpose:
49 Check if the modem details can be listed.
50_steps:
51 1. Execute the following command to retrieve the list of all detected modems.
52 Note, the modem number is listed from the previous test:
53 .
54 $ /snap/bin/modem-manager.mmcli -m <modem_number>
55_verification:
56 Your desired modem detail is listed.
57
58id: modem_manager/modems/connect
59category_id: modem_manager
60plugin: manual
61depends: modem_manager/setup/ensure_interface_connection_setup
62_summary: Connect to a listed modem
63_purpose:
64 Connect to a listed modem and verify connection status
65_steps:
66 1. Execute the following commands to connect to a particular modem.
67 Note, replace <interface> with something like "ttyACM3" (look in /dev).
68 You may also find it as the primary port when issuing the command:
69 /snap/bin/network-manager.nmcli -m <modem_number>
70 Also, replace <op_apn> by looking up the APN string for your cell provider
71 at http://www.apn-settings.com (e.g. "fast.t-mobile.com" for T-Mobile 4G).
72 Finally, not that "gsmconn" is an arbitrary connection name and can be set
73 to anything that makes sense for the connection type.
74 .
75 $ /snap/bin/network-manager.nmcli c add type gsm ifname <interface> con-name
76 gsmconn apn <op_apn>
77 $ /snap/bin/network-manager.nmcli r wwan on
78_verification:
79 Verify that you have a modem connection by pinging www.ubuntu.com.
diff --git a/network-manager/manage.py b/network-manager/manage.py
0new file mode 10075580new file mode 100755
index 0000000..86969f2
--- /dev/null
+++ b/network-manager/manage.py
@@ -0,0 +1,10 @@
1#!/usr/bin/env python3
2from plainbox.provider_manager import setup, N_
3
4setup(
5 name='plainbox-provider-network-manager',
6 namespace='2016.com.canonical.network-manager',
7 version="1.0",
8 description=N_("Plainbox provider for the NetworkManager snap"),
9 gettext_domain="2016_com_canonical_network_manager",
10)
diff --git a/network-manager/units/network-manager.pxu b/network-manager/units/network-manager.pxu
0new file mode 10064411new file mode 100644
index 0000000..6921aa7
--- /dev/null
+++ b/network-manager/units/network-manager.pxu
@@ -0,0 +1,255 @@
1# Copyright 2016 Canonical Ltd.
2# All rights reserved.
3#
4# Written by:
5# Lorn Potter <lorn.potter@canonical.com>
6# Simon Fels <simon.fels@canonical.com>
7
8unit: category
9id: network_manager
10_name: Network Manager
11
12id: network_manager/ethernet/all_ports_detected
13category_id: network_manager
14plugin: manual
15_summary: NetworkManager should detect all available ethernet ports
16_purpose:
17 NetworkManager should detect all available ethernet ports by default
18 on a system and list them as usable devices.
19_steps:
20 1. List all available ethernet ports
21 $ ifconfig -a | grep -E '$eth'
22 $ ifconfig -a | grep -E '$en'
23 2. List all ethernet ports NetworkManager knows about
24 $ network-manager.nmcli d
25_verification:
26 Both steps should show the same list of ethernet network interfaces.
27
28id: network_manager/ethernet/auto_connected
29category_id: network_manager
30plugin: manual
31_summary: NetworkManager should auto-connect any ethernet port with a link
32_purpose:
33 When a cable is plugged into an ethernet port NetworkManager should try
34 to automatically connect the port.
35 .
36 NOTE: This test assumes that the cable you plug into the port is connected
37 to a network which offers a DHCP server.
38_steps:
39 1. Ensure that there is no connection for the port you want to use for
40 testing. Using a serial console to perform this test is recommended.
41 2. Drop any existing connections listed by
42 $ network-manager.nmcli c show
43 which are meant for the ethernet port of the device with
44 $ network-manager.nmcli c delete <UUID>
45 3. Plug the cable into the ethernet port.
46_verification:
47 The ethernet port should be automatically connected by NetworkManager. This
48 can be verified with
49 $ network-manager.nmcli d | grep <ethernet device name>
50 eth0 ethernet connected <connection name>
51 Please note that the <connection name> can be different as its
52 automatically selected by NetworkManager. It can be "Wired Connection 1"
53 for example.
54
55id: network_manager/ethernet/auto_connect_existing_connection
56category_id: network_manager
57plugin: manual
58_summary: Cable plug/unplug should give an existing connection
59_purpose:
60 When a cable is unplugged and plugged again the ethernet port should
61 be automatically reconnected.
62_steps:
63 1. Check if the ethernet port is currently connected
64 $ network-manager.nmcli d
65 2. Unplug the cable from the ethernet port and check the connection
66 $ network-manager.nmcli d
67 3. Plug the cable again and check the connection status.
68_verification:
69 Before the cable is unplugged the ethernet port should be marked
70 as connected. Once the cable is removed the connection status
71 should switch to unconnected. When plugged back in, it should be marked
72 again as connected.
73
74id: network_manager/ethernet/unmanaged
75category_id: network_manager
76plugin: manual
77depends: network_manager/setup/ensure_interface_connection_setup
78_summary: Check if ethernet device is unmanaged.
79_purpose:
80 Check if the ethernet device is not managed by Network Manager.
81 .
82 NOTE: This only applies to device where ethernet is not managed by
83 NetworkManager. Check if /etc/netplan/00-default-nm-renderer.yaml
84 exists. If it does not, then NetworkManager doesn't touch any
85 ethernet connection.
86_steps:
87 1. Execute the following command to retrieve the list of all detected connections.
88 Note, the AP number is listed from the previous test:
89 .
90 $ /snap/bin/network-manager.nmcli d | grep en
91_verification:
92 The network device is listed as 'unmanaged', as an example:
93 enxb827ebf6b919 ethernet unmanaged --
94
95id: network_manager/connections/get_all
96category_id: network_manager
97plugin: manual
98depends: network_manager/setup/ensure_interface_connection_setup
99_summary: All active AP configuration items are listed
100_purpose:
101 Check if the AP shows up as being recognized by Network Manager.
102_steps:
103 1. Execute the following command to retrieve the list of all detected connections:
104 .
105 $ /snap/bin/network-manager.nmcli d wifi list
106_verification:
107 Your expected AP is shown in the output list for example:
108 pool1 Infra 6 54 Mbit/s 75 *** WPA2
109
110id: network_manager/connections/agent
111category_id: network_manager
112plugin: manual
113depends: network_manager/setup/ensure_interface_connection_setup
114_summary: Register for secret agent
115_purpose:
116 Register for Network Manager's secret agent and verify status
117_steps:
118 1. Execute the following command to register secret agent:
119 .
120 $ /snap/bin/network-manager.nmcli a
121_verification:
122 Output should be similiar to this:
123 nmcli successfully registered as a Network Manager's secret agent.
124 nmcli successfully registered as a polkit agent.
125
126id: network_manager/connections/connect
127category_id: network_manager
128plugin: manual
129depends: network_manager/setup/ensure_interface_connection_setup
130_summary: Connect to a listed AP
131_purpose:
132 Connect to a listed AP and verify connection status
133_steps:
134 1. Execute the following commands to connect to a particular AP.
135 .
136 $ /snap/bin/network-manager.nmcli dev wifi con "yourssid" password "yourpassword"
137 Note, replace yourssid with the ssid if the AP you will connect to, and replace yourpassword
138 with the actual password/passphrase.
139_verification:
140 Verify that you have a AP connection by issuing this command:
141 $ ifconfig | grep -A 2 wl
142 .
143 verifying that the interface has an IP address with output similiar to this:
144 wlp5s0 Link encap:Ethernet HWaddr 70:77:81:33:92:6b
145 inet addr:10.0.0.108 Bcast:10.0.0.255 Mask:255.255.255.0
146 inet6 addr: 2001:8003:6501:2000:c1b3:3359:d2a3:f2d1/64 Scope:Global
147
148id: network_manager/connections/get_info
149category_id: network_manager
150plugin: manual
151depends: network_manager/setup/ensure_interface_connection_setup
152_summary: All AP information listed
153_purpose:
154 Check if the AP details can be listed.
155_steps:
156 1. Execute the following command to retrieve the list of all detected connections.
157 Note, the AP ssid is listed from the previous test:
158 .
159 $ /snap/bin/network-manager.nmcli -p -f general,ip4,ip6 c show <AP_SSID>
160_verification:
161 Your desired AP detail is listed and has ip4/ip6 address.
162 ===============================================================================
163 Activate connection details (1554e3b2-76e6-4adc-b986-215b7393f8d9)
164 ===============================================================================
165 GENERAL.NAME: pool1
166 GENERAL.UUID: 1554e3b2-76e6-4adc-b986-215b7393f8d9
167 GENERAL.DEVICES: wlp5s0
168 GENERAL.STATE: activated
169 GENERAL.DEFAULT: no
170 GENERAL.DEFAULT6: no
171 GENERAL.VPN: no
172 GENERAL.ZONE: --
173 GENERAL.DBUS-PATH: /org/freedesktop/NetworkManager/ActiveConnection/2
174 GENERAL.CON-PATH: /org/freedesktop/NetworkManager/Settings/3
175 GENERAL.SPEC-OBJECT: /org/freedesktop/NetworkManager/AccessPoint/0
176 GENERAL.MASTER-PATH: --
177 -------------------------------------------------------------------------------
178 IP4.ADDRESS[1]: 10.0.0.108/24
179 IP4.GATEWAY: 10.0.0.138
180 IP4.DNS[1]: 10.0.0.138
181 IP4.DOMAIN[1]: gateway
182 -------------------------------------------------------------------------------
183 IP6.ADDRESS[1]: 2001:8003:6501:2000:c1b3:3359:d2a3:f2d1/64
184 IP6.ADDRESS[2]: 2001:8003:6501:2000:7277:81ff:fe33:926b/64
185 IP6.ADDRESS[3]: fe80::7277:81ff:fe33:926b/64
186 IP6.GATEWAY: fe80::e2b9:e5ff:fe5a:91b0
187 IP6.DNS[1]: 2001:8003:6501:2000::1
188 IP6.DOMAIN[1]: gateway
189 -------------------------------------------------------------------------------
190
191id: network_manager/ethernet/uses_global_wol
192category_id: network_manager
193plugin: manual
194_summary: Ethernet connections are using global wake-on-lan setting
195_purpose:
196 Check if an ethernet connection created by NetworkManager automatically uses the
197 global default for wake-on-lan.
198 .
199 NOTE: This requires a system which is configured to not use netplan to
200 generate connections for NetworkManager. On such a system an ethernet
201 connection will always have wake-on-lan disabled as netplan does this
202 by default if not explicitly stated in the netplan configuration.
203_steps:
204 1. Find connection UUID for the ethernet port
205 $ network-manager.nmcli c show | grep eth0
206 2. Verify the connection uses the global wake-on-lan setting
207 $ network-manager.nmcli -m multiline -f 802-3-ethernet.wake-on-lan c show <UUID>
208_verification:
209 The output should look like this:
210 .
211 802-3-ethernet.wake-on-lan: 1 (default)
212
213id: network_manager/ethernet/has_wol_enabled_by_default
214category_id: network_manager
215plugin: manual
216_summary: Ethernet port has wake-on-lan enabled by default
217_purpose:
218 Check if the actual ethernet device has wake-on-lan correctly enabled when
219 its connection is maintained by NetworkManager.
220_steps:
221 1. Install the se-test-tools snap
222 $ snap install --devmode --edge se-test-tools
223 2. Check the ethernet port for the wake-on-lan setting (eth0 in this case)
224 $ sudo se-test-tools.ethtool eth0
225_verification:
226 The output should be similar to this:
227 Settings for eth0:
228 [...]
229 Supports Wake-on: pumbg
230 Wake-on: g
231 [...]
232 .
233 The relevant line is the "Wake-on:" one. It should have the value "g"
234 set which marks the port as waking up on the magic packet.
235
236id: network_manager/ethernet/wakes_up_with_wol
237category_id: network_manager
238plugin: manual
239_summary: Wake on LAN configured by NetworkManager can wake up the device
240_purpose:
241 Check that another system can wake up from S5 the SUT using the connected ethernet port.
242_steps:
243 1. Ensure there is an ethernet cable attached to one of the ports and it's configured via
244 NetworkManager. Check with
245 $ network-manager.nmcli d | grep eth0
246 2. Note the MAC address of the the eth0 port
247 $ ifconfig eth0
248 3. Power off the system by running
249 $ sudo poweroff
250 4. From another computer on the same network run the following command:
251 $ wakeonlan {mac}
252 If wakeonlan tool is not installed run:
253 $ sudo apt install wakeonlan
254_verification:
255 Did the SUT wake up from S5?
diff --git a/pulseaudio/manage.py b/pulseaudio/manage.py
0new file mode 100755256new file mode 100755
index 0000000..5e7f5ce
--- /dev/null
+++ b/pulseaudio/manage.py
@@ -0,0 +1,10 @@
1#!/usr/bin/env python3
2from plainbox.provider_manager import setup, N_
3
4setup(
5 name='plainbox-provider-pulseaudio',
6 namespace='2016.com.canonical.pulseaudio',
7 version="1.0",
8 description=N_("Plainbox provider for the PulseAudio snap"),
9 gettext_domain="2016_com_canonical_pulseaudio",
10)
diff --git a/pulseaudio/units/pulseaudio.pxu b/pulseaudio/units/pulseaudio.pxu
0new file mode 10064411new file mode 100644
index 0000000..3b304e7
--- /dev/null
+++ b/pulseaudio/units/pulseaudio.pxu
@@ -0,0 +1,80 @@
1# Copyright 2016 Canonical Ltd.
2# All rights reserved.
3#
4# Written by:
5# Konrad Zapalowicz <konrad.zapalowicz@canonical.com>
6
7unit: category
8id: pulseaudio
9_name: PulseAudio
10
11id: pulseaudio/setup/ensure_interface_connection_setup
12category_id: pulseaudio
13_description: Ensure that the pulseaudio interface is auto-connected
14plugin: manual
15_steps:
16 1. List the interfaces
17 .
18 $ snap interfaces
19 .
20_verification:
21 Verify that you see the following:
22 pulseaudio:service pulseaudio:client
23
24id: pulseaudio/pactl/ensure-modules-are-listed
25category_id: pulseaudio
26_description: Ensure that the correct modules are loaded
27plugin: manual
28depends: pulseaudio/setup/ensure_interface_connection_setup
29_steps:
30 1. List the loaded modules
31 .
32 $ pactl list short
33 .
34_verification:
35 Verify that you see output similar to following:
36 0 module-device-restore
37 1 module-stream-restore
38 2 module-card-restore
39 3 module-augment-properties
40 4 module-switch-on-port-available
41 5 module-udev-detect
42 ...
43 80 protocol-native.c pactl
44 0 alsa_card.pci-0000_00_1b.0 module-alsa-card.c
45 .
46 Verify that amongs the other the following modules are listed:
47 module-device-restore
48 module-stream-restore
49 module-card-restore
50 module-switch-on-port-available
51 module-rescue-streams
52 module-always-sink
53
54id: pulseaudio/parecord/ensure-audio-can-be-recorded
55category_id: pulseaudio
56_description: Ensure that it is possible to record audio
57plugin: manual
58depends: pulseaudio/setup/ensure_interface_connection_setup
59_steps:
60 1. Record an audio .wav file
61 .
62 $ parecord ~/record.wav
63 .
64_verification:
65 Verify that the record.wav file has been created and it's size is
66 greater than zero. Verify that the recorded file can be played and
67 it is possible to hear the audio.
68
69id: pulseaudio/paplay/ensure-audio-can-be-played
70category_id: pulseaudio
71_description: Ensure that it is possible to play auio files
72plugin: manual
73depends: pulseaudio/setup/ensure_interface_connection_setup
74_steps:
75 1. Play an audio .wav file
76 .
77 $ paplay ~/file.wav
78 .
79_verification:
80 Verify that the audio is hearable through the speakers.
diff --git a/snapcraft.yaml b/snapcraft.yaml
index af4f8c5..f7599e4 100644
--- a/snapcraft.yaml
+++ b/snapcraft.yaml
@@ -21,8 +21,8 @@ apps:
21 command: bin/run-network-manager-tests21 command: bin/run-network-manager-tests
22 modem-manager:22 modem-manager:
23 command: bin/run-modem-manager-tests23 command: bin/run-modem-manager-tests
24 tpm1-2:24 tpm:
25 command: bin/run-tpm1.2-tests25 command: bin/run-tpm-tests
26 wifi-ap:26 wifi-ap:
27 command: bin/run-wifi-ap-tests27 command: bin/run-wifi-ap-tests
28 wireless-tools:28 wireless-tools:
@@ -47,9 +47,33 @@ parts:
47 - libxslt1-dev47 - libxslt1-dev
48 - zlib1g-dev48 - zlib1g-dev
49 - build-essential49 - build-essential
50 se-plainbox-provider:50 bluez:
51 plugin: plainbox-provider
52 source: ./bluez
53 after: [plainbox-local]
54 modem-manager:
55 plugin: plainbox-provider
56 source: ./modem-manager
57 after: [plainbox-local]
58 network-manager:
59 plugin: plainbox-provider
60 source: ./network-manager
61 after: [plainbox-local]
62 pulseaudio:
63 plugin: plainbox-provider
64 source: ./pulseaudio
65 after: [plainbox-local]
66 tpm:
67 plugin: plainbox-provider
68 source: ./tpm
69 after: [plainbox-local]
70 wifi-ap:
71 plugin: plainbox-provider
72 source: ./wifi-ap
73 after: [plainbox-local]
74 wireless-tools:
51 plugin: plainbox-provider75 plugin: plainbox-provider
52 source: ./tests76 source: ./wireless-tools
53 after: [plainbox-local]77 after: [plainbox-local]
54 launchers:78 launchers:
55 plugin: dump79 plugin: dump
diff --git a/tests/manage.py b/tests/manage.py
56deleted file mode 10075580deleted file mode 100755
index d60bca0..0000000
--- a/tests/manage.py
+++ /dev/null
@@ -1,11 +0,0 @@
1#!/usr/bin/env python3
2from plainbox.provider_manager import setup, N_
3
4
5setup(
6 name='plainbox-provider-system-enablement',
7 namespace='2016.com.canonical.system-enablement',
8 version="1.0",
9 description=N_("Plainbox provider for the System Enablement team"),
10 gettext_domain="2016_com_canonical_system_enablement",
11)
diff --git a/tests/units/bluez.pxu b/tests/units/bluez.pxu
12deleted file mode 1006440deleted file mode 100644
index 682bb31..0000000
--- a/tests/units/bluez.pxu
+++ /dev/null
@@ -1,155 +0,0 @@
1# Copyright 2016 Canonical Ltd.
2# All rights reserved.
3#
4# Written by:
5# Jim Hodapp <jim.hodapp@canonical.com>
6
7unit: category
8id: bluez
9_name: Bluez
10
11id: bluez/setup/ensure_interface_connection_setup
12category_id: bluez
13_description: Ensure that the bluez interface is connected
14plugin: manual
15_steps:
16 1. Connect required bluez slot/plug
17 .
18 $ sudo snap connect bluez:client bluez:service
19 .
20_verification:
21 Verify that you see the following when running snap interfaces bluez:
22 bluez:service bluez:client
23
24id: bluez/scan/get_all
25category_id: bluez
26plugin: manual
27depends: bluez/setup/ensure_interface_connection_setup
28_summary: All Bluetooth devices in range are listed
29_purpose:
30 Check if all powered on devices that are within range as listed.
31_steps:
32 1. Execute the following command to retrieve the list of all Bluetooth devices:
33 .
34 $ /snap/bin/bluez.bluetoothctl
35 [bluetooth]# scan on
36 .
37_verification:
38 Your expected Bluetooth device(s) is/are shown in the output list such as:
39 [NEW] Device 04:52:C7:0D:0C:03 QC 35s
40
41id: bluez/connection/pair_and_connect
42category_id: bluez
43plugin: manual
44depends: bluez/setup/ensure_interface_connection_setup
45_summary: A Bluetooth device of choice is paired and connected
46_purpose:
47 Check if your Bluetooth device of choice can be paired to the host system.
48_steps:
49 1. Execute the following command to pair and connect your device to the host
50 system using the address listed in the previous scan test:
51 .
52 [bluetooth]# pair <device_address>
53 [bluetooth]# connect <device_address>
54 .
55_verification:
56 You should see output similar to the following:
57 Attempting to pair with 04:52:C7:0D:0C:03
58 [CHG] Device 04:52:C7:0D:0C:03 Connected: yes
59 [CHG] Device 04:52:C7:0D:0C:03 Modalias: bluetooth:v009Ep400Cd0106
60 [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00000000-deca-fade-deca-deafdecacaff
61 [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00001101-0000-1000-8000-00805f9b34fb
62 [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00001108-0000-1000-8000-00805f9b34fb
63 [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000110b-0000-1000-8000-00805f9b34fb
64 [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000110c-0000-1000-8000-00805f9b34fb
65 [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
66 [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000111e-0000-1000-8000-00805f9b34fb
67 [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00001200-0000-1000-8000-00805f9b34fb
68 [CHG] Device 04:52:C7:0D:0C:03 ServicesResolved: yes
69 [CHG] Device 04:52:C7:0D:0C:03 Paired: yes
70 Pairing successful
71 [CHG] Device 04:52:C7:0D:0C:03 ServicesResolved: no
72 [CHG] Device 04:52:C7:0D:0C:03 Connected: no
73 Attempting to connect to 04:52:C7:0D:0C:03
74 [CHG] Device 04:52:C7:0D:0C:03 Connected: yes
75 [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00000000-deca-fade-deca-deafdecacaff
76 [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00001101-0000-1000-8000-00805f9b34fb
77 [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00001108-0000-1000-8000-00805f9b34fb
78 [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000110b-0000-1000-8000-00805f9b34fb
79 [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000110c-0000-1000-8000-00805f9b34fb
80 [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
81 [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000111e-0000-1000-8000-00805f9b34fb
82 [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000112f-0000-1000-8000-00805f9b34fb
83 [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00001200-0000-1000-8000-00805f9b34fb
84 Connection successful
85 [CHG] Device 04:52:C7:0D:0C:03 ServicesResolved: yes
86
87id: bluez/audio/a2dp_ubuntu_classic
88category_id: bluez
89plugin: manual
90depends: bluez/connection/pair_and_connect
91_summary: Stream audio to Bluetooth headset
92_purpose:
93 Verify that you can stream music to a Bluetooth headset via A2DP on Ubuntu
94 Classic. Note: Skip this test if not running Ubuntu Classic.
95_steps:
96 1. Follow the previous tests to list, pair and connect your headset.
97 Navigate to the Sound panel in System Settings, select your headset device
98 in the Output tab, and make sure that Mode is set to A2DP. Then press the
99 Test Sound button and test each speaker.
100_verification:
101 Verify that you can hear the test sound "Front left", "Front right" in each
102 speaker respectively.
103
104id: bluez/audio/a2dp_disconnect
105category_id: bluez
106plugin: manual
107depends: bluez/audio/a2dp_ubuntu_classic
108_summary: Disconnect Bluetooth headset
109_purpose:
110 Verify that you can disconnect Bluetooth headset while streaming and audio
111 playback switches back to the device's primary speaker.
112_steps:
113 1. Follow the previous tests to start streaming audio to the headset via
114 A2DP. Then execute the following command to disconnect the headset from
115 active A2DP streaming:
116 .
117 [<device_name>]# disconnect <device_address>
118_verification:
119 Verify that you see output similar to the following:
120 Attempting to disconnect from 04:52:C7:0D:0C:03
121 [CHG] Device 04:52:C7:0D:0C:03 ServicesResolved: no
122 Successful disconnected
123 [CHG] Device 04:52:C7:0D:0C:03 Connected: no
124 [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Key: 0x0110
125 [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x40
126 [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x0c
127 [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x02
128 [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x41
129 [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x00
130 [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x61
131 [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x71
132 [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0xcd
133 [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x92
134 [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x6c
135
136id: bluez/connection/pair_and_connect_hid
137category_id: bluez
138plugin: manual
139depends: bluez/setup/ensure_interface_connection_setup
140_summary: A Bluetooth HID device (e.g. keyboard, mouse) is connected and paired
141_purpose:
142 Check if your Bluetooth HID device of choice (e.g. keyboard, mouse) can be
143 paired to the host system.
144_steps:
145 1. Execute the following command to pair and connect your HID device to the
146 host system:
147 .
148 [bluetooth]# scan on
149 [bluetooth]# pair <device_address>
150 [bluetooth]# connect <device_address>
151 .
152_verification:
153 Open a text editor and make sure you can type text from the HID keyboard
154 into the text box. If testing a mouse, ensure that the cursor moves when
155 moving your HID mouse.
diff --git a/tests/units/modem-manager.pxu b/tests/units/modem-manager.pxu
156deleted file mode 1006440deleted file mode 100644
index 02da607..0000000
--- a/tests/units/modem-manager.pxu
+++ /dev/null
@@ -1,79 +0,0 @@
1# Copyright 2016 Canonical Ltd.
2# All rights reserved.
3#
4# Written by:
5# Jim Hodapp <jim.hodapp@canonical.com>
6
7unit: category
8id: modem_manager
9_name: Modem Manager
10
11id: modem_manager/setup/ensure_interface_connection_setup
12category_id: modem_manager
13_description: Ensure that the modem-manager interface is connected
14plugin: manual
15_steps:
16 1. Connect required modem-manager slot/plug
17 .
18 $ sudo snap connect modem-manager:mmcli modem-manager:service
19 $ sudo snap connect network-manager:nmcli network-manager:service
20 $ sudo snap connect network-manager:modem-manager modem-manager:service
21 $ sudo snap connect network-manager:ppp ubuntu-core:ppp
22 .
23_verification:
24 Verify that you see the following when running snap interfaces:
25 modem-manager:service modem-manager:mmcli,network-manager:modem-manager
26 network-manager:service network-manager:nmcli
27 :ppp network-manager
28
29id: modem_manager/modems/get_all
30category_id: modem_manager
31plugin: manual
32depends: modem_manager/setup/ensure_interface_connection_setup
33_summary: All active modem configuration items are listed
34_purpose:
35 Check if the modem shows up as being recognized by modem-manager.
36_steps:
37 1. Execute the following command to retrieve the list of all detected modems:
38 .
39 $ /snap/bin/modem-manager.mmcli -L
40_verification:
41 Your expected modem is shown in the output list.
42
43id: modem_manager/modems/get_info
44category_id: modem_manager
45plugin: manual
46depends: modem_manager/setup/ensure_interface_connection_setup
47_summary: All modem information listed
48_purpose:
49 Check if the modem details can be listed.
50_steps:
51 1. Execute the following command to retrieve the list of all detected modems.
52 Note, the modem number is listed from the previous test:
53 .
54 $ /snap/bin/modem-manager.mmcli -m <modem_number>
55_verification:
56 Your desired modem detail is listed.
57
58id: modem_manager/modems/connect
59category_id: modem_manager
60plugin: manual
61depends: modem_manager/setup/ensure_interface_connection_setup
62_summary: Connect to a listed modem
63_purpose:
64 Connect to a listed modem and verify connection status
65_steps:
66 1. Execute the following commands to connect to a particular modem.
67 Note, replace <interface> with something like "ttyACM3" (look in /dev).
68 You may also find it as the primary port when issuing the command:
69 /snap/bin/network-manager.nmcli -m <modem_number>
70 Also, replace <op_apn> by looking up the APN string for your cell provider
71 at http://www.apn-settings.com (e.g. "fast.t-mobile.com" for T-Mobile 4G).
72 Finally, not that "gsmconn" is an arbitrary connection name and can be set
73 to anything that makes sense for the connection type.
74 .
75 $ /snap/bin/network-manager.nmcli c add type gsm ifname <interface> con-name
76 gsmconn apn <op_apn>
77 $ /snap/bin/network-manager.nmcli r wwan on
78_verification:
79 Verify that you have a modem connection by pinging www.ubuntu.com.
diff --git a/tests/units/network-manager.pxu b/tests/units/network-manager.pxu
80deleted file mode 1006440deleted file mode 100644
index 6921aa7..0000000
--- a/tests/units/network-manager.pxu
+++ /dev/null
@@ -1,255 +0,0 @@
1# Copyright 2016 Canonical Ltd.
2# All rights reserved.
3#
4# Written by:
5# Lorn Potter <lorn.potter@canonical.com>
6# Simon Fels <simon.fels@canonical.com>
7
8unit: category
9id: network_manager
10_name: Network Manager
11
12id: network_manager/ethernet/all_ports_detected
13category_id: network_manager
14plugin: manual
15_summary: NetworkManager should detect all available ethernet ports
16_purpose:
17 NetworkManager should detect all available ethernet ports by default
18 on a system and list them as usable devices.
19_steps:
20 1. List all available ethernet ports
21 $ ifconfig -a | grep -E '$eth'
22 $ ifconfig -a | grep -E '$en'
23 2. List all ethernet ports NetworkManager knows about
24 $ network-manager.nmcli d
25_verification:
26 Both steps should show the same list of ethernet network interfaces.
27
28id: network_manager/ethernet/auto_connected
29category_id: network_manager
30plugin: manual
31_summary: NetworkManager should auto-connect any ethernet port with a link
32_purpose:
33 When a cable is plugged into an ethernet port NetworkManager should try
34 to automatically connect the port.
35 .
36 NOTE: This test assumes that the cable you plug into the port is connected
37 to a network which offers a DHCP server.
38_steps:
39 1. Ensure that there is no connection for the port you want to use for
40 testing. Using a serial console to perform this test is recommended.
41 2. Drop any existing connections listed by
42 $ network-manager.nmcli c show
43 which are meant for the ethernet port of the device with
44 $ network-manager.nmcli c delete <UUID>
45 3. Plug the cable into the ethernet port.
46_verification:
47 The ethernet port should be automatically connected by NetworkManager. This
48 can be verified with
49 $ network-manager.nmcli d | grep <ethernet device name>
50 eth0 ethernet connected <connection name>
51 Please note that the <connection name> can be different as its
52 automatically selected by NetworkManager. It can be "Wired Connection 1"
53 for example.
54
55id: network_manager/ethernet/auto_connect_existing_connection
56category_id: network_manager
57plugin: manual
58_summary: Cable plug/unplug should give an existing connection
59_purpose:
60 When a cable is unplugged and plugged again the ethernet port should
61 be automatically reconnected.
62_steps:
63 1. Check if the ethernet port is currently connected
64 $ network-manager.nmcli d
65 2. Unplug the cable from the ethernet port and check the connection
66 $ network-manager.nmcli d
67 3. Plug the cable again and check the connection status.
68_verification:
69 Before the cable is unplugged the ethernet port should be marked
70 as connected. Once the cable is removed the connection status
71 should switch to unconnected. When plugged back in, it should be marked
72 again as connected.
73
74id: network_manager/ethernet/unmanaged
75category_id: network_manager
76plugin: manual
77depends: network_manager/setup/ensure_interface_connection_setup
78_summary: Check if ethernet device is unmanaged.
79_purpose:
80 Check if the ethernet device is not managed by Network Manager.
81 .
82 NOTE: This only applies to device where ethernet is not managed by
83 NetworkManager. Check if /etc/netplan/00-default-nm-renderer.yaml
84 exists. If it does not, then NetworkManager doesn't touch any
85 ethernet connection.
86_steps:
87 1. Execute the following command to retrieve the list of all detected connections.
88 Note, the AP number is listed from the previous test:
89 .
90 $ /snap/bin/network-manager.nmcli d | grep en
91_verification:
92 The network device is listed as 'unmanaged', as an example:
93 enxb827ebf6b919 ethernet unmanaged --
94
95id: network_manager/connections/get_all
96category_id: network_manager
97plugin: manual
98depends: network_manager/setup/ensure_interface_connection_setup
99_summary: All active AP configuration items are listed
100_purpose:
101 Check if the AP shows up as being recognized by Network Manager.
102_steps:
103 1. Execute the following command to retrieve the list of all detected connections:
104 .
105 $ /snap/bin/network-manager.nmcli d wifi list
106_verification:
107 Your expected AP is shown in the output list for example:
108 pool1 Infra 6 54 Mbit/s 75 *** WPA2
109
110id: network_manager/connections/agent
111category_id: network_manager
112plugin: manual
113depends: network_manager/setup/ensure_interface_connection_setup
114_summary: Register for secret agent
115_purpose:
116 Register for Network Manager's secret agent and verify status
117_steps:
118 1. Execute the following command to register secret agent:
119 .
120 $ /snap/bin/network-manager.nmcli a
121_verification:
122 Output should be similiar to this:
123 nmcli successfully registered as a Network Manager's secret agent.
124 nmcli successfully registered as a polkit agent.
125
126id: network_manager/connections/connect
127category_id: network_manager
128plugin: manual
129depends: network_manager/setup/ensure_interface_connection_setup
130_summary: Connect to a listed AP
131_purpose:
132 Connect to a listed AP and verify connection status
133_steps:
134 1. Execute the following commands to connect to a particular AP.
135 .
136 $ /snap/bin/network-manager.nmcli dev wifi con "yourssid" password "yourpassword"
137 Note, replace yourssid with the ssid if the AP you will connect to, and replace yourpassword
138 with the actual password/passphrase.
139_verification:
140 Verify that you have a AP connection by issuing this command:
141 $ ifconfig | grep -A 2 wl
142 .
143 verifying that the interface has an IP address with output similiar to this:
144 wlp5s0 Link encap:Ethernet HWaddr 70:77:81:33:92:6b
145 inet addr:10.0.0.108 Bcast:10.0.0.255 Mask:255.255.255.0
146 inet6 addr: 2001:8003:6501:2000:c1b3:3359:d2a3:f2d1/64 Scope:Global
147
148id: network_manager/connections/get_info
149category_id: network_manager
150plugin: manual
151depends: network_manager/setup/ensure_interface_connection_setup
152_summary: All AP information listed
153_purpose:
154 Check if the AP details can be listed.
155_steps:
156 1. Execute the following command to retrieve the list of all detected connections.
157 Note, the AP ssid is listed from the previous test:
158 .
159 $ /snap/bin/network-manager.nmcli -p -f general,ip4,ip6 c show <AP_SSID>
160_verification:
161 Your desired AP detail is listed and has ip4/ip6 address.
162 ===============================================================================
163 Activate connection details (1554e3b2-76e6-4adc-b986-215b7393f8d9)
164 ===============================================================================
165 GENERAL.NAME: pool1
166 GENERAL.UUID: 1554e3b2-76e6-4adc-b986-215b7393f8d9
167 GENERAL.DEVICES: wlp5s0
168 GENERAL.STATE: activated
169 GENERAL.DEFAULT: no
170 GENERAL.DEFAULT6: no
171 GENERAL.VPN: no
172 GENERAL.ZONE: --
173 GENERAL.DBUS-PATH: /org/freedesktop/NetworkManager/ActiveConnection/2
174 GENERAL.CON-PATH: /org/freedesktop/NetworkManager/Settings/3
175 GENERAL.SPEC-OBJECT: /org/freedesktop/NetworkManager/AccessPoint/0
176 GENERAL.MASTER-PATH: --
177 -------------------------------------------------------------------------------
178 IP4.ADDRESS[1]: 10.0.0.108/24
179 IP4.GATEWAY: 10.0.0.138
180 IP4.DNS[1]: 10.0.0.138
181 IP4.DOMAIN[1]: gateway
182 -------------------------------------------------------------------------------
183 IP6.ADDRESS[1]: 2001:8003:6501:2000:c1b3:3359:d2a3:f2d1/64
184 IP6.ADDRESS[2]: 2001:8003:6501:2000:7277:81ff:fe33:926b/64
185 IP6.ADDRESS[3]: fe80::7277:81ff:fe33:926b/64
186 IP6.GATEWAY: fe80::e2b9:e5ff:fe5a:91b0
187 IP6.DNS[1]: 2001:8003:6501:2000::1
188 IP6.DOMAIN[1]: gateway
189 -------------------------------------------------------------------------------
190
191id: network_manager/ethernet/uses_global_wol
192category_id: network_manager
193plugin: manual
194_summary: Ethernet connections are using global wake-on-lan setting
195_purpose:
196 Check if an ethernet connection created by NetworkManager automatically uses the
197 global default for wake-on-lan.
198 .
199 NOTE: This requires a system which is configured to not use netplan to
200 generate connections for NetworkManager. On such a system an ethernet
201 connection will always have wake-on-lan disabled as netplan does this
202 by default if not explicitly stated in the netplan configuration.
203_steps:
204 1. Find connection UUID for the ethernet port
205 $ network-manager.nmcli c show | grep eth0
206 2. Verify the connection uses the global wake-on-lan setting
207 $ network-manager.nmcli -m multiline -f 802-3-ethernet.wake-on-lan c show <UUID>
208_verification:
209 The output should look like this:
210 .
211 802-3-ethernet.wake-on-lan: 1 (default)
212
213id: network_manager/ethernet/has_wol_enabled_by_default
214category_id: network_manager
215plugin: manual
216_summary: Ethernet port has wake-on-lan enabled by default
217_purpose:
218 Check if the actual ethernet device has wake-on-lan correctly enabled when
219 its connection is maintained by NetworkManager.
220_steps:
221 1. Install the se-test-tools snap
222 $ snap install --devmode --edge se-test-tools
223 2. Check the ethernet port for the wake-on-lan setting (eth0 in this case)
224 $ sudo se-test-tools.ethtool eth0
225_verification:
226 The output should be similar to this:
227 Settings for eth0:
228 [...]
229 Supports Wake-on: pumbg
230 Wake-on: g
231 [...]
232 .
233 The relevant line is the "Wake-on:" one. It should have the value "g"
234 set which marks the port as waking up on the magic packet.
235
236id: network_manager/ethernet/wakes_up_with_wol
237category_id: network_manager
238plugin: manual
239_summary: Wake on LAN configured by NetworkManager can wake up the device
240_purpose:
241 Check that another system can wake up from S5 the SUT using the connected ethernet port.
242_steps:
243 1. Ensure there is an ethernet cable attached to one of the ports and it's configured via
244 NetworkManager. Check with
245 $ network-manager.nmcli d | grep eth0
246 2. Note the MAC address of the the eth0 port
247 $ ifconfig eth0
248 3. Power off the system by running
249 $ sudo poweroff
250 4. From another computer on the same network run the following command:
251 $ wakeonlan {mac}
252 If wakeonlan tool is not installed run:
253 $ sudo apt install wakeonlan
254_verification:
255 Did the SUT wake up from S5?
diff --git a/tests/units/pulseaudio.pxu b/tests/units/pulseaudio.pxu
256deleted file mode 1006440deleted file mode 100644
index aeb81ab..0000000
--- a/tests/units/pulseaudio.pxu
+++ /dev/null
@@ -1,80 +0,0 @@
1# Copyright 2016 Canonical Ltd.
2# All rights reserved.
3#
4# Written by:
5# Konrad Zapalowicz <konrad.zapalowicz@canonical.com>
6
7unit: category
8id: pulseaudio
9_name: PulseAudio
10
11id: pulseaudio/setup/ensure_interface_connection_setup
12category_id: pulseaudio
13_description: Ensure that the pulseaudio interface is auto-connected
14plugin: manual
15_steps:
16 1. List the interfaces
17 .
18 $ snap interfaces
19 .
20_verification:
21 Verify that you see the following:
22 pulseaudio:service pulseaudio:client
23
24id: pulseaudio/pactl/ensure-modules-are-listed
25category_id: pulseaudio
26_description: Ensure that the correct modules are loaded
27plugin: manual
28depends: pulseaudio/setup/ensure_interface_connection_setup
29_steps:
30 1. List the loaded modules
31 .
32 $ pactl list short
33 .
34_verification:
35 Verify that you see output similar to following:
36 0 module-device-restore
37 1 module-stream-restore
38 2 module-card-restore
39 3 module-augment-properties
40 4 module-switch-on-port-available
41 5 module-udev-detect
42 ...
43 80 protocol-native.c pactl
44 0 alsa_card.pci-0000_00_1b.0 module-alsa-card.c
45
46 Verify that amongs the other the following modules are listed:
47 module-device-restore
48 module-stream-restore
49 module-card-restore
50 module-switch-on-port-available
51 module-rescue-streams
52 module-always-sink
53
54id: pulseaudio/parecord/ensure-audio-can-be-recorded
55category_id: pulseaudio
56_description: Ensure that it is possible to record audio
57plugin: manual
58depends: pulseaudio/setup/ensure_interface_connection_setup
59_steps:
60 1. Record an audio .wav file
61 .
62 $ parecord ~/record.wav
63 .
64_verification:
65 Verify that the record.wav file has been created and it's size is
66 greater than zero. Verify that the recorded file can be played and
67 it is possible to hear the audio.
68
69id: pulseaudio/paplay/ensure-audio-can-be-played
70category_id: pulseaudio
71_description: Ensure that it is possible to play auio files
72plugin: manual
73depends: pulseaudio/setup/ensure_interface_connection_setup
74_steps:
75 1. Play an audio .wav file
76 .
77 $ paplay ~/file.wav
78 .
79_verification:
80 Verify that the audio is hearable through the speakers.
diff --git a/tests/units/tpm1.2.pxu b/tests/units/tpm1.2.pxu
81deleted file mode 1006440deleted file mode 100644
index c5c18b8..0000000
--- a/tests/units/tpm1.2.pxu
+++ /dev/null
@@ -1,136 +0,0 @@
1# Copyright 2016 Canonical Ltd.
2# All rights reserved.
3#
4# Written by:
5# Scott Sweeny <scott.sweeny@canonical.com>
6
7unit: category
8id: tpm1.2
9_name: TPM 1.2
10
11id: tpm1.2/setup/ensure_interface_connection_setup
12category_id: tpm1.2
13_description: Ensure that the tpm1.2 interfaces are connected
14plugin: manual
15_steps:
16 1. Connect required tpm1.2 slots/plugs
17 .
18 $ sudo snap connect tpm:network ubuntu-core:network
19 $ sudo snap connect tpm:network-bind ubuntu-core:network-bind
20 $ sudo snap connect tpm:tpm ubuntu-core:tpm
21 .
22_verification:
23 Verify that you see the following when running snap interfaces:
24 :network tpm
25 :network-bind tpm
26 :tpm tpm
27
28id: tpm1.2/setup/get_version
29category_id: tpm1.2
30plugin: manual
31depends: tpm1.2/setup/ensure_interface_connection_setup
32_summary: Can get version information from the TPM chip
33_purpose:
34 Check that basic communication with the TPM chip is working and that version
35 information can be retrieved with the expected command.
36_steps:
37 1. Execute the following command to show the TPM version:
38 .
39 $ /snap/bin/tpm.version
40_verification:
41 Output is similar to below with all fields showing data:
42 .
43 �z TPM 1.2 Version Info:
44 Chip Version: 1.2.5.81
45 Spec Level: 2
46 Errata Revision: 3
47 TPM Vendor ID: WEC
48 Vendor Specific data: 0000
49 TPM Version: 01010000
50 Manufacturer Info: 57454300
51
52id: tpm1.2/setup/self_test
53category_id: tpm1.2
54plugin: manual
55depends: tpm1.2/setup/ensure_interface_connection_setup
56_summary: TPM self test runs successfully
57_purpose:
58 Check that the TPM self test runs successfully and returns no errors.
59_steps:
60 1. Execute the following command to run the TPM self test:
61 .
62 $ /snap/bin/tpm.selftest
63_verification:
64 Output is similar to below (actual values are not important) and no
65 error messages are shown:
66 .
67 TPM Test Results:
68 ff010205 51ffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
69 ffffffff ffffffff ffffffff ffff0000 00000000 00000000 00000000 00000000
70 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0000
71
72
73id: tpm1.2/configuration/take_ownership
74category_id: tpm1.2
75plugin: manual
76depends: tpm1.2/setup/ensure_interface_connection_setup
77_summary: Taking ownership of the device is possible
78_purpose:
79 Check that you are able to take ownership of the device using TPM commands.
80_steps:
81 1.Execute the following command to take ownership of the TPM chip:
82 .
83 $ /snap/bin/tpm.takeownership
84 .
85_verification:
86 Verify that you are prompted for both the owner key and the SRK (storage
87 root key) and that no errors are returned.
88 .
89 NOTE: This command will only work if it has not been run before. You can
90 reset the TPM with:
91 .
92 $ /snap/bin/tpm.clear
93 .
94 Which will invalidate all existing keys and passwords and disable the chip.
95 Once this is done you must re-enable the TPM from the device's BIOS before
96 it can be used.
97
98id: tpm1.2/crypto/show_public_key
99category_id: tpm1.2
100plugin: manual
101depends: tpm1.2/setup/ensure_interface_connection_setup
102_summary: Showing the public endorsement key succeeds
103_purpose:
104 Check to make sure that the endorsement key pair exists and the public key
105 can be queried.
106_steps:
107 1. Execute the following command to see the public key:
108 .
109 $ /snap/bin/tpm.getpubek
110 .
111 You may see an error similar to:
112 .
113 Tspi_TPM_GetPubEndorsementKey failed: 0x00000008 - layer=tpm, code=0008 (8), The TPM target command has been disabled
114 .
115 This can be safely ignored as long as the public key data is displayed.
116_verification:
117 Verify that the public key data is shown, for example:
118 .
119 Public Endorsement Key:
120 Version: 01010000
121 Usage: 0x0002 (Unknown)
122 Flags: 0x00000000 (!VOLATILE, !MIGRATABLE, !REDIRECTION)
123 AuthUsage: 0x00 (Never)
124 Algorithm: 0x00000020 (Unknown)
125 Encryption Scheme: 0x00000012 (Unknown)
126 Signature Scheme: 0x00000010 (Unknown)
127 Public Key:
128 8b59fad6 83514128 d56e2aa0 5eef7cff ad23c90d 0dd9b1e2 31ef093d 72d947d8
129 e02fbe3a 3c235ff0 9c487973 40a28c9b 8b83aaaf dc1254ad 31a95410 811742e5
130 92c16823 6f663413 f7067d3a 9af09ccc 12944a13 51d32980 59a98740 4008ab0c
131 07b7d93b 9393691c 8ae7d84c 5fd4fcef 147934f1 09326225 d5d1b652 ab3e12ee
132 fbd1cfba b18abedc de2215cb 97006b92 839fd9a4 3158bc8f 028fe516 550905b3
133 e3eef1e1 9f8dd3ab 331cbe62 d32ce937 0c11ad41 1d2e50f3 c69c7cde cd0bf564
134 4b7b16f8 0885dc66 d4411aba a824c1f1 ea8aa743 5c62fad7 e9540b85 5c0dc7af
135 3c1615ae 56af18e4 770aa107 06ef274b 202e2e3e d4c280d8 5ca9e886 9d889e31
136
diff --git a/tests/units/wifi-ap.pxu b/tests/units/wifi-ap.pxu
137deleted file mode 1006440deleted file mode 100644
index 78ee075..0000000
--- a/tests/units/wifi-ap.pxu
+++ /dev/null
@@ -1,111 +0,0 @@
1# Copyright 2016 Canonical Ltd.
2# All rights reserved.
3#
4# Written by:
5# Jim Hodapp <jim.hodapp@canonical.com>
6# Simon Fels <simon.fels@canonical.com>
7
8unit: category
9id: wifi_ap
10_name: WiFi Access Point
11
12id: wifi_ap/setup/ensure_interface_connection_setup
13category_id: wifi_ap
14_description: Ensure that the wifi_ap interfaces are connected
15plugin: manual
16_steps:
17 1. Connect required wifi_ap slots/plugs
18 .
19 $ sudo snap connect wifi-ap:firewall-control ubuntu-core:firewall-control
20 $ sudo snap connect wifi-ap:network-control ubuntu-core:network-control
21
22 For snaps on Classic:
23 $ sudo snap connect wifi-ap:network-manager ubuntu-core:network-manager
24
25 For full-snap based system (note that you need to install first
26 network-manager snap in this case):
27 $ sudo snap install network-manager
28 $ sudo snap connect wifi-ap:network-manager network-manager:service
29 .
30_verification:
31 Verify that you see the following when running snap interfaces:
32 :network-bind wifi-ap
33 :network-control wifi-ap
34
35 For snaps on Classic:
36 :network-manager wifi-ap
37
38 For full-snap based system:
39 network-manager:service wifi-ap:network-manager
40
41id: wifi_ap/configuration/get_all
42category_id: wifi_ap
43plugin: manual
44depends: wifi_ap/setup/ensure_interface_connection_setup
45_summary: All WiFi AP configuration items are listed
46_purpose:
47 Check if the configuration of the WiFi AP can be listed
48 with the expected command.
49_steps:
50 1. Execute the following command to retrieve all configuration items:
51 .
52 $ /snap/bin/wifi-ap.config get
53_verification:
54 All available configuration items are listed as output.
55
56id: wifi_ap/configuration/set_any
57category_id: wifi_ap
58plugin: manual
59depends: wifi_ap/setup/ensure_interface_connection_setup
60_summary: Setting any configuration key is possible
61_purpose:
62 Check if any configuration key can be set via the
63 configuration system of the snap.
64_steps:
65 1. Retrieve the current value of a specific configuration item
66 e.g. 'wifi.interface'.
67 .
68 $ /snap/bin/wifi-ap.config get wifi.interface
69 .
70 2. Set a new value for the same configuration item
71 .
72 $ sudo /snap/bin/wifi-ap.config set wifi.interface wlan1
73 .
74 3. Retrieve the current value of the same configuration item
75 for comparison.
76 .
77 $ /snap/bin/wifi-ap.config get wifi.interface
78_verification:
79 Verify that the new value for the configuration is not the same
80 as before the 'set' operation and is now the the value specified
81 in step 2.
82
83id: wifi_ap/connect/enable_ap
84category_id: wifi_ap
85plugin: manual
86depends: wifi_ap/setup/ensure_interface_connection_setup
87_summary: Enabling the AP succeeds
88_purpose:
89 Check to make sure the AP can be enabled.
90_steps:
91 1. Look up and set the wifi interface to the proper name
92 e.g. from default wlan0 to enp0s3
93 .
94 $ ifconfig
95 $ /snap/bin/wifi-ap.config set wifi.interface <interface_name>
96 .
97 2. Enable the AP with the default configuration for other key values
98 .
99 $ sudo /snap/bin/wifi-ap.config set disabled 0
100 .
101 3. Restart the wifi-ap systemd service to complete the enabling
102 .
103 $ sudo systemctl restart snap.wifi-ap.backend
104 .
105 4. Verify that the AP is enabled by looking at the key/value pair
106 .
107 $ /snap/bin/wifi-ap.config get disabled
108_verification:
109 Verify that the new value for the disabled is set to 0. Also verify that a
110 different machine such as a phone or a laptop can connect to the AP using
111 SSID of "Ubuntu" and no security type.
diff --git a/tests/units/wireless-tools.pxu b/tests/units/wireless-tools.pxu
112deleted file mode 1006440deleted file mode 100644
index 3c59f13..0000000
--- a/tests/units/wireless-tools.pxu
+++ /dev/null
@@ -1,102 +0,0 @@
1# Copyright 2016 Canonical Ltd.
2# All rights reserved.
3#
4# Written by:
5# Konrad Zapalowicz <konrad.zapalowicz@canonical.com>
6
7unit: category
8id:wireless-tools
9_name: Wireless Tools
10
11id: wireless-tools/setup/ensure_interface_connection_setup
12category_id: wireless-tools
13_description: Ensure that wireless_tools interfaces are connected
14plugin: manual
15_steps:
16 1. Connect required wireless-tools slots/plugs
17 .
18 $ sudo snap connect wireless-tools:network-control :network-control
19 .
20_verification:
21 Verify that you see the following when running snap interfaces:
22 :network wireless-tools
23 :network-bind wireless-tools
24 :network-control wireless-tools
25
26id: wireless-tools/rfkill/list
27category_id:wireless-tools
28plugin: manual
29depends: wireless-tools/setup/ensure_interface_connection_setup
30_summary: The RF kill switches are listed
31_purpose: Check if all RF kill switches that are available on the HW are listed.
32_steps:
33 1. Execute the following command to retrieve the list of all RF kill switches:
34 .
35 $ /snap/bin/wireless-tools.rfkill list
36 .
37_verification:
38 Your expected RF kill switche(s) is/are shown in the output such as:
39 <id>: <name>: <description>
40 Soft blocked: <yes|no>
41 Hard blocked: <yes|no>
42
43 For example:
44 1: phy0: Wireless LAN
45 Soft blocked: no
46 Hard blocked: no
47 2: hci0: Bluetooth
48 Soft blocked: yes
49 Hard blocked: no
50
51id: wireless-tools/rfkill/change_state
52category_id:wireless-tools
53plugin: manual
54depends: wireless-tools/rfkill/list
55_summary: It is possible to change the state of RF kill
56_purpose: Check if it is possible to change a state of the RF kill switch
57_steps:
58 1. Execute the following commands first to list the available RF kill switches
59 .
60 $ /snap/bin/wireles-tools.rfkill list
61 .
62 2. Change the state of the selected RF kill switch using the id obtained in
63 the previous step. Note that the action: block or unblock shall be selected
64 based on the initial state of the RF kill switch: blocked yes or no.
65 .
66 $ /snap/bin/wireless-tools.rfkill [un]block <id>
67 .
68_verification:
69 There shall be no output on the standard output however there shall be a
70 change of state visible when listing the RF kill switches.
71 .
72 $ /snap/bin/wireless_tools.rfkill list
73 .
74
75id: wireless_tools/rfkill/capture_event
76category_id: wireless-tools
77plugin: manual
78depends: wireless-tools/rfkill/list
79_summary: It is possible to see the events related to RF kill switch(es)
80_purpose: Check if it is possible to capture the event notifications
81_steps:
82 1. Execute the following command to enter the capture-events mode
83 .
84 $ /snap/bin/wireless_tools.rfkill event
85 .
86 2. Change the state of the RF kill switch using a hardware button if
87 available.
88_verification:
89 The command executed in the step 1 shall block and display the current state
90 of the RF kill switches in a following form:
91 <timestamp>: idx <id> type <type id> op <op id> soft <0|1> hard <0|1>
92 Pressing the hardware RF kill switch should be printed in the following
93 form as in the above. For example:
94 1478774281.491635: idx 0 type 2 op 0 soft 0 hard 0
95 1478774281.491762: idx 1 type 1 op 0 soft 0 hard 0
96 1478774281.491776: idx 2 type 2 op 0 soft 1 hard 0
97 1478774301.905695: idx 2 type 2 op 2 soft 0 hard 0
98 1478774307.837112: idx 0 type 2 op 2 soft 1 hard 0
99 1478774310.817935: idx 2 type 2 op 2 soft 1 hard 0
100 1478774310.818989: idx 2 type 2 op 1 soft 1 hard 0
101
102
diff --git a/tpm/manage.py b/tpm/manage.py
103new file mode 1007550new file mode 100755
index 0000000..7135842
--- /dev/null
+++ b/tpm/manage.py
@@ -0,0 +1,10 @@
1#!/usr/bin/env python3
2from plainbox.provider_manager import setup, N_
3
4setup(
5 name='plainbox-provider-tpm',
6 namespace='2016.com.canonical.tpm',
7 version="1.0",
8 description=N_("Plainbox provider for the TPM snap"),
9 gettext_domain="2016_com_canonical_tpm",
10)
diff --git a/tpm/units/tpm.pxu b/tpm/units/tpm.pxu
0new file mode 10064411new file mode 100644
index 0000000..cbbf256
--- /dev/null
+++ b/tpm/units/tpm.pxu
@@ -0,0 +1,135 @@
1# Copyright 2016 Canonical Ltd.
2# All rights reserved.
3#
4# Written by:
5# Scott Sweeny <scott.sweeny@canonical.com>
6
7unit: category
8id: tpm1.2
9_name: TPM 1.2
10
11id: tpm1.2/setup/ensure_interface_connection_setup
12category_id: tpm1.2
13_description: Ensure that the tpm1.2 interfaces are connected
14plugin: manual
15_steps:
16 1. Connect required tpm1.2 slots/plugs
17 .
18 $ sudo snap connect tpm:network ubuntu-core:network
19 $ sudo snap connect tpm:network-bind ubuntu-core:network-bind
20 $ sudo snap connect tpm:tpm ubuntu-core:tpm
21 .
22_verification:
23 Verify that you see the following when running snap interfaces:
24 :network tpm
25 :network-bind tpm
26 :tpm tpm
27
28id: tpm1.2/setup/get_version
29category_id: tpm1.2
30plugin: manual
31depends: tpm1.2/setup/ensure_interface_connection_setup
32_summary: Can get version information from the TPM chip
33_purpose:
34 Check that basic communication with the TPM chip is working and that version
35 information can be retrieved with the expected command.
36_steps:
37 1. Execute the following command to show the TPM version:
38 .
39 $ /snap/bin/tpm.version
40_verification:
41 Output is similar to below with all fields showing data:
42 .
43 TPM 1.2 Version Info:
44 Chip Version: 1.2.5.81
45 Spec Level: 2
46 Errata Revision: 3
47 TPM Vendor ID: WEC
48 Vendor Specific data: 0000
49 TPM Version: 01010000
50 Manufacturer Info: 57454300
51
52id: tpm1.2/setup/self_test
53category_id: tpm1.2
54plugin: manual
55depends: tpm1.2/setup/ensure_interface_connection_setup
56_summary: TPM self test runs successfully
57_purpose:
58 Check that the TPM self test runs successfully and returns no errors.
59_steps:
60 1. Execute the following command to run the TPM self test:
61 .
62 $ /snap/bin/tpm.selftest
63_verification:
64 Output is similar to below (actual values are not important) and no
65 error messages are shown:
66 .
67 TPM Test Results:
68 ff010205 51ffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
69 ffffffff ffffffff ffffffff ffff0000 00000000 00000000 00000000 00000000
70 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0000
71
72
73id: tpm1.2/configuration/take_ownership
74category_id: tpm1.2
75plugin: manual
76depends: tpm1.2/setup/ensure_interface_connection_setup
77_summary: Taking ownership of the device is possible
78_purpose:
79 Check that you are able to take ownership of the device using TPM commands.
80_steps:
81 1.Execute the following command to take ownership of the TPM chip:
82 .
83 $ /snap/bin/tpm.takeownership
84 .
85_verification:
86 Verify that you are prompted for both the owner key and the SRK (storage
87 root key) and that no errors are returned.
88 .
89 NOTE: This command will only work if it has not been run before. You can
90 reset the TPM with:
91 .
92 $ /snap/bin/tpm.clear
93 .
94 Which will invalidate all existing keys and passwords and disable the chip.
95 Once this is done you must re-enable the TPM from the device's BIOS before
96 it can be used.
97
98id: tpm1.2/crypto/show_public_key
99category_id: tpm1.2
100plugin: manual
101depends: tpm1.2/setup/ensure_interface_connection_setup
102_summary: Showing the public endorsement key succeeds
103_purpose:
104 Check to make sure that the endorsement key pair exists and the public key
105 can be queried.
106_steps:
107 1. Execute the following command to see the public key:
108 .
109 $ /snap/bin/tpm.getpubek
110 .
111 You may see an error similar to:
112 .
113 Tspi_TPM_GetPubEndorsementKey failed: 0x00000008 - layer=tpm, code=0008 (8), The TPM target command has been disabled
114 .
115 This can be safely ignored as long as the public key data is displayed.
116_verification:
117 Verify that the public key data is shown, for example:
118 .
119 Public Endorsement Key:
120 Version: 01010000
121 Usage: 0x0002 (Unknown)
122 Flags: 0x00000000 (!VOLATILE, !MIGRATABLE, !REDIRECTION)
123 AuthUsage: 0x00 (Never)
124 Algorithm: 0x00000020 (Unknown)
125 Encryption Scheme: 0x00000012 (Unknown)
126 Signature Scheme: 0x00000010 (Unknown)
127 Public Key:
128 8b59fad6 83514128 d56e2aa0 5eef7cff ad23c90d 0dd9b1e2 31ef093d 72d947d8
129 e02fbe3a 3c235ff0 9c487973 40a28c9b 8b83aaaf dc1254ad 31a95410 811742e5
130 92c16823 6f663413 f7067d3a 9af09ccc 12944a13 51d32980 59a98740 4008ab0c
131 07b7d93b 9393691c 8ae7d84c 5fd4fcef 147934f1 09326225 d5d1b652 ab3e12ee
132 fbd1cfba b18abedc de2215cb 97006b92 839fd9a4 3158bc8f 028fe516 550905b3
133 e3eef1e1 9f8dd3ab 331cbe62 d32ce937 0c11ad41 1d2e50f3 c69c7cde cd0bf564
134 4b7b16f8 0885dc66 d4411aba a824c1f1 ea8aa743 5c62fad7 e9540b85 5c0dc7af
135 3c1615ae 56af18e4 770aa107 06ef274b 202e2e3e d4c280d8 5ca9e886 9d889e31
diff --git a/wifi-ap/manage.py b/wifi-ap/manage.py
0new file mode 100755136new file mode 100755
index 0000000..824585c
--- /dev/null
+++ b/wifi-ap/manage.py
@@ -0,0 +1,10 @@
1#!/usr/bin/env python3
2from plainbox.provider_manager import setup, N_
3
4setup(
5 name='plainbox-provider-wifi-ap',
6 namespace='2016.com.canonical.wifi-ap',
7 version="1.0",
8 description=N_("Plainbox provider for the WiFi AP snap"),
9 gettext_domain="2016_com_canonical_wifi_ap",
10)
diff --git a/wifi-ap/units/wifi-ap.pxu b/wifi-ap/units/wifi-ap.pxu
0new file mode 10064411new file mode 100644
index 0000000..ae198ef
--- /dev/null
+++ b/wifi-ap/units/wifi-ap.pxu
@@ -0,0 +1,111 @@
1# Copyright 2016 Canonical Ltd.
2# All rights reserved.
3#
4# Written by:
5# Jim Hodapp <jim.hodapp@canonical.com>
6# Simon Fels <simon.fels@canonical.com>
7
8unit: category
9id: wifi_ap
10_name: WiFi Access Point
11
12id: wifi_ap/setup/ensure_interface_connection_setup
13category_id: wifi_ap
14_description: Ensure that the wifi_ap interfaces are connected
15plugin: manual
16_steps:
17 1. Connect required wifi_ap slots/plugs
18 .
19 $ sudo snap connect wifi-ap:firewall-control ubuntu-core:firewall-control
20 $ sudo snap connect wifi-ap:network-control ubuntu-core:network-control
21 .
22 For snaps on Classic:
23 $ sudo snap connect wifi-ap:network-manager ubuntu-core:network-manager
24 .
25 For full-snap based system (note that you need to install first
26 network-manager snap in this case):
27 $ sudo snap install network-manager
28 $ sudo snap connect wifi-ap:network-manager network-manager:service
29 .
30_verification:
31 Verify that you see the following when running snap interfaces:
32 :network-bind wifi-ap
33 :network-control wifi-ap
34 .
35 For snaps on Classic:
36 :network-manager wifi-ap
37 .
38 For full-snap based system:
39 network-manager:service wifi-ap:network-manager
40
41id: wifi_ap/configuration/get_all
42category_id: wifi_ap
43plugin: manual
44depends: wifi_ap/setup/ensure_interface_connection_setup
45_summary: All WiFi AP configuration items are listed
46_purpose:
47 Check if the configuration of the WiFi AP can be listed
48 with the expected command.
49_steps:
50 1. Execute the following command to retrieve all configuration items:
51 .
52 $ /snap/bin/wifi-ap.config get
53_verification:
54 All available configuration items are listed as output.
55
56id: wifi_ap/configuration/set_any
57category_id: wifi_ap
58plugin: manual
59depends: wifi_ap/setup/ensure_interface_connection_setup
60_summary: Setting any configuration key is possible
61_purpose:
62 Check if any configuration key can be set via the
63 configuration system of the snap.
64_steps:
65 1. Retrieve the current value of a specific configuration item
66 e.g. 'wifi.interface'.
67 .
68 $ /snap/bin/wifi-ap.config get wifi.interface
69 .
70 2. Set a new value for the same configuration item
71 .
72 $ sudo /snap/bin/wifi-ap.config set wifi.interface wlan1
73 .
74 3. Retrieve the current value of the same configuration item
75 for comparison.
76 .
77 $ /snap/bin/wifi-ap.config get wifi.interface
78_verification:
79 Verify that the new value for the configuration is not the same
80 as before the 'set' operation and is now the the value specified
81 in step 2.
82
83id: wifi_ap/connect/enable_ap
84category_id: wifi_ap
85plugin: manual
86depends: wifi_ap/setup/ensure_interface_connection_setup
87_summary: Enabling the AP succeeds
88_purpose:
89 Check to make sure the AP can be enabled.
90_steps:
91 1. Look up and set the wifi interface to the proper name
92 e.g. from default wlan0 to enp0s3
93 .
94 $ ifconfig
95 $ /snap/bin/wifi-ap.config set wifi.interface <interface_name>
96 .
97 2. Enable the AP with the default configuration for other key values
98 .
99 $ sudo /snap/bin/wifi-ap.config set disabled 0
100 .
101 3. Restart the wifi-ap systemd service to complete the enabling
102 .
103 $ sudo systemctl restart snap.wifi-ap.backend
104 .
105 4. Verify that the AP is enabled by looking at the key/value pair
106 .
107 $ /snap/bin/wifi-ap.config get disabled
108_verification:
109 Verify that the new value for the disabled is set to 0. Also verify that a
110 different machine such as a phone or a laptop can connect to the AP using
111 SSID of "Ubuntu" and no security type.
diff --git a/wireless-tools/manage.py b/wireless-tools/manage.py
0new file mode 100755112new file mode 100755
index 0000000..93a5a14
--- /dev/null
+++ b/wireless-tools/manage.py
@@ -0,0 +1,10 @@
1#!/usr/bin/env python3
2from plainbox.provider_manager import setup, N_
3
4setup(
5 name='plainbox-provider-wireless-tools',
6 namespace='2016.com.canonical.wireless-tools',
7 version="1.0",
8 description=N_("Plainbox provider for the Wireless tools snap"),
9 gettext_domain="2016_com_canonical_wireless_tools",
10)
diff --git a/wireless-tools/units/wireless-tools.pxu b/wireless-tools/units/wireless-tools.pxu
0new file mode 10064411new file mode 100644
index 0000000..39c070e
--- /dev/null
+++ b/wireless-tools/units/wireless-tools.pxu
@@ -0,0 +1,100 @@
1# Copyright 2016 Canonical Ltd.
2# All rights reserved.
3#
4# Written by:
5# Konrad Zapalowicz <konrad.zapalowicz@canonical.com>
6
7unit: category
8id:wireless-tools
9_name: Wireless Tools
10
11id: wireless-tools/setup/ensure_interface_connection_setup
12category_id: wireless-tools
13_description: Ensure that wireless_tools interfaces are connected
14plugin: manual
15_steps:
16 1. Connect required wireless-tools slots/plugs
17 .
18 $ sudo snap connect wireless-tools:network-control :network-control
19 .
20_verification:
21 Verify that you see the following when running snap interfaces:
22 :network wireless-tools
23 :network-bind wireless-tools
24 :network-control wireless-tools
25
26id: wireless-tools/rfkill/list
27category_id:wireless-tools
28plugin: manual
29depends: wireless-tools/setup/ensure_interface_connection_setup
30_summary: The RF kill switches are listed
31_purpose: Check if all RF kill switches that are available on the HW are listed.
32_steps:
33 1. Execute the following command to retrieve the list of all RF kill switches:
34 .
35 $ /snap/bin/wireless-tools.rfkill list
36 .
37_verification:
38 Your expected RF kill switche(s) is/are shown in the output such as:
39 <id>: <name>: <description>
40 Soft blocked: <yes|no>
41 Hard blocked: <yes|no>
42 .
43 For example:
44 1: phy0: Wireless LAN
45 Soft blocked: no
46 Hard blocked: no
47 2: hci0: Bluetooth
48 Soft blocked: yes
49 Hard blocked: no
50
51id: wireless-tools/rfkill/change_state
52category_id:wireless-tools
53plugin: manual
54depends: wireless-tools/rfkill/list
55_summary: It is possible to change the state of RF kill
56_purpose: Check if it is possible to change a state of the RF kill switch
57_steps:
58 1. Execute the following commands first to list the available RF kill switches
59 .
60 $ /snap/bin/wireles-tools.rfkill list
61 .
62 2. Change the state of the selected RF kill switch using the id obtained in
63 the previous step. Note that the action: block or unblock shall be selected
64 based on the initial state of the RF kill switch: blocked yes or no.
65 .
66 $ /snap/bin/wireless-tools.rfkill [un]block <id>
67 .
68_verification:
69 There shall be no output on the standard output however there shall be a
70 change of state visible when listing the RF kill switches.
71 .
72 $ /snap/bin/wireless_tools.rfkill list
73 .
74
75id: wireless_tools/rfkill/capture_event
76category_id: wireless-tools
77plugin: manual
78depends: wireless-tools/rfkill/list
79_summary: It is possible to see the events related to RF kill switch(es)
80_purpose: Check if it is possible to capture the event notifications
81_steps:
82 1. Execute the following command to enter the capture-events mode
83 .
84 $ /snap/bin/wireless_tools.rfkill event
85 .
86 2. Change the state of the RF kill switch using a hardware button if
87 available.
88_verification:
89 The command executed in the step 1 shall block and display the current state
90 of the RF kill switches in a following form:
91 <timestamp>: idx <id> type <type id> op <op id> soft <0|1> hard <0|1>
92 Pressing the hardware RF kill switch should be printed in the following
93 form as in the above. For example:
94 1478774281.491635: idx 0 type 2 op 0 soft 0 hard 0
95 1478774281.491762: idx 1 type 1 op 0 soft 0 hard 0
96 1478774281.491776: idx 2 type 2 op 0 soft 1 hard 0
97 1478774301.905695: idx 2 type 2 op 2 soft 0 hard 0
98 1478774307.837112: idx 0 type 2 op 2 soft 1 hard 0
99 1478774310.817935: idx 2 type 2 op 2 soft 1 hard 0
100 1478774310.818989: idx 2 type 2 op 1 soft 1 hard 0

Subscribers

People subscribed via source and target branches

to all changes: