ci: cram: wifi: add power save test
Add a CRAM test covering FEAT-105. The test consists of: - Enable all vaps - Enable power save on 2.4.GHz radio - Check the behavior of radio and vaps References: FEAT-105,PPM-3928 Signed-off-by: Houssem Dafdouf <houssem.dafdouf_ext@softathome.com>
This commit is contained in:
parent
c1ba5ad88c
commit
78ace27319
1
.gitlab/tests/cram/mxl25641-hdk-6/109-pwhm-power-save.t
Symbolic link
1
.gitlab/tests/cram/mxl25641-hdk-6/109-pwhm-power-save.t
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../wifi/wifi-power-save.t
|
||||||
@ -241,6 +241,15 @@ get_ssid_ssid() {
|
|||||||
R "usp-cli -j -l Device.WiFi.SSID.?0 | jsonfilter -e @[0]'[@.Alias != \"ep2g0\" && @.Alias != \"ep5g0\" && @.Alias != \"ep6g0\"].SSID'" | LC_ALL=C sort
|
R "usp-cli -j -l Device.WiFi.SSID.?0 | jsonfilter -e @[0]'[@.Alias != \"ep2g0\" && @.Alias != \"ep5g0\" && @.Alias != \"ep6g0\"].SSID'" | LC_ALL=C sort
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# print the status of the accesspoints related to a given radio
|
||||||
|
# In : Radio index
|
||||||
|
# Out : the status of all the accespoint attached to the radio
|
||||||
|
get_radio_ap_status() {
|
||||||
|
local rad=$1
|
||||||
|
rad_name=$(R "ba-cli -l WiFi.Radio.$rad.Name?" | sed '/^$/d')
|
||||||
|
R "ba-cli WiFi.AccessPoint.? | sed -n '/Alias=\"${rad_name}/,/\.Status=/ { /\.Status=/p }'"
|
||||||
|
}
|
||||||
|
|
||||||
# Set MLDUnit
|
# Set MLDUnit
|
||||||
# In : AccessPoint object index, MLDUnit
|
# In : AccessPoint object index, MLDUnit
|
||||||
# Out : MLDUnit value set
|
# Out : MLDUnit value set
|
||||||
|
|||||||
168
.gitlab/tests/cram/wifi/wifi-power-save.t
Normal file
168
.gitlab/tests/cram/wifi/wifi-power-save.t
Normal file
@ -0,0 +1,168 @@
|
|||||||
|
Create R alias:
|
||||||
|
|
||||||
|
$ alias R="${CRAM_REMOTE_COMMAND:-}"
|
||||||
|
$ . "${TESTDIR}/../scripts/wifi.sh"
|
||||||
|
|
||||||
|
$ R logger -t cram "Starting PWHM power save test ..."
|
||||||
|
|
||||||
|
Check RadioPowerSave configuration defaults:
|
||||||
|
|
||||||
|
$ wifi_dm Radio.*.X_PRPLWARE-COM_RadioPowerSave.?
|
||||||
|
Device.WiFi.Radio.1.X_PRPLWARE-COM_RadioPowerSave.Enable=1
|
||||||
|
Device.WiFi.Radio.1.X_PRPLWARE-COM_RadioPowerSave.SteerBandPrio="Lowest"
|
||||||
|
Device.WiFi.Radio.1.X_PRPLWARE-COM_RadioPowerSave.SteerPeriod=1000
|
||||||
|
Device.WiFi.Radio.1.X_PRPLWARE-COM_RadioPowerSave.SteerRetries=1
|
||||||
|
Device.WiFi.Radio.2.X_PRPLWARE-COM_RadioPowerSave.Enable=1
|
||||||
|
Device.WiFi.Radio.2.X_PRPLWARE-COM_RadioPowerSave.SteerBandPrio="Lowest"
|
||||||
|
Device.WiFi.Radio.2.X_PRPLWARE-COM_RadioPowerSave.SteerPeriod=1000
|
||||||
|
Device.WiFi.Radio.2.X_PRPLWARE-COM_RadioPowerSave.SteerRetries=1
|
||||||
|
Device.WiFi.Radio.3.X_PRPLWARE-COM_RadioPowerSave.Enable=1
|
||||||
|
Device.WiFi.Radio.3.X_PRPLWARE-COM_RadioPowerSave.SteerBandPrio="Lowest"
|
||||||
|
Device.WiFi.Radio.3.X_PRPLWARE-COM_RadioPowerSave.SteerPeriod=1000
|
||||||
|
Device.WiFi.Radio.3.X_PRPLWARE-COM_RadioPowerSave.SteerRetries=1
|
||||||
|
|
||||||
|
Stop prplMesh:
|
||||||
|
|
||||||
|
$ R logger -t cram "Stop prplMesh"
|
||||||
|
$ R "ba-cli -l X_PRPLWARE-COM_ProcessManager.PrplMesh.Enable=0" | tr -d '\n'
|
||||||
|
0 (no-eol)
|
||||||
|
|
||||||
|
$ sleep 5
|
||||||
|
|
||||||
|
Enable all AccessPoints:
|
||||||
|
|
||||||
|
$ R logger -t cram "Enables all vaps"
|
||||||
|
$ wifi_dm "AccessPoint.*.Enable=1"
|
||||||
|
Device.WiFi.AccessPoint.1.Enable=1
|
||||||
|
Device.WiFi.AccessPoint.2.Enable=1
|
||||||
|
Device.WiFi.AccessPoint.3.Enable=1
|
||||||
|
Device.WiFi.AccessPoint.4.Enable=1
|
||||||
|
Device.WiFi.AccessPoint.5.Enable=1
|
||||||
|
Device.WiFi.AccessPoint.6.Enable=1
|
||||||
|
Device.WiFi.AccessPoint.7.Enable=1
|
||||||
|
Device.WiFi.AccessPoint.8.Enable=1
|
||||||
|
Device.WiFi.AccessPoint.9.Enable=1
|
||||||
|
|
||||||
|
$ sleep 10
|
||||||
|
|
||||||
|
Check AccessPoints status:
|
||||||
|
|
||||||
|
$ wifi_dm "AccessPoint.*.Status?0"
|
||||||
|
Device.WiFi.AccessPoint.1.Status="Enabled"
|
||||||
|
Device.WiFi.AccessPoint.2.Status="Enabled"
|
||||||
|
Device.WiFi.AccessPoint.3.Status="Enabled"
|
||||||
|
Device.WiFi.AccessPoint.4.Status="Enabled"
|
||||||
|
Device.WiFi.AccessPoint.5.Status="Enabled"
|
||||||
|
Device.WiFi.AccessPoint.6.Status="Enabled"
|
||||||
|
Device.WiFi.AccessPoint.7.Status="Enabled"
|
||||||
|
Device.WiFi.AccessPoint.8.Status="Enabled"
|
||||||
|
Device.WiFi.AccessPoint.9.Status="Enabled"
|
||||||
|
|
||||||
|
Check radio status:
|
||||||
|
|
||||||
|
$ wifi_dm "Radio.*.Status?"
|
||||||
|
Device.WiFi.Radio.1.Status="Up"
|
||||||
|
Device.WiFi.Radio.2.Status="Up"
|
||||||
|
Device.WiFi.Radio.3.Status="Up"
|
||||||
|
|
||||||
|
Save hostap pid:
|
||||||
|
|
||||||
|
$ hostap_pid=$(R pgrep -f 'hostapd')
|
||||||
|
$ R logger -t cram "hostap PID : $hostap_pid"
|
||||||
|
|
||||||
|
Trigger power save on Radio 1:
|
||||||
|
|
||||||
|
$ R logger -t cram "call SetRadioPowerDown"
|
||||||
|
$ R "ba-cli -l 'Device.WiFi.Radio.1.X_PRPLWARE-COM_SetRadioPowerDown()'" | sed '/^$/d'
|
||||||
|
Device.WiFi.Radio.1.X_PRPLWARE-COM_SetRadioPowerDown() returned
|
||||||
|
[
|
||||||
|
{
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
$ sleep 10
|
||||||
|
|
||||||
|
Check radio status:
|
||||||
|
|
||||||
|
$ wifi_dm "Radio.1.Enable?"
|
||||||
|
Device.WiFi.Radio.1.Enable=0
|
||||||
|
|
||||||
|
$ wifi_dm "Radio.1.Status?"
|
||||||
|
Device.WiFi.Radio.1.Status="Down"
|
||||||
|
|
||||||
|
Check corresponding AccessPoints status:
|
||||||
|
|
||||||
|
$ get_radio_ap_status 1
|
||||||
|
WiFi.AccessPoint.\d+.Status="Disabled" (re)
|
||||||
|
WiFi.AccessPoint.\d+.Status="Disabled" (re)
|
||||||
|
WiFi.AccessPoint.\d+.Status="Disabled" (re)
|
||||||
|
|
||||||
|
Re-enable Radio 1 and check the related vaps status:
|
||||||
|
|
||||||
|
$ R logger -t cram "Enable Radio 1"
|
||||||
|
$ wifi_dm "Radio.1.Enable=1"
|
||||||
|
Device.WiFi.Radio.1.Enable=1
|
||||||
|
|
||||||
|
$ sleep 10
|
||||||
|
|
||||||
|
$ get_radio_ap_status 1
|
||||||
|
WiFi.AccessPoint.\d+.Status="Enabled" (re)
|
||||||
|
WiFi.AccessPoint.\d+.Status="Enabled" (re)
|
||||||
|
WiFi.AccessPoint.\d+.Status="Enabled" (re)
|
||||||
|
|
||||||
|
Before leaving the test, check if hostap pid has changed or not:
|
||||||
|
|
||||||
|
$ if [ "$(R pgrep -f 'hostapd')" = "$hostap_pid" ]; then echo "true"; else echo "hostap restarted during the test !"; fi
|
||||||
|
true
|
||||||
|
|
||||||
|
Disable all vaps:
|
||||||
|
|
||||||
|
$ R logger -t cram "Disable all vaps"
|
||||||
|
$ wifi_dm "AccessPoint.*.Enable=0"
|
||||||
|
Device.WiFi.AccessPoint.1.Enable=0
|
||||||
|
Device.WiFi.AccessPoint.2.Enable=0
|
||||||
|
Device.WiFi.AccessPoint.3.Enable=0
|
||||||
|
Device.WiFi.AccessPoint.4.Enable=0
|
||||||
|
Device.WiFi.AccessPoint.5.Enable=0
|
||||||
|
Device.WiFi.AccessPoint.6.Enable=0
|
||||||
|
Device.WiFi.AccessPoint.7.Enable=0
|
||||||
|
Device.WiFi.AccessPoint.8.Enable=0
|
||||||
|
Device.WiFi.AccessPoint.9.Enable=0
|
||||||
|
|
||||||
|
$ sleep 10
|
||||||
|
|
||||||
|
Check AccessPoints status:
|
||||||
|
|
||||||
|
$ wifi_dm "AccessPoint.*.Status?0"
|
||||||
|
Device.WiFi.AccessPoint.1.Status="Disabled"
|
||||||
|
Device.WiFi.AccessPoint.2.Status="Disabled"
|
||||||
|
Device.WiFi.AccessPoint.3.Status="Disabled"
|
||||||
|
Device.WiFi.AccessPoint.4.Status="Disabled"
|
||||||
|
Device.WiFi.AccessPoint.5.Status="Disabled"
|
||||||
|
Device.WiFi.AccessPoint.6.Status="Disabled"
|
||||||
|
Device.WiFi.AccessPoint.7.Status="Disabled"
|
||||||
|
Device.WiFi.AccessPoint.8.Status="Disabled"
|
||||||
|
Device.WiFi.AccessPoint.9.Status="Disabled"
|
||||||
|
|
||||||
|
Re-enable Radio 1 and check that it's back to default state (Dormant):
|
||||||
|
|
||||||
|
$ wifi_dm "Radio.1.Enable=1"
|
||||||
|
Device.WiFi.Radio.1.Enable=1
|
||||||
|
|
||||||
|
$ sleep 10
|
||||||
|
|
||||||
|
Check radio status:
|
||||||
|
|
||||||
|
$ wifi_dm "Radio.*.Status?"
|
||||||
|
Device.WiFi.Radio.1.Status="Dormant"
|
||||||
|
Device.WiFi.Radio.2.Status="Dormant"
|
||||||
|
Device.WiFi.Radio.3.Status="Dormant"
|
||||||
|
|
||||||
|
Resume prplMesh:
|
||||||
|
|
||||||
|
$ R logger -t cram "Resume prplMesh"
|
||||||
|
$ R "ba-cli -l X_PRPLWARE-COM_ProcessManager.PrplMesh.Enable=1" | tr -d '\n'
|
||||||
|
1 (no-eol)
|
||||||
|
|
||||||
|
$ sleep 10
|
||||||
|
$ R logger -t cram "Test finished!"
|
||||||
1
.gitlab/tests/cram/wnc-freedom/109-pwhm-power-save.t
Symbolic link
1
.gitlab/tests/cram/wnc-freedom/109-pwhm-power-save.t
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../wifi/wifi-power-save.t
|
||||||
Loading…
Reference in New Issue
Block a user