Pragyansh Chaturvedi has proposed merging ~r41k0u/ubuntu-manual-tests:raspi-utils-tests into ubuntu-manual-tests:main.
Commit message: Add tests for raspi-utils Add tests for the following utils in raspi-utils: * vcgencmd * vcmailbox * dtmerge * dtoverlay * dtparam * pinctrl * raspinfo Requested reviews: Dave Jones (waveform) Related bugs: Bug #2094805 in raspi-utils (Ubuntu): "[MIR] raspi-utils" https://bugs.launchpad.net/ubuntu/+source/raspi-utils/+bug/2094805 For more details, see: https://code.launchpad.net/~r41k0u/ubuntu-manual-tests/+git/ubuntu-manual-tests/+merge/480718 -- Your team Canonical's Ubuntu QA is subscribed to branch ubuntu-manual-tests:main.
diff --git a/definitions/pi_desktop_cases.xml b/definitions/pi_desktop_cases.xml index c326fc8..e8772a8 100644 --- a/definitions/pi_desktop_cases.xml +++ b/definitions/pi_desktop_cases.xml @@ -256,6 +256,78 @@ </dd> </ut:test> + <ut:test id="vcgencmd"> + <dt> + Check the CPU clock speed using <code>vcgencmd</code> + <ul> + <li>Stress the CPU by doing <code>yes > /dev/null &</code></li> + <li>Run <code>sudo vcgencmd measure_clock arm</code> after about 5 sec</li> + <li>Kill the stress process</li> + </ul> + </dt> + <dd>The output should be around <ut:var name="clock" /></dd> + </ut:test> + + <ut:test id="vcmailbox"> + <dt> + Run <code>sudo vcmailbox 0x00010004 8 8 0 0</code> + </dt> + <dd> + The output should have the board serial number as the 6th integer. + </dd> + </ut:test> + + <ut:test id="dtmerge"> + <dt> + Test <code>dtmerge</code> + <ul> + <li>Copy the live device tree using <code>dtc -I fs -O dtb -o test.dtb /proc/device-tree</code></li> + <li>Use dtmerge to overclock the SD card. <code>dtmerge test.dtb merged.dtb - sd_overclock=62</code></li> + <li>Check the contents of the new DTB. <code>dtdiff test.dtb merged.dtb</code></li> + <li>Delete both test.dtb and merged.dtb</li> + </ul> + </dt> + <dd> + merged.dtb should have <code>brcm,overclock-50 = 0x3e</code> under the SD card device. + </dd> + </ut:test> + + <ut:test id="dtoverlay"> + <dt> + Test <code>dtoverlay</code> + <ul> + <li>Run <code>sudo dtoverlay pwm</code></li> + <li>Run <code>sudo dtoverlay -l</code></li> + </ul> + </dt> + <dd>The PWM Overlay should show up as loaded. Remove it by running <code>sudo dtoverlay -r pwm</code></dd> + </ut:test> + + <ut:test id="dtparam"> + <dt> + Test <code>dtparam</code> + <ul> + <li>Run <code>sudo dtparam sd_overclock=62</code></li> + <li>Run <code>sudo dtparam -l</code></li> + </ul> + </dt> + <dd>The sd_overclock parameter should show up as set. Remove it by running <code>sudo dtparam -r 0</code></dd> + </ut:test> + + <ut:test id="pinctrl"> + <dt> + Run <code>sudo pinctrl</code> + </dt> + <dd>THe output should have status of the GPIO pins.</dd> + </ut:test> + + <ut:test id="raspinfo"> + <dt> + Run <code>sudo raspinfo</code> + </dt> + <dd>The output should have an information dump about the Pi.</dd> + </ut:test> + <ut:case id="1745_RaspberryPi 4 4GB Desktop SD"> <ut:define name="model">Raspberry Pi 4 4GB</ut:define> <ut:define name="storage">an SD card</ut:define> @@ -276,6 +348,13 @@ <ut:include ref="www-video" /> <ut:include ref="local-video" /> <ut:include ref="lock-screen" /> + <ut:include ref="vcgencmd"><ut:define name="clock">1.8GHz</ut:define></ut:include> + <ut:include ref="vcmailbox" /> + <ut:include ref="dtmerge" /> + <ut:include ref="dtoverlay" /> + <ut:include ref="dtparam" /> + <ut:include ref="pinctrl" /> + <ut:include ref="raspinfo" /> </ut:case> <ut:case id="1812_RaspberryPi 4 4GB Desktop USB"> @@ -298,6 +377,13 @@ <ut:include ref="www-video" /> <ut:include ref="local-video" /> <ut:include ref="lock-screen" /> + <ut:include ref="vcgencmd"><ut:define name="clock">1.8GHz</ut:define></ut:include> + <ut:include ref="vcmailbox" /> + <ut:include ref="dtmerge" /> + <ut:include ref="dtoverlay" /> + <ut:include ref="dtparam" /> + <ut:include ref="pinctrl" /> + <ut:include ref="raspinfo" /> </ut:case> <ut:case id="1746_RaspberryPi 4 8GB Desktop SD"> @@ -320,6 +406,13 @@ <ut:include ref="www-video" /> <ut:include ref="local-video" /> <ut:include ref="lock-screen" /> + <ut:include ref="vcgencmd"><ut:define name="clock">1.8GHz</ut:define></ut:include> + <ut:include ref="vcmailbox" /> + <ut:include ref="dtmerge" /> + <ut:include ref="dtoverlay" /> + <ut:include ref="dtparam" /> + <ut:include ref="pinctrl" /> + <ut:include ref="raspinfo" /> </ut:case> <ut:case id="1813_RaspberryPi 4 8GB Desktop USB"> @@ -342,6 +435,13 @@ <ut:include ref="www-video" /> <ut:include ref="local-video" /> <ut:include ref="lock-screen" /> + <ut:include ref="vcgencmd"><ut:define name="clock">1.8GHz</ut:define></ut:include> + <ut:include ref="vcmailbox" /> + <ut:include ref="dtmerge" /> + <ut:include ref="dtoverlay" /> + <ut:include ref="dtparam" /> + <ut:include ref="pinctrl" /> + <ut:include ref="raspinfo" /> </ut:case> <ut:case id="1747_RaspberryPi 400 Desktop SD"> @@ -364,6 +464,13 @@ <ut:include ref="www-video" /> <ut:include ref="local-video" /> <ut:include ref="lock-screen" /> + <ut:include ref="vcgencmd"><ut:define name="clock">1.8GHz</ut:define></ut:include> + <ut:include ref="vcmailbox" /> + <ut:include ref="dtmerge" /> + <ut:include ref="dtoverlay" /> + <ut:include ref="dtparam" /> + <ut:include ref="pinctrl" /> + <ut:include ref="raspinfo" /> </ut:case> <ut:case id="1814_RaspberryPi 400 Desktop USB"> @@ -386,6 +493,13 @@ <ut:include ref="www-video" /> <ut:include ref="local-video" /> <ut:include ref="lock-screen" /> + <ut:include ref="vcgencmd"><ut:define name="clock">1.8GHz</ut:define></ut:include> + <ut:include ref="vcmailbox" /> + <ut:include ref="dtmerge" /> + <ut:include ref="dtoverlay" /> + <ut:include ref="dtparam" /> + <ut:include ref="pinctrl" /> + <ut:include ref="raspinfo" /> </ut:case> <ut:case id="1749_RaspberryPi CM4 4GB Desktop eMMC"> @@ -462,6 +576,13 @@ <ut:include ref="www-video" /> <ut:include ref="local-video" /> <ut:include ref="lock-screen" /> + <ut:include ref="vcgencmd"><ut:define name="clock">1.8GHz</ut:define></ut:include> + <ut:include ref="vcmailbox" /> + <ut:include ref="dtmerge" /> + <ut:include ref="dtoverlay" /> + <ut:include ref="dtparam" /> + <ut:include ref="pinctrl" /> + <ut:include ref="raspinfo" /> </ut:case> <ut:case id="1815_RaspberryPi 5 4GB Desktop USB3"> @@ -484,6 +605,13 @@ <ut:include ref="www-video" /> <ut:include ref="local-video" /> <ut:include ref="lock-screen" /> + <ut:include ref="vcgencmd"><ut:define name="clock">1.8GHz</ut:define></ut:include> + <ut:include ref="vcmailbox" /> + <ut:include ref="dtmerge" /> + <ut:include ref="dtoverlay" /> + <ut:include ref="dtparam" /> + <ut:include ref="pinctrl" /> + <ut:include ref="raspinfo" /> </ut:case> <ut:case id="1816_RaspberryPi 5 4GB Desktop NVMe"> @@ -506,6 +634,13 @@ <ut:include ref="www-video" /> <ut:include ref="local-video" /> <ut:include ref="lock-screen" /> + <ut:include ref="vcgencmd"><ut:define name="clock">1.8GHz</ut:define></ut:include> + <ut:include ref="vcmailbox" /> + <ut:include ref="dtmerge" /> + <ut:include ref="dtoverlay" /> + <ut:include ref="dtparam" /> + <ut:include ref="pinctrl" /> + <ut:include ref="raspinfo" /> </ut:case> <ut:case id="1792_RaspberryPi 5 8GB Desktop SD"> @@ -528,6 +663,13 @@ <ut:include ref="www-video" /> <ut:include ref="local-video" /> <ut:include ref="lock-screen" /> + <ut:include ref="vcgencmd"><ut:define name="clock">1.8GHz</ut:define></ut:include> + <ut:include ref="vcmailbox" /> + <ut:include ref="dtmerge" /> + <ut:include ref="dtoverlay" /> + <ut:include ref="dtparam" /> + <ut:include ref="pinctrl" /> + <ut:include ref="raspinfo" /> </ut:case> <ut:case id="1817_RaspberryPi 5 8GB Desktop USB"> @@ -550,6 +692,13 @@ <ut:include ref="www-video" /> <ut:include ref="local-video" /> <ut:include ref="lock-screen" /> + <ut:include ref="vcgencmd"><ut:define name="clock">1.8GHz</ut:define></ut:include> + <ut:include ref="vcmailbox" /> + <ut:include ref="dtmerge" /> + <ut:include ref="dtoverlay" /> + <ut:include ref="dtparam" /> + <ut:include ref="pinctrl" /> + <ut:include ref="raspinfo" /> </ut:case> <ut:case id="1818_RaspberryPi 5 8GB Desktop USB"> @@ -572,5 +721,12 @@ <ut:include ref="www-video" /> <ut:include ref="local-video" /> <ut:include ref="lock-screen" /> + <ut:include ref="vcgencmd"><ut:define name="clock">1.8GHz</ut:define></ut:include> + <ut:include ref="vcmailbox" /> + <ut:include ref="dtmerge" /> + <ut:include ref="dtoverlay" /> + <ut:include ref="dtparam" /> + <ut:include ref="pinctrl" /> + <ut:include ref="raspinfo" /> </ut:case> </ut:configuration> diff --git a/definitions/pi_server_cases.xml b/definitions/pi_server_cases.xml index 42ac3af..4a6e763 100644 --- a/definitions/pi_server_cases.xml +++ b/definitions/pi_server_cases.xml @@ -232,6 +232,78 @@ <dd>Audio can be heard through the device</dd> </ut:test> + <ut:test id="vcgencmd"> + <dt> + Check the CPU clock speed using <code>vcgencmd</code> + <ul> + <li>Stress the CPU by doing <code>yes > /dev/null &</code></li> + <li>Run <code>sudo vcgencmd measure_clock arm</code> after about 5 sec</li> + <li>Kill the stress process</li> + </ul> + </dt> + <dd>The output should be around <ut:var name="clock" /></dd> + </ut:test> + + <ut:test id="vcmailbox"> + <dt> + Run <code>sudo vcmailbox 0x00010004 8 8 0 0</code> + </dt> + <dd> + The output should have the board serial number as the 6th integer. + </dd> + </ut:test> + + <ut:test id="dtmerge"> + <dt> + Test <code>dtmerge</code> + <ul> + <li>Copy the live device tree using <code>dtc -I fs -O dtb -o test.dtb /proc/device-tree</code></li> + <li>Use dtmerge to overclock the SD card. <code>dtmerge test.dtb merged.dtb - sd_overclock=62</code></li> + <li>Check the contents of the new DTB. <code>dtdiff test.dtb merged.dtb</code></li> + <li>Delete both test.dtb and merged.dtb</li> + </ul> + </dt> + <dd> + merged.dtb should have <code>brcm,overclock-50 = 0x3e</code> under the SD card device. + </dd> + </ut:test> + + <ut:test id="dtoverlay"> + <dt> + Test <code>dtoverlay</code> + <ul> + <li>Run <code>sudo dtoverlay pwm</code></li> + <li>Run <code>sudo dtoverlay -l</code></li> + </ul> + </dt> + <dd>The PWM Overlay should show up as loaded. Remove it by running <code>sudo dtoverlay -r pwm</code></dd> + </ut:test> + + <ut:test id="dtparam"> + <dt> + Test <code>dtparam</code> + <ul> + <li>Run <code>sudo dtparam sd_overclock=62</code></li> + <li>Run <code>sudo dtparam -l</code></li> + </ul> + </dt> + <dd>The sd_overclock parameter should show up as set. Remove it by running <code>sudo dtparam -r 0</code></dd> + </ut:test> + + <ut:test id="pinctrl"> + <dt> + Run <code>sudo pinctrl</code> + </dt> + <dd>THe output should have status of the GPIO pins.</dd> + </ut:test> + + <ut:test id="raspinfo"> + <dt> + Run <code>sudo raspinfo</code> + </dt> + <dd>The output should have an information dump about the Pi.</dd> + </ut:test> + <ut:case id="1711_RaspberryPi 4 2GB Post-install"> <ut:define name="model">Raspberry Pi 4 2GB</ut:define> <ut:include ref="power-led" /> @@ -260,6 +332,13 @@ <ut:include ref="ethernet"><ut:define name="intf">eth0</ut:define></ut:include> <ut:include ref="wifi"><ut:define name="intf">wlan0</ut:define></ut:include> <ut:include ref="bluetooth" /> + <ut:include ref="vcgencmd"><ut:define name="clock">1.8GHz</ut:define></ut:include> + <ut:include ref="vcmailbox" /> + <ut:include ref="dtmerge" /> + <ut:include ref="dtoverlay" /> + <ut:include ref="dtparam" /> + <ut:include ref="pinctrl" /> + <ut:include ref="raspinfo" /> </ut:case> <ut:case id="1719_RaspberryPi 4 4GB Post-install"> @@ -290,6 +369,13 @@ <ut:include ref="ethernet"><ut:define name="intf">eth0</ut:define></ut:include> <ut:include ref="wifi"><ut:define name="intf">wlan0</ut:define></ut:include> <ut:include ref="bluetooth" /> + <ut:include ref="vcgencmd"><ut:define name="clock">1.8GHz</ut:define></ut:include> + <ut:include ref="vcmailbox" /> + <ut:include ref="dtmerge" /> + <ut:include ref="dtoverlay" /> + <ut:include ref="dtparam" /> + <ut:include ref="pinctrl" /> + <ut:include ref="raspinfo" /> </ut:case> <ut:case id="1720_RaspberryPi 4 8GB Post-install"> @@ -320,6 +406,13 @@ <ut:include ref="ethernet"><ut:define name="intf">eth0</ut:define></ut:include> <ut:include ref="wifi"><ut:define name="intf">wlan0</ut:define></ut:include> <ut:include ref="bluetooth" /> + <ut:include ref="vcgencmd"><ut:define name="clock">1.8GHz</ut:define></ut:include> + <ut:include ref="vcmailbox" /> + <ut:include ref="dtmerge" /> + <ut:include ref="dtoverlay" /> + <ut:include ref="dtparam" /> + <ut:include ref="pinctrl" /> + <ut:include ref="raspinfo" /> </ut:case> <ut:case id="1721_RaspberryPi 3B+ Post-install"> @@ -463,6 +556,13 @@ <ut:include ref="ethernet"><ut:define name="intf">eth0</ut:define></ut:include> <ut:include ref="wifi"><ut:define name="intf">wlan0</ut:define></ut:include> <ut:include ref="bluetooth" /> + <ut:include ref="vcgencmd"><ut:define name="clock">1.8GHz</ut:define></ut:include> + <ut:include ref="vcmailbox" /> + <ut:include ref="dtmerge" /> + <ut:include ref="dtoverlay" /> + <ut:include ref="dtparam" /> + <ut:include ref="pinctrl" /> + <ut:include ref="raspinfo" /> </ut:case> <ut:case id="1741_RaspberryPi CM4 2GB Post-install"> @@ -581,6 +681,13 @@ <ut:include ref="ethernet"><ut:define name="intf">eth0</ut:define></ut:include> <ut:include ref="wifi"><ut:define name="intf">wlan0</ut:define></ut:include> <ut:include ref="bluetooth" /> + <ut:include ref="vcgencmd"><ut:define name="clock">2.4GHz</ut:define></ut:include> + <ut:include ref="vcmailbox" /> + <ut:include ref="dtmerge" /> + <ut:include ref="dtoverlay" /> + <ut:include ref="dtparam" /> + <ut:include ref="pinctrl" /> + <ut:include ref="raspinfo" /> </ut:case> <ut:case id="1793_RaspberryPi 5 4GB Post-install"> @@ -607,6 +714,13 @@ <ut:include ref="ethernet"><ut:define name="intf">eth0</ut:define></ut:include> <ut:include ref="wifi"><ut:define name="intf">wlan0</ut:define></ut:include> <ut:include ref="bluetooth" /> + <ut:include ref="vcgencmd"><ut:define name="clock">2.4GHz</ut:define></ut:include> + <ut:include ref="vcmailbox" /> + <ut:include ref="dtmerge" /> + <ut:include ref="dtoverlay" /> + <ut:include ref="dtparam" /> + <ut:include ref="pinctrl" /> + <ut:include ref="raspinfo" /> </ut:case> <ut:case id="1794_RaspberryPi 5 8GB Post-install"> @@ -633,5 +747,12 @@ <ut:include ref="ethernet"><ut:define name="intf">eth0</ut:define></ut:include> <ut:include ref="wifi"><ut:define name="intf">wlan0</ut:define></ut:include> <ut:include ref="bluetooth" /> + <ut:include ref="vcgencmd"><ut:define name="clock">2.4GHz</ut:define></ut:include> + <ut:include ref="vcmailbox" /> + <ut:include ref="dtmerge" /> + <ut:include ref="dtoverlay" /> + <ut:include ref="dtparam" /> + <ut:include ref="pinctrl" /> + <ut:include ref="raspinfo" /> </ut:case> </ut:configuration>
-- Mailing list: https://launchpad.net/~canonical-ubuntu-qa Post to : canonical-ubuntu-qa@lists.launchpad.net Unsubscribe : https://launchpad.net/~canonical-ubuntu-qa More help : https://help.launchpad.net/ListHelp