Merge ~morphis/snappy-hwe-snaps/+git/network-manager:b/fix-stable-wifi-ap-tests into ~snappy-hwe-team/snappy-hwe-snaps/+git/network-manager:stable

Proposed by Simon Fels
Status: Merged
Approved by: Alfonso Sanchez-Beato
Approved revision: ac4408c843cae3f8ec76cfce8ee324132a8463c7
Merged at revision: 2a20a27b21eeaf78d59d7a6f1d393f99c2e3fee4
Proposed branch: ~morphis/snappy-hwe-snaps/+git/network-manager:b/fix-stable-wifi-ap-tests
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/network-manager:stable
Diff against target: 76 lines (+16/-18)
3 files modified
tests/lib/prepare-all.sh (+12/-0)
tests/main/suspend-resume/task.yaml (+0/-6)
tests/main/wifi-connect-secured-ap/task.yaml (+4/-12)
Reviewer Review Type Date Requested Status
System Enablement Bot continuous-integration Approve
Alfonso Sanchez-Beato Approve
Review via email: mp+320601@code.launchpad.net

Description of the change

Backport single change to stable to get unit tests working:

ac4408c Fix wifi-ap.config invokation

To post a comment you must log in.
Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

LGTM

review: Approve
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/tests/lib/prepare-all.sh b/tests/lib/prepare-all.sh
2index 1194d1f..1c1419c 100644
3--- a/tests/lib/prepare-all.sh
4+++ b/tests/lib/prepare-all.sh
5@@ -1,5 +1,17 @@
6 #!/bin/bash
7
8+cat << EOF > /etc/systemd/system/load-mac80211-hwsim.service
9+[Unit]
10+Description=Load mac8022_hwsim driver
11+[Service]
12+ExecStart=/sbin/modprobe mac80211_hwsim radios=2
13+[Install]
14+WantedBy=multi-user.target
15+EOF
16+
17+systemctl enable load-mac80211-hwsim
18+systemctl start load-mac80211-hwsim
19+
20 # We don't have to build a snap when we should use one from a
21 # channel
22 if [ -n "$SNAP_CHANNEL" ] ; then
23diff --git a/tests/main/suspend-resume/task.yaml b/tests/main/suspend-resume/task.yaml
24index 09cb2cc..2f89e25 100644
25--- a/tests/main/suspend-resume/task.yaml
26+++ b/tests/main/suspend-resume/task.yaml
27@@ -1,15 +1,9 @@
28 summary: Verify suspend/resume tracking works reliable
29
30-restore: |
31- rmmod mac80211_hwsim
32-
33 execute: |
34 # Install necessary test-tools, we need inotify-tools in this case
35 snap install --edge se-test-tools
36
37- # Get two connected wifi network interfaces wlan0 and wlan1
38- modprobe mac80211_hwsim radios=2
39-
40 # FIXME: take the one from edge for now as that is the one which
41 # has automatic setup capabilities
42 snap install --edge wifi-ap
43diff --git a/tests/main/wifi-connect-secured-ap/task.yaml b/tests/main/wifi-connect-secured-ap/task.yaml
44index aa6a70c..16ebf3f 100644
45--- a/tests/main/wifi-connect-secured-ap/task.yaml
46+++ b/tests/main/wifi-connect-secured-ap/task.yaml
47@@ -4,25 +4,17 @@ environment:
48 WIFI_SSID: Ubuntu
49 WIFI_PASSPHRASE: Test1234
50
51-restore: |
52- rmmod mac80211_hwsim
53-
54 execute: |
55- # Get two connected wifi network interfaces wlan0 and wlan1 and
56- # give the system soem time to settle
57- modprobe mac80211_hwsim radios=2
58- sleep 1
59-
60 snap install wifi-ap
61 # FIXME: until the wifi-ap utility is clever enough to retry
62 # connecting with the service we need to add a short sleep here
63 sleep 0.5
64
65 # Setup the AP on wlan0
66- /snap/bin/wifi-ap.config set wifi.interface wlan0
67- /snap/bin/wifi-ap.config set wifi.ssid $WIFI_SSID
68- /snap/bin/wifi-ap.config set wifi.security wpa2
69- /snap/bin/wifi-ap.config set wifi.security-passphrase $WIFI_PASSPHRASE
70+ /snap/bin/wifi-ap.config set wifi.interface=wlan0
71+ /snap/bin/wifi-ap.config set wifi.ssid=$WIFI_SSID
72+ /snap/bin/wifi-ap.config set wifi.security=wpa2
73+ /snap/bin/wifi-ap.config set wifi.security-passphrase=$WIFI_PASSPHRASE
74
75 # AP needs a bit to appear and be visible for NetworkManager
76 /snap/bin/network-manager.nmcli d wifi rescan

Subscribers

People subscribed via source and target branches