summaryrefslogtreecommitdiff
path: root/units/wireless
diff options
authorJonathan Cave <jonathan.cave@canonical.com>2019-08-20 17:32:31 +0100
committerJonathan Cave <jonathan.cave@canonical.com>2019-08-21 11:04:44 +0100
commitfffcbfa5fce01193f5b3428049d56b9d8de7f34e (patch)
tree45f9957aab976f483fc72d26682e9d09ced47323 /units/wireless
parent17a4c5cc4e749aeba60b1a6e34fae693437a86f4 (diff)
wireless: import from p-p-snappy
Diffstat (limited to 'units/wireless')
-rw-r--r--units/wireless/category.pxu7
-rw-r--r--units/wireless/test-plan.pxu265
-rw-r--r--units/wireless/wifi-ap.pxu1081
-rw-r--r--units/wireless/wireless-connection-manual.pxu171
-rw-r--r--units/wireless/wowlan.pxu165
5 files changed, 1689 insertions, 0 deletions
diff --git a/units/wireless/category.pxu b/units/wireless/category.pxu
new file mode 100644
index 0000000..cc219d9
--- /dev/null
+++ b/units/wireless/category.pxu
@@ -0,0 +1,7 @@
+unit: category
+id: wifi
+_name: Wi-Fi
+
+unit: category
+id: wifi_ap
+_name: Wi-Fi access point
diff --git a/units/wireless/test-plan.pxu b/units/wireless/test-plan.pxu
index 8b4aafe..5d97b5a 100644
--- a/units/wireless/test-plan.pxu
+++ b/units/wireless/test-plan.pxu
@@ -108,3 +108,268 @@ include:
after-suspend-manual-wireless/wireless_connection_wpa_ac_nm_.* certification-status=blocker
after-suspend-manual-wireless/wireless_connection_open_ac_nm_.* certification-status=blocker
after-suspend-manual-wireless/nm_connection_restore_.*
+
+id: wireless-full
+unit: test plan
+_name: Wireless tests
+_description: QA tests for wireless connections
+estimated_duration: 30m
+include:
+nested_part:
+ wireless-manual
+ wireless-automated
+
+id: wireless-manual
+unit: test plan
+_name: Manual tests for wireless
+_description: Manual tests wireless
+include:
+ # following matchers may also include some automated jobs, this could be
+ # fixed with some regex magic, but the lesser evil seems to be just to
+ # include them as well; XXX: the test plan is not really manual-only
+ wireless/wireless_connection_open_ac_.*
+ wireless/wireless_connection_open_bg_.*
+ wireless/wireless_connection_open_n_.*
+ wireless/wireless_connection_wpa_ac_.*
+ wireless/wireless_connection_wpa_bg_.*
+ wireless/wireless_connection_wpa_n_.*
+
+id: wireless-automated
+unit: test plan
+_name: Automated tests for wireless
+_description:
+ Automated connection tests for unencrypted or WPA-encrypted 802.11 bg, n, ac
+ networks.
+include:
+ wireless/detect
+ wireless/wireless_scanning_.*
+ wireless/wireless_connection_open_ac_nm_.*
+ wireless/wireless_connection_open_bg_nm_.*
+ wireless/wireless_connection_open_n_nm_.*
+ wireless/wireless_connection_wpa_ac_nm_.*
+ wireless/wireless_connection_wpa_bg_nm_.*
+ wireless/wireless_connection_wpa_n_nm_.*
+ # wireless/wireless_connection_open_ac_np_.*
+ # wireless/wireless_connection_open_bg_np_.*
+ # wireless/wireless_connection_open_n_np_.*
+ # wireless/wireless_connection_wpa_ac_np_.*
+ # wireless/wireless_connection_wpa_bg_np_.*
+ # wireless/wireless_connection_wpa_n_np_.*
+bootstrap_include:
+ device
+
+id: wireless-netplan-automated
+unit: test plan
+_name: Automated tests for wireless using netplan
+_description:
+ Automated connection tests for unencrypted or WPA-encrypted 802.11 bg, n, ac
+ networks using netplan.
+include:
+ wireless/detect
+ # wireless/wireless_scanning_.*
+ # wireless/wireless_connection_open_ac_nm_.*
+ # wireless/wireless_connection_open_bg_nm_.*
+ # wireless/wireless_connection_open_n_nm_.*
+ # wireless/wireless_connection_wpa_ac_nm_.*
+ # wireless/wireless_connection_wpa_bg_nm_.*
+ # wireless/wireless_connection_wpa_n_nm_.*
+ wireless/wireless_connection_open_ac_np_.*
+ wireless/wireless_connection_open_bg_np_.*
+ wireless/wireless_connection_open_n_np_.*
+ wireless/wireless_connection_wpa_ac_np_.*
+ wireless/wireless_connection_wpa_bg_np_.*
+ wireless/wireless_connection_wpa_n_np_.*
+bootstrap_include:
+ device
+
+
+# not suffixing with "-full" for backwards compatibility
+id: wireless-wifi-master-mode
+unit: test plan
+_name: QA tests for wifi master mode
+_description:
+ System as Access Point tests
+include:
+ wireless/wifi_ap_.*
+exclude:
+ wireless/wifi_ap_across_reboot_.*_setup
+ wireless/wifi_ap_across_reboot_.*_check
+bootstrap_include:
+ device
+ wifi_interface_mode
+
+id: wireless-wifi-master-mode-manual
+unit: test plan
+_name: QA tests for wifi master mode
+_description:
+ System as Access Point tests
+include:
+ wireless/wifi_ap_open_b_no_sta_.*_manual
+ wireless/wifi_ap_open_g_no_sta_.*_manual
+ wireless/wifi_ap_wpa_b_no_sta_.*_manual
+ wireless/wifi_ap_wpa_g_no_sta_.*_manual
+ wireless/wifi_ap_wpa_b_with_sta_.*_manual
+ wireless/wifi_ap_wpa_g_with_sta_.*_manual
+bootstrap_include:
+ device
+ wifi_interface_mode
+
+id: wireless-wifi-master-mode-auto
+unit: test plan
+_name: Automated tests for wifi master mode
+_description:
+ Automated tests for using System as Access Point
+include:
+ wireless/wifi_ap_open_b_no_sta_.*_auto
+ wireless/wifi_ap_open_g_no_sta_.*_auto
+ wireless/wifi_ap_wpa_b_no_sta_.*_auto
+ wireless/wifi_ap_wpa_g_no_sta_.*_auto
+ wireless/wifi_ap_wpa_b_with_sta_.*_auto
+ wireless/wifi_ap_wpa_g_with_sta_.*_auto
+ wireless/wifi_ap_setup_wizard_.*_auto
+bootstrap_include:
+ device
+ wifi_interface_mode
+
+# not suffixing with "-full" for backwards compatibility
+id: after-suspend-wireless-wifi-master-mode
+unit: test plan
+_name: QA tests for wifi master mode (after suspend)
+_description:
+ System as Access Point tests
+include:
+ after-suspend-wireless/wifi_ap_.*
+bootstrap_include:
+ device
+
+id: after-suspend-wireless-wifi-master-mode-manual
+unit: test plan
+_name: QA tests for wifi master mode (after suspend)
+_description:
+ System as Access Point tests
+include:
+ after-suspend-wireless/wifi_ap_open_b_no_sta_.*_manual
+ after-suspend-wireless/wifi_ap_open_g_no_sta_.*_manual
+ after-suspend-wireless/wifi_ap_wpa_b_no_sta_.*_manual
+ after-suspend-wireless/wifi_ap_wpa_g_no_sta_.*_manual
+ after-suspend-wireless/wifi_ap_wpa_b_with_sta_.*_manual
+ after-suspend-wireless/wifi_ap_wpa_g_with_sta_.*_manual
+bootstrap_include:
+ device
+ wifi_interface_mode
+
+id: after-suspend-wireless-wifi-master-mode-auto
+unit: test plan
+_name: QA tests for wifi master mode (after suspend)
+_description:
+ System as Access Point tests
+include:
+ after-suspend-wireless/wifi_ap_open_b_no_sta_.*_auto
+ after-suspend-wireless/wifi_ap_open_g_no_sta_.*_auto
+ after-suspend-wireless/wifi_ap_wpa_b_no_sta_.*_auto
+ after-suspend-wireless/wifi_ap_wpa_g_no_sta_.*_auto
+ after-suspend-wireless/wifi_ap_wpa_b_with_sta_.*_auto
+ after-suspend-wireless/wifi_ap_wpa_g_with_sta_.*_auto
+ after-suspend-wireless/wifi_ap_setup_wizard_.*_auto
+bootstrap_include:
+ device
+ wifi_interface_mode
+
+id: wireless-wowlan-full
+unit: test plan
+_name: QA tests for WoWLAN
+_description:
+ Wake on Wireless LAN (WoWLAN) tests
+include:
+nested_part:
+ wireless-wowlan-manual
+ wireless-wowlan-automated
+
+id: wireless-wowlan-manual
+unit: test plan
+_name: Manual QA tests for WoWLAN
+_description:
+ Manual Wake on Wireless LAN (WoWLAN) tests
+include:
+ wireless/wowlan_.*
+bootstrap_include:
+ device
+
+id: wireless-wowlan-automated
+unit: test plan
+_name: Automated QA tests for WoWLAN
+_description:
+ Automated Wake on Wireless LAN (WoWLAN) tests
+include:
+
+id: after-suspend-wireless-full
+unit: test plan
+_name: Wireless tests (after suspend)
+_description: QA tests for wireless connections
+estimated_duration: 30m
+include:
+nested_part:
+ after-suspend-wireless-manual
+ after-suspend-wireless-automated
+
+id: after-suspend-wireless-manual
+unit: test plan
+_name: Manual tests for wireless (after suspend)
+_description: Manual tests wireless
+include:
+ # following matchers may also include some automated jobs, this could be
+ # fixed with some regex magic, but the lesser evil seems to be just to
+ # include them as well; XXX: the test plan is not really manual-only
+ after-suspend-wireless/wireless_connection_open_ac_.*
+ after-suspend-wireless/wireless_connection_open_bg_.*
+ after-suspend-wireless/wireless_connection_open_n_.*
+ after-suspend-wireless/wireless_connection_wpa_ac_.*
+ after-suspend-wireless/wireless_connection_wpa_bg_.*
+ after-suspend-wireless/wireless_connection_wpa_n_.*
+ after-suspend-wireless/wifi_ap_.*
+
+id: after-suspend-wireless-automated
+unit: test plan
+_name: Automated tests for wireless (after suspend)
+_description:
+ Automated connection tests for unencrypted or WPA-encrypted 802.11 bg, n, ac
+ networks.
+include:
+ after-suspend-wireless/wireless_scanning_.*
+ after-suspend-wireless/wireless_connection_open_ac_nm_.*
+ after-suspend-wireless/wireless_connection_open_bg_nm_.*
+ after-suspend-wireless/wireless_connection_open_n_nm_.*
+ after-suspend-wireless/wireless_connection_wpa_ac_nm_.*
+ after-suspend-wireless/wireless_connection_wpa_bg_nm_.*
+ after-suspend-wireless/wireless_connection_wpa_n_nm_.*
+ # after-suspend-wireless/wireless_connection_open_ac_np_.*
+ # after-suspend-wireless/wireless_connection_open_bg_np_.*
+ # after-suspend-wireless/wireless_connection_open_n_np_.*
+ # after-suspend-wireless/wireless_connection_wpa_ac_np_.*
+ # after-suspend-wireless/wireless_connection_wpa_bg_np_.*
+ # after-suspend-wireless/wireless_connection_wpa_n_np_.*
+bootstrap_include:
+ device
+
+id: after-suspend-wireless-netplan-automated
+unit: test plan
+_name: Automated tests for wireless using netplan (after suspend)
+_description:
+ Automated connection tests for unencrypted or WPA-encrypted 802.11 bg, n, ac
+ networks using netplan.
+include:
+ # after-suspend-wireless/wireless_scanning_.*
+ # after-suspend-wireless/wireless_connection_open_ac_nm_.*
+ # after-suspend-wireless/wireless_connection_open_bg_nm_.*
+ # after-suspend-wireless/wireless_connection_open_n_nm_.*
+ # after-suspend-wireless/wireless_connection_wpa_ac_nm_.*
+ # after-suspend-wireless/wireless_connection_wpa_bg_nm_.*
+ # after-suspend-wireless/wireless_connection_wpa_n_nm_.*
+ after-suspend-wireless/wireless_connection_open_ac_np_.*
+ after-suspend-wireless/wireless_connection_open_bg_np_.*
+ after-suspend-wireless/wireless_connection_open_n_np_.*
+ after-suspend-wireless/wireless_connection_wpa_ac_np_.*
+ after-suspend-wireless/wireless_connection_wpa_bg_np_.*
+ after-suspend-wireless/wireless_connection_wpa_n_np_.*
+bootstrap_include:
+ device
diff --git a/units/wireless/wifi-ap.pxu b/units/wireless/wifi-ap.pxu
new file mode 100644
index 0000000..df25b50
--- /dev/null
+++ b/units/wireless/wifi-ap.pxu
@@ -0,0 +1,1081 @@
+unit: template
+template-resource: device
+template-filter: device.category == 'WIRELESS'
+template-unit: job
+id: wireless/wifi_ap_open_a_no_sta_{interface}_manual
+category_id: wifi_ap
+_summary: Create open 802.11a Wi-Fi AP on {interface} with no STA (Manual)
+plugin: manual
+requires:
+ wifi_interface_mode.{interface}_AP == 'supported'
+ snap.name == 'wifi-ap'
+estimated_duration: 120.0
+_purpose:
+ Check that the system can create an open 802.11a Access Point without any STA connection
+_steps:
+ 1. Delete existing wireless connections known to Network Manager:
+ $ nmcli -t -f TYPE,UUID c | grep -oP "(?<=^802-11-wireless:).*" | xargs nmcli c delete
+ 2. Configure the wifi-ap snap:
+ $ sudo wifi-ap.config set wifi.interface={interface}
+ $ sudo wifi-ap.config set wifi.operation-mode=a
+ $ sudo wifi-ap.config set wifi.interface-mode=direct
+ $ sudo wifi-ap.config set disabled=false
+ $ sudo wifi-ap.config set wifi.security=open
+ 3. Using a suitable Wi-Fi client try to detect the presence of the AP called "Ubuntu"
+ 4. Attempt to connect to the AP
+_verification:
+ Did the client connect?
+flags: preserve-locale also-after-suspend
+
+unit: template
+template-resource: device
+template-filter: device.category == 'WIRELESS'
+template-unit: job
+id: wireless/wifi_ap_open_a_no_sta_{interface}_auto
+category_id: wifi_ap
+_summary: Create open 802.11a Wi-Fi AP on {interface} with no STA
+plugin: shell
+_description:
+ Check that the system can create an open 802.11a Access Point without any STA
+ connection on {interface} by configuring the system using wifi-ap snap and
+ then checking status of the interface using `iw` command.
+user: root
+command:
+ BEGIN_AP_TEST_TS=`date '+%Y-%m-%d %H:%M:%S'`
+ echo "Setting up AP"
+ wifi-ap.config set wifi.interface={interface}
+ wifi-ap.config set wifi.operation-mode=a
+ wifi-ap.config set wifi.interface-mode=direct
+ wifi-ap.config set wifi.security=open
+ wifi-ap.config set disabled=false
+ wifi-ap.config set wifi.ssid=Ubuntu_a_open
+ echo "Waiting for AP to become available"
+ sleep ${{WIFI_AP_SETUPTIME:-10}}
+ RES=`iw {interface} info |grep -E "(type\ AP)|(ssid\ Ubuntu_a_open)" |wc -l`
+ wifi-ap.config set disabled=true
+ if [ $RES -eq 2 ]; then
+ echo "Network detected"
+ exit 0
+ else
+ echo "FAILED to detect the network"
+ echo "==== Service unit logs ===="
+ journalctl -q -u "*wifi-ap.management-service*" --no-pager --since "$BEGIN_AP_TEST_TS" -o cat
+ exit 1;
+ fi
+requires:
+ wifi_interface_mode.{interface}_AP == 'supported'
+ snap.name == 'wifi-ap'
+estimated_duration: 120.0
+environ: WIFI_AP_SETUPTIME
+flags: preserve-locale also-after-suspend
+
+unit: template
+template-resource: device
+template-filter: device.category == 'WIRELESS'
+template-unit: job
+id: wireless/wifi_ap_open_b_no_sta_{interface}_manual
+category_id: wifi_ap
+_summary: Create open 802.11b Wi-Fi AP on {interface} with no STA (Manual)
+plugin: manual
+requires:
+ wifi_interface_mode.{interface}_AP == 'supported'
+ snap.name == 'wifi-ap'
+estimated_duration: 120.0
+_purpose:
+ Check that the system can create an open 802.11b Access Point without any STA connection
+_steps:
+ 1. Delete existing wireless connections known to Network Manager:
+ $ nmcli -t -f TYPE,UUID c | grep -oP "(?<=^802-11-wireless:).*" | xargs nmcli c delete
+ 2. Configure the wifi-ap snap:
+ $ sudo wifi-ap.config set wifi.interface={interface}
+ $ sudo wifi-ap.config set wifi.operation-mode=b
+ $ sudo wifi-ap.config set wifi.interface-mode=direct
+ $ sudo wifi-ap.config set disabled=false
+ $ sudo wifi-ap.config set wifi.security=open
+ 3. Using a suitable Wi-Fi client try to detect the presence of the AP called "Ubuntu"
+ 4. Attempt to connect to the AP
+_verification:
+ Did the client connect?
+flags: preserve-locale also-after-suspend
+
+unit: template
+template-resource: device
+template-filter: device.category == 'WIRELESS'
+template-unit: job
+id: wireless/wifi_ap_open_b_no_sta_{interface}_auto
+category_id: wifi_ap
+_summary: Create open 802.11b Wi-Fi AP on {interface} with no STA
+plugin: shell
+_description:
+ Check that the system can create an open 802.11b Access Point without any STA
+ connection on {interface} by configuring the system using wifi-ap snap and
+ then checking status of the interface using `iw` command.
+user: root
+command:
+ BEGIN_AP_TEST_TS=`date '+%Y-%m-%d %H:%M:%S'`
+ echo "Setting up AP"
+ wifi-ap.config set wifi.interface={interface}
+ wifi-ap.config set wifi.operation-mode=b
+ wifi-ap.config set wifi.interface-mode=direct
+ wifi-ap.config set wifi.security=open
+ wifi-ap.config set disabled=false
+ wifi-ap.config set wifi.ssid=Ubuntu_b_open
+ echo "Waiting for AP to become available"
+ sleep ${{WIFI_AP_SETUPTIME:-10}}
+ RES=`iw {interface} info |grep -E "(type\ AP)|(ssid\ Ubuntu_b_open)" |wc -l`
+ wifi-ap.config set disabled=true
+ if [ $RES -eq 2 ]; then
+ echo "Network detected"
+ exit 0
+ else
+ echo "FAILED to detect the network"
+ echo "==== Service unit logs ===="
+ journalctl -q -u "*wifi-ap.management-service*" --no-pager --since "$BEGIN_AP_TEST_TS" -o cat
+ exit 1;
+ fi
+requires:
+ wifi_interface_mode.{interface}_AP == 'supported'
+ snap.name == 'wifi-ap'
+estimated_duration: 120.0
+environ: WIFI_AP_SETUPTIME
+flags: preserve-locale also-after-suspend
+
+unit: template
+template-resource: device
+template-filter: device.category == 'WIRELESS'
+template-unit: job
+id: wireless/wifi_ap_open_g_no_sta_{interface}_manual
+category_id: wifi_ap
+_summary: Create open 802.11g Wi-Fi AP on {interface} with no STA (Manual)
+plugin: manual
+requires:
+ wifi_interface_mode.{interface}_AP == 'supported'
+ snap.name == 'wifi-ap'
+estimated_duration: 120.0
+_purpose:
+ Check that the system can create an open 802.11g Access Point without any STA connection
+_steps:
+ 1. Delete existing wireless connections known to Network Manager:
+ $ nmcli -t -f TYPE,UUID c | grep -oP "(?<=^802-11-wireless:).*" | xargs nmcli c delete
+ 2. Configure the wifi-ap snap:
+ $ sudo wifi-ap.config set wifi.interface={interface}
+ $ sudo wifi-ap.config set wifi.operation-mode=g
+ $ sudo wifi-ap.config set wifi.interface-mode=direct
+ $ sudo wifi-ap.config set disabled=false
+ $ sudo wifi-ap.config set wifi.security=open
+ 3. Using a suitable Wi-Fi client try to detect the presence of the AP called "Ubuntu"
+ 4. Attempt to connect to the AP
+_verification:
+ Did the client connect?
+flags: preserve-locale also-after-suspend
+
+unit: template
+template-resource: device
+template-filter: device.category == 'WIRELESS'
+template-unit: job
+id: wireless/wifi_ap_open_g_no_sta_{interface}_auto
+category_id: wifi_ap
+_summary: Create open 802.11g Wi-Fi AP on {interface} with no STA
+plugin: shell
+_description:
+ Check that the system can create an open 802.11g Access Point without any STA
+ connection on {interface} by configuring the system using wifi-ap snap and
+ then checking status of the interface using `iw` command.
+user: root
+command:
+ BEGIN_AP_TEST_TS=`date '+%Y-%m-%d %H:%M:%S'`
+ echo "Setting up AP"
+ wifi-ap.config set wifi.interface={interface}
+ wifi-ap.config set wifi.operation-mode=g
+ wifi-ap.config set wifi.interface-mode=direct
+ wifi-ap.config set wifi.security=open
+ wifi-ap.config set disabled=false
+ wifi-ap.config set wifi.ssid=Ubuntu_g_open
+ echo "Waiting for AP to become available"
+ sleep ${{WIFI_AP_SETUPTIME:-10}}
+ RES=`iw {interface} info |grep -E "(type\ AP)|(ssid\ Ubuntu_g_open)" |wc -l`
+ wifi-ap.config set disabled=true
+ if [ $RES -eq 2 ]; then
+ echo "Network detected"
+ exit 0
+ else
+ echo "FAILED to detect the network"
+ echo "==== Service unit logs ===="
+ journalctl -q -u "*wifi-ap.management-service*" --no-pager --since "$BEGIN_AP_TEST_TS" -o cat
+ exit 1;
+ fi
+requires:
+ wifi_interface_mode.{interface}_AP == 'supported'
+ snap.name == 'wifi-ap'
+estimated_duration: 120.0
+environ: WIFI_AP_SETUPTIME
+flags: preserve-locale also-after-suspend
+
+unit: template
+template-resource: device
+template-filter: device.category == 'WIRELESS'
+template-unit: job
+id: wireless/wifi_ap_open_ad_no_sta_{interface}_manual
+category_id: wifi_ap
+_summary: Create open 802.11ad Wi-Fi AP on {interface} with no STA (Manual)
+plugin: manual
+requires:
+ wifi_interface_mode.{interface}_AP == 'supported'
+ snap.name == 'wifi-ap'
+estimated_duration: 120.0
+_purpose:
+ Check that the system can create an open 802.11ad Access Point without any STA connection
+_steps:
+ 1. Delete existing wireless connections known to Network Manager:
+ $ nmcli -t -f TYPE,UUID c | grep -oP "(?<=^802-11-wireless:).*" | xargs nmcli c delete
+ 2. Configure the wifi-ap snap:
+ $ sudo wifi-ap.config set wifi.interface={interface}
+ $ sudo wifi-ap.config set wifi.operation-mode=ad
+ $ sudo wifi-ap.config set wifi.interface-mode=direct
+ $ sudo wifi-ap.config set disabled=false
+ $ sudo wifi-ap.config set wifi.security=open
+ 3. Using a suitable Wi-Fi client try to detect the presence of the AP called "Ubuntu"
+ 4. Attempt to connect to the AP
+_verification:
+ Did the client connect?
+flags: preserve-locale also-after-suspend
+
+unit: template
+template-resource: device
+template-filter: device.category == 'WIRELESS'
+template-unit: job
+id: wireless/wifi_ap_open_ad_no_sta_{interface}_auto
+category_id: wifi_ap
+_summary: Create open 802.11ad Wi-Fi AP on {interface} with no STA
+plugin: shell
+_description:
+ Check that the system can create an open 802.11ad Access Point without any STA
+ connection on {interface} by configuring the system using wifi-ap snap and
+ then checking status of the interface using `iw` command.
+user: root
+command:
+ BEGIN_AP_TEST_TS=`date '+%Y-%m-%d %H:%M:%S'`
+ echo "Setting up AP"
+ wifi-ap.config set wifi.interface={interface}
+ wifi-ap.config set wifi.operation-mode=ad
+ wifi-ap.config set wifi.interface-mode=direct
+ wifi-ap.config set wifi.security=open
+ wifi-ap.config set disabled=false
+ wifi-ap.config set wifi.ssid=Ubuntu_ad_open
+ echo "Waiting for AP to become available"
+ sleep ${{WIFI_AP_SETUPTIME:-10}}
+ RES=`iw {interface} info |grep -E "(type\ AP)|(ssid\ Ubuntu_ad_open)" |wc -l`
+ wifi-ap.config set disabled=true
+ if [ $RES -eq 2 ]; then
+ echo "Network detected"
+ exit 0
+ else
+ echo "FAILED to detect the network"
+ echo "==== Service unit logs ===="
+ journalctl -q -u "*wifi-ap.management-service*" --no-pager --since "$BEGIN_AP_TEST_TS" -o cat
+ exit 1;
+ fi
+requires:
+ wifi_interface_mode.{interface}_AP == 'supported'
+ snap.name == 'wifi-ap'
+estimated_duration: 120.0
+environ: WIFI_AP_SETUPTIME
+flags: preserve-locale also-after-suspend
+
+unit: template
+template-resource: device
+template-filter: device.category == 'WIRELESS'
+template-unit: job
+id: wireless/wifi_ap_wpa_a_no_sta_{interface}_manual
+category_id: wifi_ap
+_summary: Create WPA2 802.11a Wi-Fi AP on {interface} with no STA (Manual)
+plugin: manual
+requires:
+ wifi_interface_mode.{interface}_AP == 'supported'
+ snap.name == 'wifi-ap'
+estimated_duration: 120.0
+_purpose:
+ Check that the system can create a WPA2 802.11a Access Point without any STA connection
+_steps:
+ 1. Delete existing wireless connections known to Network Manager:
+ $ nmcli -t -f TYPE,UUID c | grep -oP "(?<=^802-11-wireless:).*" | xargs nmcli c delete
+ 2. Configure the wifi-ap snap:
+ $ sudo wifi-ap.config set wifi.interface={interface}
+ $ sudo wifi-ap.config set wifi.operation-mode=a
+ $ sudo wifi-ap.config set wifi.interface-mode=direct
+ $ sudo wifi-ap.config set disabled=false
+ $ sudo wifi-ap.config set wifi.security=wpa2
+ $ sudo wifi-ap.config set wifi.security-passphrase=Test1234
+ 3. Using a suitable Wi-Fi client try to detect the presence of the AP called "Ubuntu"
+ 4. Attempt to connect to the AP using password "Test1234"
+_verification:
+ Did the client connect?
+flags: preserve-locale also-after-suspend
+
+unit: template
+template-resource: device
+template-filter: device.category == 'WIRELESS'
+template-unit: job
+id: wireless/wifi_ap_wpa_a_no_sta_{interface}_auto
+category_id: wifi_ap
+_summary: Create WPA2 802.11a Wi-Fi AP on {interface} with no STA
+plugin: shell
+_description:
+ Check that the system can create an open 802.11a Access Point without any STA
+ connection on {interface} by configuring the system using wifi-ap snap and
+ then checking status of the interface using `iw` command.
+user: root
+command:
+ BEGIN_AP_TEST_TS=`date '+%Y-%m-%d %H:%M:%S'`
+ echo "Setting up AP"
+ wifi-ap.config set wifi.interface={interface}
+ wifi-ap.config set wifi.operation-mode=a
+ wifi-ap.config set wifi.interface-mode=direct
+ wifi-ap.config set wifi.security=wpa2
+ wifi-ap.config set wifi.security-passphrase=Test1234
+ wifi-ap.config set disabled=false
+ wifi-ap.config set wifi.ssid=Ubuntu_a_wpa2
+ echo "Waiting for AP to become available"
+ sleep ${{WIFI_AP_SETUPTIME:-10}}
+ RES=`iw {interface} info |grep -E "(type\ AP)|(ssid\ Ubuntu_a_wpa2)" |wc -l`
+ wifi-ap.config set disabled=true
+ if [ $RES -eq 2 ]; then
+ echo "Network detected"
+ exit 0
+ else
+ echo "FAILED to detect the network"
+ echo "==== Service unit logs ===="
+ journalctl -q -u "*wifi-ap.management-service*" --no-pager --since "$BEGIN_AP_TEST_TS" -o cat
+ exit 1;
+ fi
+requires:
+ wifi_interface_mode.{interface}_AP == 'supported'
+ snap.name == 'wifi-ap'
+estimated_duration: 120.0
+environ: WIFI_AP_SETUPTIME
+flags: preserve-locale also-after-suspend
+
+unit: template
+template-resource: device
+template-filter: device.category == 'WIRELESS'
+template-unit: job
+id: wireless/wifi_ap_wpa_b_no_sta_{interface}_manual
+category_id: wifi_ap
+_summary: Create WPA2 802.11b Wi-Fi AP on {interface} with no STA (Manual)
+plugin: manual
+requires:
+ wifi_interface_mode.{interface}_AP == 'supported'
+ snap.name == 'wifi-ap'
+estimated_duration: 120.0
+_purpose:
+ Check that the system can create a WPA2 802.11b Access Point without any STA connection
+_steps:
+ 1. Delete existing wireless connections known to Network Manager:
+ $ nmcli -t -f TYPE,UUID c | grep -oP "(?<=^802-11-wireless:).*" | xargs nmcli c delete
+ 2. Configure the wifi-ap snap:
+ $ sudo wifi-ap.config set wifi.interface={interface}
+ $ sudo wifi-ap.config set wifi.operation-mode=b
+ $ sudo wifi-ap.config set wifi.interface-mode=direct
+ $ sudo wifi-ap.config set disabled=false
+ $ sudo wifi-ap.config set wifi.security=wpa2
+ $ sudo wifi-ap.config set wifi.security-passphrase=Test1234
+ 3. Using a suitable Wi-Fi client try to detect the presence of the AP called "Ubuntu"
+ 4. Attempt to connect to the AP using password "Test1234"
+_verification:
+ Did the client connect?
+flags: preserve-locale also-after-suspend
+
+unit: template
+template-resource: device
+template-filter: device.category == 'WIRELESS'
+template-unit: job
+id: wireless/wifi_ap_wpa_b_no_sta_{interface}_auto
+category_id: wifi_ap
+_summary: Create WPA2 802.11b Wi-Fi AP on {interface} with no STA
+plugin: shell
+_description:
+ Check that the system can create an open 802.11b Access Point without any STA
+ connection on {interface} by configuring the system using wifi-ap snap and
+ then checking status of the interface using `iw` command.
+user: root
+command:
+ BEGIN_AP_TEST_TS=`date '+%Y-%m-%d %H:%M:%S'`
+ echo "Setting up AP"
+ wifi-ap.config set wifi.interface={interface}
+ wifi-ap.config set wifi.operation-mode=b
+ wifi-ap.config set wifi.interface-mode=direct
+ wifi-ap.config set wifi.security=wpa2
+ wifi-ap.config set wifi.security-passphrase=Test1234
+ wifi-ap.config set disabled=false
+ wifi-ap.config set wifi.ssid=Ubuntu_b_wpa2
+ echo "Waiting for AP to become available"
+ sleep ${{WIFI_AP_SETUPTIME:-10}}
+ RES=`iw {interface} info |grep -E "(type\ AP)|(ssid\ Ubuntu_b_wpa2)" |wc -l`
+ wifi-ap.config set disabled=true
+ if [ $RES -eq 2 ]; then
+ echo "Network detected"
+ exit 0
+ else
+ echo "FAILED to detect the network"
+ echo "==== Service unit logs ===="
+ journalctl -q -u "*wifi-ap.management-service*" --no-pager --since "$BEGIN_AP_TEST_TS" -o cat
+ exit 1;
+ fi
+requires:
+ wifi_interface_mode.{interface}_AP == 'supported'
+ snap.name == 'wifi-ap'
+estimated_duration: 120.0
+environ: WIFI_AP_SETUPTIME
+flags: preserve-locale also-after-suspend
+
+unit: template
+template-resource: device
+template-filter: device.category == 'WIRELESS'
+template-unit: job
+id: wireless/wifi_ap_wpa_g_no_sta_{interface}_manual
+category_id: wifi_ap
+_summary: Create WPA2 802.11g Wi-Fi AP on {interface} with no STA (Manual)
+plugin: manual
+requires:
+ wifi_interface_mode.{interface}_AP == 'supported'
+ snap.name == 'wifi-ap'
+estimated_duration: 120.0
+_purpose:
+ Check that the system can create a WPA2 802.11g Access Point without any STA connection
+_steps:
+ 1. Delete existing wireless connections known to Network Manager:
+ $ nmcli -t -f TYPE,UUID c | grep -oP "(?<=^802-11-wireless:).*" | xargs nmcli c delete
+ 2. Configure the wifi-ap snap:
+ $ sudo wifi-ap.config set wifi.interface={interface}
+ $ sudo wifi-ap.config set wifi.operation-mode=g
+ $ sudo wifi-ap.config set wifi.interface-mode=direct
+ $ sudo wifi-ap.config set disabled=false
+ $ sudo wifi-ap.config set wifi.security=wpa2
+ $ sudo wifi-ap.config set wifi.security-passphrase=Test1234
+ 3. Using a suitable Wi-Fi client try to detect the presence of the AP called "Ubuntu"
+ 4. Attempt to connect to the AP using password "Test1234"
+_verification:
+ Did the client connect?
+flags: preserve-locale also-after-suspend
+
+unit: template
+template-resource: device
+template-filter: device.category == 'WIRELESS'
+template-unit: job
+id: wireless/wifi_ap_wpa_g_no_sta_{interface}_auto
+category_id: wifi_ap
+_summary: Create WPA2 802.11g Wi-Fi AP on {interface} with no STA
+plugin: shell
+_description:
+ Check that the system can create an open 802.11g Access Point without any STA
+ connection on {interface} by configuring the system using wifi-ap snap and
+ then checking status of the interface using `iw` command.
+user: root
+command:
+ BEGIN_AP_TEST_TS=`date '+%Y-%m-%d %H:%M:%S'`
+ echo "Setting up AP"
+ wifi-ap.config set wifi.interface={interface}
+ wifi-ap.config set wifi.operation-mode=g
+ wifi-ap.config set wifi.interface-mode=direct
+ wifi-ap.config set wifi.security=wpa2
+ wifi-ap.config set wifi.security-passphrase=Test1234
+ wifi-ap.config set disabled=false
+ wifi-ap.config set wifi.ssid=Ubuntu_g_wpa2
+ echo "Waiting for AP to become available"
+ sleep ${{WIFI_AP_SETUPTIME:-10}}
+ RES=`iw {interface} info |grep -E "(type\ AP)|(ssid\ Ubuntu_g_wpa2)" |wc -l`
+ wifi-ap.config set disabled=true
+ if [ $RES -eq 2 ]; then
+ echo "Network detected"
+ exit 0
+ else
+ echo "FAILED to detect the network"
+ echo "==== Service unit logs ===="
+ journalctl -q -u "*wifi-ap.management-service*" --no-pager --since "$BEGIN_AP_TEST_TS" -o cat
+ exit 1;
+ fi
+requires:
+ wifi_interface_mode.{interface}_AP == 'supported'
+ snap.name == 'wifi-ap'
+estimated_duration: 120.0
+environ: WIFI_AP_SETUPTIME
+flags: preserve-locale also-after-suspend
+
+unit: template
+template-resource: device
+template-filter: device.category == 'WIRELESS'
+template-unit: job
+id: wireless/wifi_ap_wpa_ad_no_sta_{interface}_manual
+category_id: wifi_ap
+_summary: Create WPA2 802.11ad Wi-Fi AP on {interface} with no STA (Manual)
+plugin: manual
+requires:
+ wifi_interface_mode.{interface}_AP == 'supported'
+ snap.name == 'wifi-ap'
+estimated_duration: 120.0
+_purpose:
+ Check that the system can create a WPA2 802.11ad Access Point without any STA connection
+_steps:
+ 1. Delete existing wireless connections known to Network Manager:
+ $ nmcli -t -f TYPE,UUID c | grep -oP "(?<=^802-11-wireless:).*" | xargs nmcli c delete
+ 2. Configure the wifi-ap snap:
+ $ sudo wifi-ap.config set wifi.interface={interface}
+ $ sudo wifi-ap.config set wifi.operation-mode=ad
+ $ sudo wifi-ap.config set wifi.interface-mode=direct
+ $ sudo wifi-ap.config set disabled=false
+ $ sudo wifi-ap.config set wifi.security=wpa2
+ $ sudo wifi-ap.config set wifi.security-passphrase=Test1234
+ 3. Using a suitable Wi-Fi client try to detect the presence of the AP called "Ubuntu"
+ 4. Attempt to connect to the AP using password "Test1234"
+_verification:
+ Did the client connect?
+flags: preserve-locale also-after-suspend
+
+unit: template
+template-resource: device
+template-filter: device.category == 'WIRELESS'
+template-unit: job
+id: wireless/wifi_ap_wpa_ad_no_sta_{interface}_auto
+category_id: wifi_ap
+_summary: Create WPA2 802.11ad Wi-Fi AP on {interface} with no STA
+plugin: shell
+_description:
+ Check that the system can create an open 802.11ad Access Point without any STA
+ connection on {interface} by configuring the system using wifi-ap snap and
+ then checking status of the interface using `iw` command.
+user: root
+command:
+ BEGIN_AP_TEST_TS=`date '+%Y-%m-%d %H:%M:%S'`
+ echo "Setting up AP"
+ wifi-ap.config set wifi.interface={interface}
+ wifi-ap.config set wifi.operation-mode=ad
+ wifi-ap.config set wifi.interface-mode=direct
+ wifi-ap.config set wifi.security=wpa2
+ wifi-ap.config set wifi.security-passphrase=Test1234
+ wifi-ap.config set disabled=false
+ wifi-ap.config set wifi.ssid=Ubuntu_ad_wpa2
+ echo "Waiting for AP to become available"
+ sleep ${{WIFI_AP_SETUPTIME:-10}}
+ RES=`iw {interface} info |grep -E "(type\ AP)|(ssid\ Ubuntu_ad_wpa2)" |wc -l`
+ wifi-ap.config set disabled=true
+ if [ $RES -eq 2 ]; then
+ echo "Network detected"
+ exit 0
+ else
+ echo "FAILED to detect the network"
+ echo "==== Service unit logs ===="
+ journalctl -q -u "*wifi-ap.management-service*" --no-pager --since "$BEGIN_AP_TEST_TS" -o cat
+ exit 1;
+ fi
+requires:
+ wifi_interface_mode.{interface}_AP == 'supported'
+ snap.name == 'wifi-ap'
+estimated_duration: 120.0
+environ: WIFI_AP_SETUPTIME
+flags: preserve-locale also-after-suspend
+
+unit: template
+template-resource: device
+template-filter: device.category == 'WIRELESS'
+template-unit: job
+id: wireless/wifi_ap_wpa_a_with_sta_{interface}
+category_id: wifi_ap
+_summary: Create WPA2 802.11a Wi-Fi AP on {interface} with active STA (Manual)
+plugin: user-interact-verify
+requires:
+ wifi_interface_mode.{interface}_AP == 'supported'
+ snap.name == 'wifi-ap'
+depends: wireless/wireless_connection_open_bg_nm_{interface}
+estimated_duration: 120.0
+environ: LD_LIBRARY_PATH OPEN_BG_SSID
+command:
+ nmcli dev wifi rescan
+ nmcli dev wifi connect $OPEN_BG_SSID ifname {interface} name WIFI_TEST_CREATED_BY_CHECKBOX
+user: root
+_purpose:
+ Check that the system can create a WPA2 802.11a Access Point with an already active STA connection
+_steps:
+ 1. Delete existing wireless connections known to Network Manager:
+ $ nmcli -t -f TYPE,UUID c | grep -oP "(?<=^802-11-wireless:).*" | xargs nmcli c delete
+ 2. Connect to an 802.11b/g AP with wpa security:
+ Press Enter to continue
+ 3. Configure the wifi-ap snap:
+ $ sudo wifi-ap.config set wifi.interface={interface}
+ $ sudo wifi-ap.config set wifi.operation-mode=a
+ $ sudo wifi-ap.config set wifi.interface-mode=virtual
+ $ sudo wifi-ap.config set disabled=false
+ $ sudo wifi-ap.config set wifi.security=wpa2
+ $ sudo wifi-ap.config set wifi.security-passphrase=Test1234
+ $ sudo wifi-ap.config set wifi.channel=$(iw dev {interface} info | grep -oP 'channel\s+\K\d+')
+ 4. Using a suitable Wi-Fi client try to detect the presence of the AP called "Ubuntu"
+ 5. Attempt to connect to the AP using password "Test1234"
+_verification:
+ Did the client connect?
+flags: preserve-locale also-after-suspend
+
+unit: template
+template-resource: device
+template-filter: device.category == 'WIRELESS'
+template-unit: job
+id: wireless/wifi_ap_wpa_a_with_sta_{interface}_auto
+category_id: wifi_ap
+_summary: Create WPA2 802.11a Wi-Fi Access Point on {interface} with active STA
+plugin: shell
+requires:
+ wifi_interface_mode.{interface}_AP == 'supported'
+ snap.name == 'wifi-ap'
+depends: wireless/wireless_connection_open_bg_nm_{interface}
+estimated_duration: 120.0
+environ: LD_LIBRARY_PATH OPEN_BG_SSID WIFI_AP_SETUPTIME
+command:
+ echo "Scanning for existing networks"
+ nmcli dev wifi rescan
+ echo "Connecting to existing network"
+ nmcli dev wifi connect $OPEN_BG_SSID ifname {interface} name WIFI_TEST_CREATED_BY_CHECKBOX
+ trap "nmcli dev disconnect {interface}; nmcli con delete id WIFI_TEST_CREATED_BY_CHECKBOX" EXIT
+ if ! nmcli -m tabular -t -f GENERAL.STATE d show {interface} |grep ^100 ; then
+ echo "FAILED to connect to STA before setting up AP"
+ exit 1
+ fi
+ BEGIN_AP_TEST_TS=`date '+%Y-%m-%d %H:%M:%S'`
+ echo "Setting up AP"
+ wifi-ap.config set wifi.interface={interface}
+ wifi-ap.config set wifi.operation-mode=a
+ wifi-ap.config set wifi.interface-mode=direct
+ wifi-ap.config set wifi.security=wpa2
+ wifi-ap.config set wifi.security-passphrase=Test1234
+ wifi-ap.config set disabled=false
+ wifi-ap.config set wifi.ssid=Ubuntu_a_wpa2
+ echo "Waiting for AP to become available"
+ sleep ${{WIFI_AP_SETUPTIME:-10}}
+ RES=`iw {interface} info |grep -E "(type\ AP)|(ssid\ Ubuntu_a_wpa2)" |wc -l`
+ wifi-ap.config set disabled=true
+ if [ $RES -eq 2 ]; then
+ echo "Network detected"
+ exit 0
+ else
+ echo "FAILED to detect the network"
+ echo "==== Service unit logs ===="
+ journalctl -q -u "*wifi-ap.management-service*" --no-pager --since "$BEGIN_AP_TEST_TS" -o cat
+ exit 1;
+ fi
+user: root
+flags: preserve-locale also-after-suspend
+
+unit: template
+template-resource: device
+template-filter: device.category == 'WIRELESS'
+template-unit: job
+id: wireless/wifi_ap_wpa_b_with_sta_{interface}
+category_id: wifi_ap
+_summary: Create WPA2 802.11b Wi-Fi AP on {interface} with active STA (Manual)
+plugin: user-interact-verify
+requires:
+ wifi_interface_mode.{interface}_AP == 'supported'
+ snap.name == 'wifi-ap'
+depends: wireless/wireless_connection_open_bg_nm_{interface}
+estimated_duration: 120.0
+environ: LD_LIBRARY_PATH $OPEN_BG_SSID
+command:
+ nmcli dev wifi rescan
+ nmcli dev wifi connect $OPEN_BG_SSID ifname {interface} name WIFI_TEST_CREATED_BY_CHECKBOX
+user: root
+_purpose:
+ Check that the system can create a WPA2 802.11b Access Point with an already active STA connection
+_steps:
+ 1. Delete existing wireless connections known to Network Manager:
+ $ nmcli -t -f TYPE,UUID c | grep -oP "(?<=^802-11-wireless:).*" | xargs nmcli c delete
+ 2. Connect to an 802.11b/g AP with wpa security:
+ Press Enter to continue
+ 3. Configure the wifi-ap snap:
+ $ sudo wifi-ap.config set wifi.interface={interface}
+ $ sudo wifi-ap.config set wifi.operation-mode=b
+ $ sudo wifi-ap.config set wifi.interface-mode=virtual
+ $ sudo wifi-ap.config set disabled=false
+ $ sudo wifi-ap.config set wifi.security=wpa2
+ $ sudo wifi-ap.config set wifi.security-passphrase=Test1234
+ $ sudo wifi-ap.config set wifi.channel=$(iw dev {interface} info | grep -oP 'channel\s+\K\d+')
+ 4. Using a suitable Wi-Fi client try to detect the presence of the AP called "Ubuntu"
+ 5. Attempt to connect to the AP using password "Test1234"
+_verification:
+ Did the client connect?
+flags: preserve-locale also-after-suspend
+
+unit: template
+template-resource: device
+template-filter: device.category == 'WIRELESS'
+template-unit: job
+id: wireless/wifi_ap_wpa_b_with_sta_{interface}_auto
+category_id: wifi_ap
+_summary: Create WPA2 802.11b Wi-Fi Access Point on {interface} with active STA
+plugin: shell
+requires:
+ wifi_interface_mode.{interface}_AP == 'supported'
+ snap.name == 'wifi-ap'
+depends: wireless/wireless_connection_open_bg_nm_{interface}
+estimated_duration: 120.0
+environ: LD_LIBRARY_PATH OPEN_BG_SSID WIFI_AP_SETUPTIME
+command:
+ echo "Scanning for existing networks"
+ nmcli dev wifi rescan
+ echo "Connecting to existing network"
+ nmcli dev wifi connect $OPEN_BG_SSID ifname {interface} name WIFI_TEST_CREATED_BY_CHECKBOX
+ trap "nmcli dev disconnect {interface}; nmcli con delete id WIFI_TEST_CREATED_BY_CHECKBOX" EXIT
+ if ! nmcli -m tabular -t -f GENERAL.STATE d show {interface} |grep ^100 ; then
+ echo "FAILED to connect to STA before setting up AP"
+ exit 1
+ fi
+ BEGIN_AP_TEST_TS=`date '+%Y-%m-%d %H:%M:%S'`
+ echo "Setting up AP"
+ wifi-ap.config set wifi.interface={interface}
+ wifi-ap.config set wifi.operation-mode=b
+ wifi-ap.config set wifi.interface-mode=direct
+ wifi-ap.config set wifi.security=wpa2
+ wifi-ap.config set wifi.security-passphrase=Test1234
+ wifi-ap.config set disabled=false
+ wifi-ap.config set wifi.ssid=Ubuntu_b_wpa2
+ echo "Waiting for AP to become available"
+ sleep ${{WIFI_AP_SETUPTIME:-10}}
+ RES=`iw {interface} info |grep -E "(type\ AP)|(ssid\ Ubuntu_b_wpa2)" |wc -l`
+ wifi-ap.config set disabled=true
+ if [ $RES -eq 2 ]; then
+ echo "Network detected"
+ exit 0
+ else
+ echo "FAILED to detect the network"
+ echo "==== Service unit logs ===="
+ journalctl -q -u "*wifi-ap.management-service*" --no-pager --since "$BEGIN_AP_TEST_TS" -o cat
+ exit 1;
+ fi
+user: root
+flags: preserve-locale also-after-suspend
+
+unit: template
+template-resource: device
+template-filter: device.category == 'WIRELESS'
+template-unit: job
+id: wireless/wifi_ap_wpa_g_with_sta_{interface}
+category_id: wifi_ap
+_summary: Create WPA2 802.11g Wi-Fi AP on {interface} with active STA (Manual)
+plugin: user-interact-verify
+requires:
+ wifi_interface_mode.{interface}_AP == 'supported'
+ snap.name == 'wifi-ap'
+depends: wireless/wireless_connection_open_bg_nm_{interface}
+estimated_duration: 120.0
+environ: LD_LIBRARY_PATH OPEN_BG_SSID
+command:
+ nmcli dev wifi rescan
+ nmcli dev wifi connect $OPEN_BG_SSID ifname {interface} name WIFI_TEST_CREATED_BY_CHECKBOX
+user: root
+_purpose:
+ Check that the system can create a WPA2 802.11g Access Point with an already active STA connection
+_steps:
+ 1. Delete existing wireless connections known to Network Manager:
+ $ nmcli -t -f TYPE,UUID c | grep -oP "(?<=^802-11-wireless:).*" | xargs nmcli c delete
+ 2. Connect to an 802.11b/g AP with wpa security:
+ Press Enter to continue
+ 3. Configure the wifi-ap snap:
+ $ sudo wifi-ap.config set wifi.interface={interface}
+ $ sudo wifi-ap.config set wifi.operation-mode=g
+ $ sudo wifi-ap.config set wifi.interface-mode=virtual
+ $ sudo wifi-ap.config set disabled=false
+ $ sudo wifi-ap.config set wifi.security=wpa2
+ $ sudo wifi-ap.config set wifi.security-passphrase=Test1234
+ $ sudo wifi-ap.config set wifi.channel=$(iw dev {interface} info | grep -oP 'channel\s+\K\d+')
+ 4. Using a suitable Wi-Fi client try to detect the presence of the AP called "Ubuntu"
+ 5. Attempt to connect to the AP using password "Test1234"
+_verification:
+ Did the client connect?
+flags: preserve-locale also-after-suspend
+
+unit: template
+template-resource: device
+template-filter: device.category == 'WIRELESS'
+template-unit: job
+id: wireless/wifi_ap_wpa_g_with_sta_{interface}_auto
+category_id: wifi_ap
+_summary: Create WPA2 802.11g Wi-Fi Access Point on {interface} with active STA
+plugin: shell
+requires:
+ wifi_interface_mode.{interface}_AP == 'supported'
+ snap.name == 'wifi-ap'
+depends: wireless/wireless_connection_open_bg_nm_{interface}
+estimated_duration: 120.0
+environ: LD_LIBRARY_PATH OPEN_BG_SSID WIFI_AP_SETUPTIME
+command:
+ echo "Scanning for existing networks"
+ nmcli dev wifi rescan
+ echo "Connecting to existing network"
+ nmcli dev wifi connect $OPEN_BG_SSID ifname {interface} name WIFI_TEST_CREATED_BY_CHECKBOX
+ trap "nmcli dev disconnect {interface}; nmcli con delete id WIFI_TEST_CREATED_BY_CHECKBOX" EXIT
+ if ! nmcli -m tabular -t -f GENERAL.STATE d show {interface} |grep ^100 ; then
+ echo "FAILED to connect to STA before setting up AP"
+ exit 1
+ fi
+ BEGIN_AP_TEST_TS=`date '+%Y-%m-%d %H:%M:%S'`
+ echo "Setting up AP"
+ wifi-ap.config set wifi.interface={interface}
+ wifi-ap.config set wifi.operation-mode=g
+ wifi-ap.config set wifi.interface-mode=direct
+ wifi-ap.config set wifi.security=wpa2
+ wifi-ap.config set wifi.security-passphrase=Test1234
+ wifi-ap.config set disabled=false
+ wifi-ap.config set wifi.ssid=Ubuntu_g_wpa2
+ echo "Waiting for AP to become available"
+ sleep ${{WIFI_AP_SETUPTIME:-10}}
+ RES=`iw {interface} info |grep -E "(type\ AP)|(ssid\ Ubuntu_g_wpa2)" |wc -l`
+ wifi-ap.config set disabled=true
+ if [ $RES -eq 2 ]; then
+ echo "Network detected"
+ exit 0
+ else
+ echo "FAILED to detect the network"
+ echo "==== Service unit logs ===="
+ journalctl -q -u "*wifi-ap.management-service*" --no-pager --since "$BEGIN_AP_TEST_TS" -o cat
+ exit 1;
+ fi
+user: root
+flags: preserve-locale also-after-suspend
+
+unit: template
+template-resource: device
+template-filter: device.category == 'WIRELESS'
+template-unit: job
+id: wireless/wifi_ap_wpa_ad_with_sta_{interface}
+category_id: wifi_ap
+_summary: Create WPA2 802.11ad Wi-Fi AP on {interface} with active STA (Manual)
+plugin: user-interact-verify
+requires:
+ wifi_interface_mode.{interface}_AP == 'supported'
+ snap.name == 'wifi-ap'
+depends: wireless/wireless_connection_open_bg_nm_{interface}
+estimated_duration: 120.0
+environ: LD_LIBRARY_PATH OPEN_BG_SSID
+command:
+ nmcli dev wifi rescan
+ nmcli dev wifi connect $OPEN_BG_SSID ifname {interface} name WIFI_TEST_CREATED_BY_CHECKBOX
+user: root
+_purpose:
+ Check that the system can create a WPA2 802.11ad Access Point with an already active STA connection
+_steps:
+ 1. Delete existing wireless connections known to Network Manager:
+ $ nmcli -t -f TYPE,UUID c | grep -oP "(?<=^802-11-wireless:).*" | xargs nmcli c delete
+ 2. Connect to an 802.11b/g AP with wpa security:
+ Press Enter to continue
+ 3. Configure the wifi-ap snap:
+ $ sudo wifi-ap.config set wifi.interface={interface}
+ $ sudo wifi-ap.config set wifi.operation-mode=ad
+ $ sudo wifi-ap.config set wifi.interface-mode=virtual
+ $ sudo wifi-ap.config set disabled=false
+ $ sudo wifi-ap.config set wifi.security=wpa2
+ $ sudo wifi-ap.config set wifi.security-passphrase=Test1234
+ $ sudo wifi-ap.config set wifi.channel=$(iw dev {interface} info | grep -oP 'channel\s+\K\d+')
+ 4. Using a suitable Wi-Fi client try to detect the presence of the AP called "Ubuntu"
+ 5. Attempt to connect to the AP using password "Test1234"
+_verification:
+ Did the client connect?
+flags: preserve-locale also-after-suspend
+
+unit: template
+template-resource: device
+template-filter: device.category == 'WIRELESS'
+template-unit: job
+id: wireless/wifi_ap_wpa_ad_with_sta_{interface}_auto
+category_id: wifi_ap
+_summary: Create WPA2 802.11ad Wi-Fi Access Point on {interface} with active STA
+plugin: shell
+requires:
+ wifi_interface_mode.{interface}_AP == 'supported'
+ snap.name == 'wifi-ap'
+depends: wireless/wireless_connection_open_bg_nm_{interface}
+estimated_duration: 120.0
+environ: LD_LIBRARY_PATH OPEN_BG_SSID WIFI_AP_SETUPTIME
+command:
+ echo "Scanning for existing networks"
+ nmcli dev wifi rescan
+ echo "Connecting to existing network"
+ nmcli dev wifi connect $OPEN_BG_SSID ifname {interface} name WIFI_TEST_CREATED_BY_CHECKBOX
+ trap "nmcli dev disconnect {interface}; nmcli con delete id WIFI_TEST_CREATED_BY_CHECKBOX" EXIT
+ if ! nmcli -m tabular -t -f GENERAL.STATE d show {interface} |grep ^100 ; then
+ echo "FAILED to connect to STA before setting up AP"
+ exit 1
+ fi
+ BEGIN_AP_TEST_TS=`date '+%Y-%m-%d %H:%M:%S'`
+ echo "Setting up AP"
+ wifi-ap.config set wifi.interface={interface}
+ wifi-ap.config set wifi.operation-mode=ad
+ wifi-ap.config set wifi.interface-mode=direct
+ wifi-ap.config set wifi.security=wpa2
+ wifi-ap.config set wifi.security-passphrase=Test1234
+ wifi-ap.config set disabled=false
+ wifi-ap.config set wifi.ssid=Ubuntu_ad_wpa2
+ echo "Waiting for AP to become available"
+ sleep ${{WIFI_AP_SETUPTIME:-10}}
+ RES=`iw {interface} info |grep -E "(type\ AP)|(ssid\ Ubuntu_ad_wpa2)" |wc -l`
+ wifi-ap.config set disabled=true
+ if [ $RES -eq 2 ]; then
+ echo "Network detected"
+ exit 0
+ else
+ echo "FAILED to detect the network"
+ echo "==== Service unit logs ===="
+ journalctl -q -u "*wifi-ap.management-service*" --no-pager --since "$BEGIN_AP_TEST_TS" -o cat
+ exit 1;
+ fi
+user: root
+flags: preserve-locale also-after-suspend
+
+unit: template
+template-resource: device
+template-filter: device.category == 'WIRELESS'
+template-unit: job
+id: wireless/wifi_ap_setup_wizard_{interface}_auto
+category_id: wifi_ap
+_summary: Create Access Point on {interface} using wifi-ap.setup-wizard
+plugin: shell
+requires:
+ wifi_interface_mode.{interface}_AP == 'supported'
+ snap.name == 'wifi-ap'
+estimated_duration: 20.0
+user: root
+command:
+ echo "Disabling AP"
+ wifi-ap.config set wifi.operation-mode=g
+ wifi-ap.config set wifi.interface-mode=direct
+ wifi-ap.config set wifi.ssid=DISABLED
+ wifi-ap.config set disabled=true
+ wifi_ap_wizard.py {interface} eth0
+ sleep ${{WIFI_AP_SETUPTIME:-10}}
+ echo "Running AP setup wizard"
+ RES=`iw {interface} info |grep -E "(type\ AP)|(ssid\ Ubuntu_Wizard)" |wc -l`
+ wifi-ap.config set disabled=true
+ if [ $RES -eq 2 ]; then exit 0; else exit 1; fi
+_description:
+ Check that the system can create a WPA2 802.11g Access Point using
+ wifi-ap.setup-wizard command on {interface}.
+environ: WIFI_AP_SETUPTIME
+flags: preserve-locale also-after-suspend
+
+unit: template
+template-resource: device
+template-filter: device.category == 'WIRELESS'
+template-unit: job
+id: wireless/wifi_ap_across_reboot_{interface}_setup
+category_id: wifi_ap
+_summary: Create WPA2 802.11g Wi-Fi AP on {interface} and reboot (setup part)
+plugin: shell
+_description:
+ Check if the system maintains AP functionality after the reboot.
+ This job sets the AP.
+user: root
+command:
+ echo "Setting up AP"
+ wifi-ap.config set wifi.interface={interface}
+ wifi-ap.config set wifi.operation-mode=g
+ wifi-ap.config set wifi.interface-mode=direct
+ wifi-ap.config set wifi.security=wpa2
+ wifi-ap.config set wifi.security-passphrase=Test1234
+ wifi-ap.config set disabled=false
+ wifi-ap.config set wifi.ssid=Ubuntu_g_wpa2
+ echo "Waiting for AP to become available"
+ sleep ${{WIFI_AP_SETUPTIME:-10}}
+ echo "Rebooting"
+ reboot
+requires:
+ wifi_interface_mode.{interface}_AP == 'supported'
+ snap.name == 'wifi-ap'
+estimated_duration: 120.0
+environ: WIFI_AP_SETUPTIME
+flags: preserve-locale noreturn autorestart
+
+unit: template
+template-resource: device
+template-filter: device.category == 'WIRELESS'
+template-unit: job
+id: wireless/wifi_ap_across_reboot_{interface}_setup_manual
+category_id: wifi_ap
+_summary: Create WPA2 AP on {interface} and reboot (setup part, manual resume)
+plugin: user-interact-verify
+_purpose:
+ Check if the system maintains AP functionality after the reboot.
+ This job sets the AP.
+_steps:
+ When you start the test, the system will reboot.
+ After the system goes back up, resume checkbox session and mark this job as
+ passing.
+ The next job will check if the Access Point setup survived the reboot.
+user: root
+command:
+ unsnap-wifi-ap.sh config set wifi.interface={interface}
+ unsnap-wifi-ap.sh config set wifi.operation-mode=g
+ unsnap-wifi-ap.sh config set wifi.interface-mode=direct
+ unsnap-wifi-ap.sh config set wifi.security=wpa2
+ unsnap-wifi-ap.sh config set wifi.security-passphrase=Test1234
+ unsnap-wifi-ap.sh config set disabled=0
+ unsnap-wifi-ap.sh config set wifi.ssid=Ubuntu_g_wpa2
+ sleep ${{WIFI_AP_SETUPTIME:-10}}
+ reboot
+requires:
+ wifi_interface_mode.{interface}_AP == 'supported'
+ snap.name == 'wifi-ap'
+estimated_duration: 120.0
+environ: WIFI_AP_SETUPTIME
+flags: preserve-locale noreturn
+
+unit: template
+template-resource: device
+template-filter: device.category == 'WIRELESS'
+template-unit: job
+id: wireless/wifi_ap_across_reboot_{interface}_check
+category_id: wifi_ap
+_summary: Create WPA2 802.11g Wi-Fi AP on {interface} and reboot (after reboot part)
+plugin: shell
+_description:
+ Check if the system maintains AP functionality after the reboot.
+ This job checks if AP still works.
+user: root
+command:
+ echo "Waiting for AP to become available"
+ sleep ${{WIFI_AP_SETUPTIME:-10}}
+ RES=`iw {interface} info |grep -E "(type\ AP)|(ssid\ Ubuntu_g_wpa2)" |wc -l`
+ wifi-ap.config set disabled=true
+ if [ $RES -eq 2 ]; then
+ echo "Network detected"
+ exit 0
+ else
+ echo "FAILED to detect the network"
+ exit 1;
+ fi
+requires:
+ wifi_interface_mode.{interface}_AP == 'supported'
+ snap.name == 'wifi-ap'
+depends: wireless/wifi_ap_across_reboot_{interface}_setup
+estimated_duration: 120.0
+environ: WIFI_AP_SETUPTIME
+flags: preserve-locale
+
+unit: template
+template-resource: device
+template-filter: device.category == 'WIRELESS'
+template-unit: job
+id: wireless/wifi_ap_across_reboot_{interface}_check_manual
+category_id: wifi_ap
+_summary: Create WPA2 AP on {interface} (after reboot part, manual resume)
+plugin: shell
+_description:
+ Check if the system maintains AP functionality after the reboot.
+ This job checks if AP still works.
+user: root
+command:
+ sleep ${{WIFI_AP_SETUPTIME:-10}}
+ RES=`iw {interface} info |grep -E "(type\ AP)|(ssid\ Ubuntu_g_wpa2)" |wc -l`
+ wifi-ap.config set disabled=true
+ if [ $RES -eq 2 ]; then exit 0; else exit 1; fi
+requires:
+ wifi_interface_mode.{interface}_AP == 'supported'
+ snap.name == 'wifi-ap'
+depends: wireless/wifi_ap_across_reboot_{interface}_setup_manual
+estimated_duration: 120.0
+environ: WIFI_AP_SETUPTIME
+flags: preserve-locale
diff --git a/units/wireless/wireless-connection-manual.pxu b/units/wireless/wireless-connection-manual.pxu
new file mode 100644
index 0000000..7c3de03
--- /dev/null
+++ b/units/wireless/wireless-connection-manual.pxu
@@ -0,0 +1,171 @@
+
+
+unit: template
+template-resource: device
+template-filter: device.category == 'WIRELESS'
+template-unit: job
+id: wireless/wireless_connection_open_ac_{interface}
+_summary: Connect to unencrypted 802.11ac Wi-Fi network on {interface}
+_purpose:
+ Check system can connect to insecure 802.11ac AP
+_steps:
+ 1. Remove all wireless configuration in /etc/network/interfaces and /etc/network/interfaces.d
+ 2. Commence the test
+_verification:
+ If there's "Connection test passed" message in result, mark the test as passed.
+plugin: user-interact
+command: wifi_client_test -i {interface} -s "$OPEN_AC_SSID"
+environ: OPEN_AC_SSID
+user: root
+category_id: com.canonical.plainbox::wireless
+estimated_duration: 90
+flags: preserve-locale also-after-suspend
+
+unit: template
+template-resource: device
+template-filter: device.category == 'WIRELESS'
+template-unit: job
+id: wireless/wireless_connection_open_bg_{interface}
+_summary: Connect to unencrypted 802.11b/g Wi-Fi network on {interface}
+_purpose:
+ Check system can connect to insecure 802.11b/g AP
+_steps:
+ 1. Remove all wireless configuration in /etc/network/interfaces and /etc/network/interfaces.d
+ 2. Commence the test
+_verification:
+ If there's "Connection test passed" message in result, mark the test as passed.
+plugin: user-interact
+command: wifi_client_test -i {interface} -s "$OPEN_BG_SSID"
+environ: OPEN_BG_SSID
+user: root
+category_id: com.canonical.plainbox::wireless
+estimated_duration: 90
+flags: preserve-locale also-after-suspend
+
+unit: template
+template-resource: device
+template-filter: device.category == 'WIRELESS'
+template-unit: job
+id: wireless/wireless_connection_open_n_{interface}
+_summary: Connect to unencrypted 802.11n Wi-Fi network on {interface}
+_purpose:
+ Check system can connect to insecure 802.11n AP
+_steps:
+ 1. Remove all wireless configuration in /etc/network/interfaces and /etc/network/interfaces.d
+ 2. Commence the test
+_verification:
+ If there's "Connection test passed" message in result, mark the test as passed.
+plugin: user-interact
+command: wifi_client_test -i {interface} -s "$OPEN_N_SSID"
+environ: OPEN_N_SSID
+user: root
+category_id: com.canonical.plainbox::wireless
+estimated_duration: 90
+flags: preserve-locale also-after-suspend
+
+unit: template
+template-resource: device
+template-filter: device.category == 'WIRELESS'
+template-unit: job
+id: wireless/wireless_connection_wpa_ac_{interface}
+_summary: Connect to WPA-encrypted 802.11ac Wi-Fi network on {interface}
+_purpose:
+ Check system can connect to 802.11ac AP with wpa security
+_steps:
+ 1. Remove all wireless configuration in /etc/network/interfaces and /etc/network/interfaces.d
+ 2. Commence the test
+_verification:
+ If there's "Connection test passed" message in result, mark the test as passed.
+plugin: user-interact
+command: wifi_client_test -i {interface} -s "$WPA_AC_SSID" -k "$WPA_AC_PSK"
+environ: WPA_AC_SSID WPA_AC_PSK
+user: root
+category_id: com.canonical.plainbox::wireless
+estimated_duration: 90
+flags: preserve-locale also-after-suspend
+
+unit: template
+template-resource: device
+template-filter: device.category == 'WIRELESS'
+template-unit: job
+id: wireless/wireless_connection_wpa_bg_{interface}
+_summary: Connect to WPA-encrypted 802.11b/g Wi-Fi network {interface}
+_purpose:
+ Check system can connect to 802.11b/g AP with wpa security
+_steps:
+ 1. Remove all wireless configuration in /etc/network/interfaces and /etc/network/interfaces.d
+ 2. Commence the test
+_verification:
+ If there's "Connection test passed" message in result, mark the test as passed.
+plugin: user-interact
+command: wifi_client_test -i {interface} -s "$WPA_BG_SSID" -k "$WPA_BG_PSK"
+environ: WPA_BG_SSID WPA_BG_PSK
+user: root
+category_id: com.canonical.plainbox::wireless
+estimated_duration: 90
+flags: preserve-locale also-after-suspend
+
+unit: template
+template-resource: device
+template-filter: device.category == 'WIRELESS'
+template-unit: job
+id: wireless/wireless_connection_wpa_n_{interface}
+_summary: Connect to WPA-encrypted 802.11n Wi-Fi network on {interface}
+_purpose:
+ Check system can connect to 802.11n AP with wpa security
+_steps:
+ 1. Remove all wireless configuration in /etc/network/interfaces and /etc/network/interfaces.d
+ 2. Commence the test
+_verification:
+ If there's "Connection test passed" message in result, mark the test as passed.
+plugin: user-interact
+command: wifi_client_test -i {interface} -s "$WPA_N_SSID" -k "$WPA_N_PSK"
+environ: WPA_N_SSID WPA_N_PSK
+user: root
+category_id: com.canonical.plainbox::wireless
+estimated_duration: 90
+flags: preserve-locale also-after-suspend
+
+unit: template
+template-resource: device
+template-filter: device.category == 'WIRELESS'
+template-engine: jinja2
+template-unit: job
+plugin: shell
+category_id: com.canonical.plainbox::wireless
+id: wireless/monitor_wireless_connection_udp_{{ interface }}
+requires:
+ connections.slot == 'network-manager:service' and connections.plug == '{{ __system_env__["SNAP_NAME"] }}:network-manager'
+environ:
+ WPA_BG_SSID
+ WPA_BG_PSK
+ TEST_TARGET_IPERF
+command:
+ nmcli g > /dev/null
+ if [ $? -ne 0 ]; then
+ exit 1
+ fi
+ trap "nmcli dev disconnect {{ interface }}; nmcli con delete id WIFI_TEST_CREATED_BY_CHECKBOX" EXIT
+ nmcli -t -f TYPE,UUID c | grep -oP "(?<=^802-11-wireless:).*" | xargs nmcli c delete
+ nmcli dev wifi rescan
+ nmcli dev wifi connect $WPA_BG_SSID password $WPA_BG_PSK ifname {{ interface }} name WIFI_TEST_CREATED_BY_CHECKBOX
+ iw dev {{ interface }} link
+ iperf3 -c $TEST_TARGET_IPERF -t 300 -i 30 -u -b 100m -p 5050
+ exit $?
+estimated_duration: 330.0
+_summary: Wireless connection iperf3 test
+_description:
+ Tests the performance of a system's wireless connection through the iperf3 tool using UDP packets.
+
+plugin: shell
+category_id: com.canonical.plainbox::wireless
+id: after-suspend-wifi/wifi_resume_time_auto
+estimated_duration: 1.2
+depends: suspend/suspend_advanced_auto
+requires:
+ device.category == 'WIRELESS'
+command: network_reconnect_resume_test -t 90 -d wifi
+_summary: Network reconnect resume test (wifi)
+_description:
+ Checks the length of time it takes to reconnect an existing wifi connection
+ after a suspend/resume cycle.
diff --git a/units/wireless/wowlan.pxu b/units/wireless/wowlan.pxu
new file mode 100644
index 0000000..1c11052
--- /dev/null
+++ b/units/wireless/wowlan.pxu
@@ -0,0 +1,165 @@
+unit: template
+template-resource: device
+template-filter: device.category == 'WIRELESS' and device.mac != 'UNKNOWN'
+id: wireless/wowlan_S5_{interface}_wakeonlan
+_summary: Wake on Wireless LAN (WoWLAN) test from S5 - {interface} - wakeonlan
+_purpose:
+ Check that another system can wake up from S5 the SUT using WoWLAN function.
+_steps:
+ 1. Ensure WoWLAN is enabled in BIOS.
+ 2. Initiate connection to an AP (using nmcli)
+ 3. Configure the device for WoWLAN, run the command:
+ $ sudo iw phy phy0 wowlan enable magic-packet
+ 4. Press Enter for S5 (Soft Off).
+ 5. From another computer on the same network run the following command:
+ $ wakeonlan {mac}
+ If wakeonlan tool is not installed run:
+ $ sudo apt install wakeonlan
+ 6. Resume Checkbox
+_verification:
+ Did the SUT wake up from S5?
+plugin: user-interact-verify
+command: poweroff
+user: root
+category_id: com.canonical.plainbox::wireless
+estimated_duration: 120
+flags: preserve-locale
+
+unit: template
+template-resource: device
+template-filter: device.category == 'WIRELESS' and device.mac != 'UNKNOWN'
+id: wireless/wowlan_S5_{interface}_etherwake
+_summary: Wake on Wireless LAN (WoWLAN) test from S5 - {interface} - etherwake
+_purpose:
+ Check that another system can wake up from S5 the SUT using WoWLAN function.
+_steps:
+ 1. Ensure WoWLAN is enabled in BIOS.
+ 2. Initiate connection to an AP (using nmcli)
+ 3. Configure the device for WoWLAN, run the command:
+ $ sudo iw phy phy0 wowlan enable magic-packet
+ 4. Press Enter for S5 (Soft Off).
+ 5. From another computer on the same network run the following command:
+ $ sudo etherwake {mac}
+ If etherwake tool is not installed run:
+ $ sudo apt install etherwake
+ 6. Resume Checkbox
+_verification:
+ Did the SUT wake up from S5?
+plugin: user-interact-verify
+command: poweroff
+user: root
+category_id: com.canonical.plainbox::wireless
+estimated_duration: 120
+flags: preserve-locale
+
+unit: template
+template-resource: device
+template-filter: device.category == 'WIRELESS' and device.mac != 'UNKNOWN'
+id: wireless/wowlan_S4_{interface}_wakeonlan
+_summary: Wake on Wireless LAN (WoWLAN) test from S4 - {interface} - wakeonlan
+_purpose:
+ Check that another system can wake up from S4 the SUT using WoWLAN function.
+_steps:
+ 1. Ensure WoWLAN is enabled in BIOS.
+ 2. Initiate connection to an AP (using nmcli)
+ 3. Configure the device for WoWLAN, run the command:
+ $ sudo iw phy phy0 wowlan enable magic-packet
+ 4. Press Enter to hibernate the system.
+ 5. From another computer on the same network run the following command:
+ $ wakeonlan {mac}
+ If wakeonlan tool is not installed run:
+ $ sudo apt install wakeonlan
+_verification:
+ Did the SUT wake up from S4?
+plugin: user-interact-verify
+requires:
+ sleep.disk == 'supported'
+command: systemctl hibernate
+user: root
+category_id: com.canonical.plainbox::wireless
+estimated_duration: 120
+flags: preserve-locale
+
+unit: template
+template-resource: device
+template-filter: device.category == 'WIRELESS' and device.mac != 'UNKNOWN'
+id: wireless/wowlan_S4_{interface}_etherwake
+_summary: Wake on Wireless LAN (WoWLAN) test from S4 - {interface} - etherwake
+_purpose:
+ Check that another system can wake up from S4 the SUT using WoWLAN function.
+_steps:
+ 1. Ensure WoWLAN is enabled in BIOS.
+ 2. Initiate connection to an AP (using nmcli)
+ 3. Configure the device for WoWLAN, run the command:
+ $ sudo iw phy phy0 wowlan enable magic-packet
+ 4. Press Enter to hibernate the system.
+ 5. From another computer on the same network run the following command:
+ $ sudo etherwake {mac}
+ If etherwake tool is not installed run:
+ $ sudo apt install etherwake
+_verification:
+ Did the SUT wake up from S4?
+plugin: user-interact-verify
+requires:
+ sleep.disk == 'supported'
+command: systemctl hibernate
+user: root
+category_id: com.canonical.plainbox::wireless
+estimated_duration: 120
+flags: preserve-locale
+
+unit: template
+template-resource: device
+template-filter: device.category == 'WIRELESS' and device.mac != 'UNKNOWN'
+id: wireless/wowlan_S3_{interface}_wakeonlan
+_summary: Wake on Wireless LAN (WoWLAN) test from S3 - {interface} - wakeonlan
+_purpose:
+ Check that another system can wake up from S3 the SUT using WoWLAN function.
+_steps:
+ 1. Ensure WoWLAN is enabled in BIOS.
+ 2. Initiate connection to an AP (using nmcli)
+ 3. Configure the device for WoWLAN, run the command:
+ $ sudo iw phy phy0 wowlan enable magic-packet
+ 4. Press Enter to suspend the system.
+ 5. From another computer on the same network run the following command:
+ $ wakeonlan {mac}
+ If wakeonlan tool is not installed run:
+ $ sudo apt install wakeonlan
+_verification:
+ Did the SUT wake up from S3?
+plugin: user-interact-verify
+requires:
+ sleep.mem == 'supported'
+command: systemctl suspend
+user: root
+category_id: com.canonical.plainbox::wireless
+estimated_duration: 120
+flags: preserve-locale
+
+unit: template
+template-resource: device
+template-filter: device.category == 'WIRELESS' and device.mac != 'UNKNOWN'
+id: wireless/wowlan_S3_{interface}_etherwake
+_summary: Wake on Wireless LAN (WoWLAN) test from S3 - {interface} - etherwake
+_purpose:
+ Check that another system can wake up from S3 the SUT using WoWLAN function.
+_steps:
+ 1. Ensure WoWLAN is enabled in BIOS.
+ 2. Initiate connection to an AP (using nmcli)
+ 3. Configure the device for WoWLAN, run the command:
+ $ sudo iw phy phy0 wowlan enable magic-packet
+ 4. Press Enter to suspend the system.
+ 5. From another computer on the same network run the following command:
+ $ sudo etherwake {mac}
+ If etherwake tool is not installed run:
+ $ sudo apt install etherwake
+_verification:
+ Did the SUT wake up from S3?
+plugin: user-interact-verify
+requires:
+ sleep.mem == 'supported'
+command: systemctl suspend
+user: root
+category_id: com.canonical.plainbox::wireless
+estimated_duration: 120
+flags: preserve-locale \ No newline at end of file