diff options
Diffstat (limited to 'units')
39 files changed, 458 insertions, 164 deletions
diff --git a/units/audio/jobs.pxu b/units/audio/jobs.pxu index 538d213..1fad964 100644 --- a/units/audio/jobs.pxu +++ b/units/audio/jobs.pxu @@ -341,6 +341,7 @@ _description: plugin: shell category_id: com.canonical.plainbox::audio id: audio/alsa_record_playback_automated +depends: audio/detect_sinks_sources estimated_duration: 10.0 requires: package.name == 'python3-gi' @@ -357,6 +358,17 @@ _description: plugin: shell category_id: com.canonical.plainbox::audio +id: audio/detect_sinks_sources +estimated_duration: 1.0 +requires: + package.name == 'pulseaudio-utils' +command: + pactl_list.sh +_description: + Test to detect if there's available sources and sinks. + +plugin: shell +category_id: com.canonical.plainbox::audio id: audio/alsa_info_collect estimated_duration: 2.0 command: alsa_info --no-dialog --no-upload --output "${PLAINBOX_SESSION_SHARE}"/alsa_info.log @@ -590,7 +602,7 @@ plugin: shell category_id: com.canonical.plainbox::audio id: audio/alsa_record_playback_automated_after_suspend_30_cycles estimated_duration: 10.0 -depends: power-management/suspend_30_cycles +depends: power-management/suspend_30_cycles audio/detect_sinks_sources_after_suspend_30_cycles requires: package.name == 'python3-gi' package.name == 'gir1.2-gstreamer-1.0' @@ -606,6 +618,17 @@ _description: plugin: shell category_id: com.canonical.plainbox::audio +id: audio/detect_sinks_sources_after_suspend_30_cycles +estimated_duration: 1.0 +requires: + package.name == 'pulseaudio-utils' +command: + pactl_list.sh +_description: + Test to detect if there's available sources and sinks after suspending 30 times. + +plugin: shell +category_id: com.canonical.plainbox::audio id: audio/check_volume_after_suspend_30_cycles estimated_duration: 1.0 depends: power-management/suspend_30_cycles diff --git a/units/camera/jobs.pxu b/units/camera/jobs.pxu index 7c0b1d0..285fc2e 100644 --- a/units/camera/jobs.pxu +++ b/units/camera/jobs.pxu @@ -2,8 +2,9 @@ plugin: shell category_id: com.canonical.plainbox::camera id: camera/detect estimated_duration: 1.2 +imports: from com.canonical.plainbox import manifest requires: - device.category == 'CAPTURE' + manifest.has_camera == 'True' command: camera_test.py detect _summary: This Automated test attempts to detect a camera. @@ -144,6 +145,12 @@ category_id: com.canonical.plainbox::camera id: camera/roundtrip-qrcode_{{ name }} _summary: Test video output and camera {{ name }} by displaying and reading a qrcode estimated_duration: 5.0 +depends: + {%- if category == 'MMAL' %} + camera/detect-rpi + {%- else %} + camera/detect + {% endif -%} requires: {%- if __on_ubuntucore__ %} lsb.release >= '19.1' diff --git a/units/camera/manifest.pxu b/units/camera/manifest.pxu index de12798..ed79336 100644 --- a/units/camera/manifest.pxu +++ b/units/camera/manifest.pxu @@ -1,4 +1,9 @@ unit: manifest entry id: has_rpi_camera _name: RaspberryPi Camera Module -value-type: bool \ No newline at end of file +value-type: bool + +unit: manifest entry +id: has_camera +_name: Camera/Capture Device +value-type: bool diff --git a/units/cpu/jobs.pxu b/units/cpu/jobs.pxu index c442bee..afdd6ea 100644 --- a/units/cpu/jobs.pxu +++ b/units/cpu/jobs.pxu @@ -86,7 +86,7 @@ plugin: shell category_id: com.canonical.plainbox::cpu id: cpu/topology estimated_duration: 1.0 -requires: int(cpuinfo.count) > 1 and (cpuinfo.platform == 'i386' or cpuinfo.platform == 'x86_64' or cpuinfo.platform == 's390x') +requires: int(cpuinfo.count) > 1 and (cpuinfo.platform == 'i386' or cpuinfo.platform == 'x86_64') command: cpu_topology.py _summary: Check CPU topology for accuracy between proc and sysfs @@ -177,3 +177,13 @@ _siblings: [ "command": "cpuinfo_resource.py | diff $PLAINBOX_SESSION_SHARE/cpuinfo_before_suspend -", "depends": "com.canonical.certification::suspend/suspend_advanced_auto"} ] + +plugin: shell +category_id: com.canonical.plainbox::cpu +id: cpu/cpufreq_test-server +user: root +command: cpufreq_test.py -q +_summary: + cpufreq scaling test +_description: + Comprehensive testing of cpu scaling capabilities and directives via cpufreq. diff --git a/units/cpu/test-plan.pxu b/units/cpu/test-plan.pxu index 5d06090..eb2dabb 100644 --- a/units/cpu/test-plan.pxu +++ b/units/cpu/test-plan.pxu @@ -85,7 +85,7 @@ _name: CPU Tests (Server) _description: CPU Tests (Server) include: cpu/clocktest certification-status=blocker - cpu/frequency_governors certification-status=blocker + cpu/cpufreq_test-server certification-status=blocker cpu/maxfreq_test certification-status=blocker cpu/maxfreq_test-log-attach certification-status=non-blocker cpu/topology certification-status=blocker diff --git a/units/firmware/jobs.pxu b/units/firmware/jobs.pxu index 05c5f04..b0d69cb 100644 --- a/units/firmware/jobs.pxu +++ b/units/firmware/jobs.pxu @@ -87,3 +87,47 @@ command: [ -f "$PLAINBOX_SESSION_SHARE"/fwts_server_results.log ] && gzip -c "$PLAINBOX_SESSION_SHARE"/fwts_server_results.log _description: Attaches the FWTS Server Cert results log to the submission _summary: Attach FWTS Server Cert test log to submission + + +id: firmware/tcglog-required-algs-sha256 +category_id: com.canonical.plainbox::firmware +summary: Test that the SHA256 algorithm is present in the TCG event log +description: + Presence of support for the SHA256 algorithm is a requirement for enabling FDE + support in Ubuntu Core 20 systems +plugin: shell +user: root +command: tcglog-check -required-algs sha256 +imports: from com.canonical.plainbox import manifest +requires: + cpuinfo.platform == 'x86_64' + manifest.has_tpm2_chip == 'True' + executable.name == 'tcglog-check' + +id: firmware/tcglog-require-pe-image-digests +category_id: com.canonical.plainbox::firmware +summary: Test format of digests for EV_EFI_BOOT_SERVICES_APPLICATION events +description: + Digests for EV_EFI_BOOT_SERVICES_APPLICATION events associated with PE images + must be PE image digests rather than file digests. This test is a requirement + for enabling FDE support in Ubuntu Core 20 systems +plugin: shell +user: root +command: tcglog-check -require-pe-image-digests +imports: from com.canonical.plainbox import manifest +requires: + cpuinfo.platform == 'x86_64' + manifest.has_tpm2_chip == 'True' + executable.name == 'tcglog-check' + +id: firmware/tcglog-dump-attachment +category_id: com.canonical.plainbox::firmware +summary: Attach a dump of the TCG Event log for debugging +plugin: attachment +user: root +command: tcglog-dump +imports: from com.canonical.plainbox import manifest +requires: + cpuinfo.platform == 'x86_64' + manifest.has_tpm2_chip == 'True' + executable.name == 'tcglog-dump' diff --git a/units/firmware/test-plan.pxu b/units/firmware/test-plan.pxu index 62b4e05..1765ced 100644 --- a/units/firmware/test-plan.pxu +++ b/units/firmware/test-plan.pxu @@ -9,3 +9,30 @@ mandatory_include: include: bootstrap_include: fwts + + +id: firmware-uc20-fde-full +unit: test plan +_name: Test firmware compatibility with UC20 FDE +_description: Test firmware compatibility with UC20 FDE +include: +nested_part: + firmware-uc20-fde-manual + firmware-uc20-fde-automated + + +id: firmware-uc20-fde-manual +unit: test plan +_name: Test firmware compatibility with UC20 FDE (manual) +_description: Test firmware compatibility with UC20 FDE (manual) +include: + + +id: firmware-uc20-fde-automated +unit: test plan +_name: Test firmware compatibility with UC20 FDE (automated) +_description: Test firmware compatibility with UC20 FDE (automated) +include: + firmware/tcglog-required-algs-sha256 + firmware/tcglog-require-pe-image-digests + firmware/tcglog-dump-attachment diff --git a/units/info/jobs.pxu b/units/info/jobs.pxu index a9031ad..ba6b376 100644 --- a/units/info/jobs.pxu +++ b/units/info/jobs.pxu @@ -350,8 +350,12 @@ estimated_duration: 0.1 _description: Attaches the buildstamp identifier for the OS _summary: Attaches the buildstamp identifier for the OS command: - if [ -s /etc/buildstamp ]; then + if [ -s /var/lib/ubuntu_dist_channel ]; then + cat /var/lib/ubuntu_dist_channel + elif [ -s /etc/buildstamp ]; then cat /etc/buildstamp + elif [ -s /run/mnt/ubuntu-seed/.disk/info ]; then + cat /run/mnt/ubuntu-seed/.disk/info elif [ -s /etc/media-info ]; then cat /etc/media-info elif [ -s /writable/system-data/etc/buildstamp ]; then diff --git a/units/kernel-snap/jobs.pxu b/units/kernel-snap/jobs.pxu index 151fd98..950d1a6 100644 --- a/units/kernel-snap/jobs.pxu +++ b/units/kernel-snap/jobs.pxu @@ -16,6 +16,7 @@ requires: unit: template template-resource: bootloader +template-filter: bootloader.booted_kernel_path != 'unknown' id: kernel-snap/booted-kernel-matches-current-{name} category_id: kernel-snap _summary: The booted kernel image matches image in current kernel snap diff --git a/units/keys/jobs.pxu b/units/keys/jobs.pxu index 8cef3e7..3b42f3e 100644 --- a/units/keys/jobs.pxu +++ b/units/keys/jobs.pxu @@ -290,6 +290,30 @@ _steps: _verification: Did the power management prompt pop up when press power button? +plugin: user-interact +category_id: com.canonical.plainbox::keys +_summary: + Check power button event filtering +id: keys/power-button-event +estimated_duration: 15.0 +requires: + package.name == 'acpid' + package.name == 'libglib2.0-bin' +command: + action=$(gsettings get org.gnome.settings-daemon.plugins.power power-button-action) + gsettings set org.gnome.settings-daemon.plugins.power power-button-action nothing + acpi_listen -t 10 | tee "$PLAINBOX_SESSION_SHARE"/power-button-event.log + gsettings set org.gnome.settings-daemon.plugins.power power-button-action "$action" + [[ $(grep -c "PBTN.*00000080" "$PLAINBOX_SESSION_SHARE"/power-button-event.log) -eq 1 ]] || \ + [[ $(grep -c "PWRB.*00000080" "$PLAINBOX_SESSION_SHARE"/power-button-event.log) -eq 1 ]] +purpose: + This test will check if power button event has reported correctly, the listener will + wait for 10 seconds. +steps: + 1. Single press and release the power button in 10 seconds, some platforms might need long-press + to trigger the PBTN or PWRB event + 2. Check the number of output PBTN/PWRB event + plugin: manual category_id: com.canonical.plainbox::keys id: keys/fn-lock diff --git a/units/keys/test-plan.pxu b/units/keys/test-plan.pxu index d4d2fe2..ffc111c 100644 --- a/units/keys/test-plan.pxu +++ b/units/keys/test-plan.pxu @@ -25,6 +25,7 @@ include: keys/keyboard-backlight certification-status=blocker keys/microphone-mute certification-status=blocker keys/power-button certification-status=blocker + keys/power-button-event certification-status=blocker keys/fn-lock certification-status=non-blocker id: keys-cert-automated @@ -72,6 +73,7 @@ include: keys/keyboard-backlight certification-status=blocker keys/microphone-mute certification-status=blocker keys/power-button certification-status=blocker + keys/power-button-event certification-status=blocker id: after-suspend-keys-cert-blockers unit: test plan diff --git a/units/memory/jobs.pxu b/units/memory/jobs.pxu index 565493a..3cb6b5b 100644 --- a/units/memory/jobs.pxu +++ b/units/memory/jobs.pxu @@ -47,7 +47,7 @@ user: root environ: STRESS_NG_MIN_SWAP_SIZE requires: executable.name == 'stress-ng' -command: stress_ng_test.py memory +command: systemd-inhibit stress_ng_test.py memory _summary: Stress test of system memory _description: Test to perform some basic stress and exercise of system memory via the diff --git a/units/miscellanea/test-plan.pxu b/units/miscellanea/test-plan.pxu index 6c2d582..60741b6 100644 --- a/units/miscellanea/test-plan.pxu +++ b/units/miscellanea/test-plan.pxu @@ -87,9 +87,7 @@ mandatory_include: miscellanea/submission-resources miscellanea/cpuid miscellanea/efi_boot_mode certification-status=blocker - miscellanea/reboot_firmware miscellanea/efi_pxeboot - miscellanea/kernel_taint_test miscellanea/cpus_are_not_samples miscellanea/ipmi_test certification-status=blocker miscellanea/bmc_info diff --git a/units/monitor/jobs.pxu b/units/monitor/jobs.pxu index 4a6ae9a..f5e4974 100644 --- a/units/monitor/jobs.pxu +++ b/units/monitor/jobs.pxu @@ -395,3 +395,18 @@ _steps: _verification: Was the interface displayed correctly on the screen? flags: also-after-suspend + +id: monitor/vga +_summary: Monitor works (VGA) +_purpose: + Check output to display through VGA port +_steps: + 1. Connect display to VGA port + 2. Check the display +_verification: + Output to display works +plugin: manual +category_id: com.canonical.plainbox::monitor +estimated_duration: 300 +flags: also-after-suspend + diff --git a/units/monitor/test-plan.pxu b/units/monitor/test-plan.pxu index b893acb..21b16cb 100644 --- a/units/monitor/test-plan.pxu +++ b/units/monitor/test-plan.pxu @@ -273,6 +273,7 @@ include: monitor/dvi-to-vga monitor/hdmi-to-vga monitor/displayport_hotplug + monitor/vga id: after-suspend-monitor-full unit: test plan @@ -292,3 +293,4 @@ include: after-suspend-monitor/dvi-to-vga after-suspend-monitor/hdmi-to-vga after-suspend-monitor/displayport_hotplug + after-suspend-monitor/vga diff --git a/units/networking/jobs.pxu b/units/networking/jobs.pxu index e95f3dc..6653eb3 100644 --- a/units/networking/jobs.pxu +++ b/units/networking/jobs.pxu @@ -86,4 +86,9 @@ command: network_predictable_names.sh _summary: Verify that all network interfaces have predictable names. _description: Verify that all network interfaces have predictable names. requires: - {% if __on_ubuntucore__ %}lsb.release >= '20'{% else %}lsb.release >= '18'{% endif %} + {%- if __on_ubuntucore__ %} + lsb.release >= '20' + model_assertion.gadget != "pi" + {%- else %} + lsb.release >= '18' + {% endif -%} diff --git a/units/power-management/jobs.pxu b/units/power-management/jobs.pxu index 37aef99..9dc6851 100644 --- a/units/power-management/jobs.pxu +++ b/units/power-management/jobs.pxu @@ -345,25 +345,34 @@ requires: command: cpu_lpi_file=$(cpuinfo_resource.py | grep cpu_lpi_file | awk '{ print $2 }') if [ "$cpu_lpi_file" == "low_power_idle_cpu_residency_us" ]; then - echo "check /sys/devices/system/cpu/cpuidle/low_power_idle_cpu_residency_us" + before=$(cat /sys/devices/system/cpu/cpuidle/low_power_idle_cpu_residency_us) xset dpms force off sleep 20 xset dpms force on - residency=$(cat /sys/devices/system/cpu/cpuidle/low_power_idle_cpu_residency_us) + after=$(cat /sys/devices/system/cpu/cpuidle/low_power_idle_cpu_residency_us) + residency=$((after-before)) + echo "/sys/devices/system/cpu/cpuidle/low_power_idle_cpu_residency_us after/before screen off is $residency" else - echo "check /sys/kernel/debug/pmc_core/package_cstate_show" + echo "The system doesn't have hardware-based residency counter." + echo "please check https://www.uefi.org/sites/default/files/resources/Intel_ACPI_Low_Power_S0_Idle.pdf" before=$(cat < /sys/kernel/debug/pmc_core/package_cstate_show | grep C10 | awk '{ print $4 }') xset dpms force off sleep 20 xset dpms force on after=$(cat < /sys/kernel/debug/pmc_core/package_cstate_show | grep C10 | awk '{ print $4 }') residency=$((after-before)) + echo "/sys/kernel/debug/pmc_core/package_cstate_show after/before screen off is $residency" + fi + if [ $residency -eq 0 ]; then + echo "The cpu can't enter low power idle when screen off." + echo "please refer to https://www.kernel.org/doc/html/latest/firmware-guide/acpi/lpit.html." + exit 1 fi - [ $residency -gt 0 ] || exit 1 user: root estimated_duration: 25 id: power-management/system-low-power-idle +after: suspend/suspend_advanced_auto category_id: com.canonical.plainbox::power-management _summary: System low power idle residency check _description: @@ -379,16 +388,31 @@ command: dmesg | grep ACPI | grep supports | sed 's/\[.*ACPI/ACPI/' echo "Content of /etc/default/grub:" cat /etc/default/grub - rtcwake --mode freeze -s 10 if [ "$sys_lpi_file" == "low_power_idle_system_residency_us" ]; then - echo "check /sys/devices/system/cpu/cpuidle/low_power_idle_system_residency_us" - residency=$(cat /sys/devices/system/cpu/cpuidle/low_power_idle_system_residency_us) + before=$(cat /sys/devices/system/cpu/cpuidle/low_power_idle_system_residency_us) + rtcwake --mode freeze -s 10 + after=$(cat /sys/devices/system/cpu/cpuidle/low_power_idle_system_residency_us) + residency=$((after-before)) + echo "/sys/devices/system/cpu/cpuidle/low_power_idle_system_residency_us after/before suspend is $residency" else - echo "check /sys/kernel/debug/pmc_core/slp_s0_residency_usec" - residency=$(cat /sys/kernel/debug/pmc_core/slp_s0_residency_usec) + echo "The system doesn't have hardware-based residency counter." + echo "please check https://www.uefi.org/sites/default/files/resources/Intel_ACPI_Low_Power_S0_Idle.pdf" + before=$(cat /sys/kernel/debug/pmc_core/slp_s0_residency_usec) + rtcwake --mode freeze -s 10 + after=$(cat /sys/kernel/debug/pmc_core/slp_s0_residency_usec) + residency=$((after-before)) + echo "/sys/kernel/debug/pmc_core/slp_s0_residency_usec after/before suspend is $residency" fi # shellcheck disable=SC2086 - [ $residency -gt 0 ] || exit 1 + if [ $residency -eq 0 ]; then + echo "The system can't enter s0 when suspended." + echo "please refer to https://www.kernel.org/doc/html/latest/firmware-guide/acpi/lpit.html." + if [ -f /sys/kernel/debug/suspend_stats ]; then + echo "cat /sys/kernel/debug/suspend_stats" + cat /sys/kernel/debug/suspend_stats + fi + exit 1 + fi user: root estimated_duration: 15 diff --git a/units/snappy/snappy.pxu b/units/snappy/snappy.pxu index fed3f76..45ffc1b 100644 --- a/units/snappy/snappy.pxu +++ b/units/snappy/snappy.pxu @@ -46,7 +46,6 @@ plugin: shell command: snap_tests.py remove category_id: snappy estimated_duration: 10s -depends: snappy/snap-install flags: preserve-locale user: root environ: TEST_SNAP SNAPD_TASK_TIMEOUT SNAPD_POLL_INTERVAL @@ -83,7 +82,6 @@ _steps: _verification: Check hello version is back to its stable version plugin: manual -depends: snappy/snap-refresh category_id: snappy estimated_duration: 60 @@ -101,7 +99,6 @@ _steps: _verification: Check hello version is again the one from the beta channel plugin: manual -depends: snappy/snap-revert category_id: snappy estimated_duration: 60 @@ -109,12 +106,12 @@ id: snappy/snap-refresh-automated template-engine: jinja2 _summary: Test the snap refresh command is working. _description: - The snap {{ __checkbox_env__.get("TEST_SNAP", "test-snapd-tools") }} should - be installed from the stable channel prior to starting the test. The job - refreshes to edge and compares the revision before and after. + The test will install the + {{ __checkbox_env__.get("TEST_SNAP", "test-snapd-tools") }} snap from the + stable channel and then refreshes it to edge and compares the revision before + and after the refresh. plugin: shell command: snap_tests.py refresh -depends: snappy/snap-install category_id: snappy estimated_duration: 10s user: root @@ -124,12 +121,11 @@ id: snappy/snap-revert-automated template-engine: jinja2 _summary: Test the snap revert command is working. _description: - Runs after snap-refresh-automated and should revert the installed edge channel - snap {{ __checkbox_env__.get("TEST_SNAP", "test-snapd-tools") }} leftover - from that test to the one from stable. + Checks if the edge channel + {{ __checkbox_env__.get("TEST_SNAP", "test-snapd-tools") }} snap is reverted + back to the one from stable. plugin: shell command: snap_tests.py revert -depends: snappy/snap-refresh-automated category_id: snappy estimated_duration: 10s user: root @@ -143,7 +139,6 @@ _description: snap can be refreshed after removal of the blacklisted revision. plugin: shell command: snap_tests.py reupdate -depends: snappy/snap-revert-automated category_id: snappy estimated_duration: 10s user: root diff --git a/units/snappy/test-plan.pxu b/units/snappy/test-plan.pxu index f688bbf..b476809 100644 --- a/units/snappy/test-plan.pxu +++ b/units/snappy/test-plan.pxu @@ -29,9 +29,6 @@ _description: QA test that includes manual tests for the snap command for Snappy Ubuntu Core devices. include: - snappy/snap-refresh - snappy/snap-revert - snappy/snap-reupdate snappy/os-refresh snappy/os-revert snappy/os-fail-boot @@ -48,9 +45,6 @@ _description: QA test that includes manual tests for the snap command for Snappy Ubuntu Core devices. include: - snappy/snap-refresh - snappy/snap-revert - snappy/snap-reupdate snappy/os-refresh-with-refresh-control snappy/os-revert-with-refresh-control snappy/os-fail-boot-with-refresh-control diff --git a/units/stress/jobs.pxu b/units/stress/jobs.pxu index aa12e28..a541e3a 100644 --- a/units/stress/jobs.pxu +++ b/units/stress/jobs.pxu @@ -18,14 +18,15 @@ estimated_duration: 7200.0 requires: executable.name == 'stress-ng' user: root +environ: STRESS_NG_CPU_TIME command: if [ -n "$STRESS_NG_CPU_TIME" ] then echo "Found STRESS_NG_CPU_TIME env var, stress_ng cpu running time is now: $STRESS_NG_CPU_TIME seconds" - stress_ng_test.py cpu --base-time "$STRESS_NG_CPU_TIME" + systemd-inhibit stress_ng_test.py cpu --base-time "$STRESS_NG_CPU_TIME" else echo STRESS_NG_CPU_TIME env var is not found, stress_ng cpu running time is default value - stress_ng_test.py cpu --base-time 7200 + systemd-inhibit stress_ng_test.py cpu --base-time 7200 fi _summary: Stress of CPUs (very long runtime) diff --git a/units/stress/s3s4.pxu b/units/stress/s3s4.pxu index 0e349c3..b8fc25b 100644 --- a/units/stress/s3s4.pxu +++ b/units/stress/s3s4.pxu @@ -21,6 +21,7 @@ plugin: resource environ: STRESS_S3_ITERATIONS command: echo "s3_iterations: ${STRESS_S3_ITERATIONS:-30}" + python3 -c 'import platform;print("fwts: {}".format("supported" if platform.machine() in ["x86_64", "i386"] else "unsupported"))' estimated_duration: 1s flags: preserve-locale @@ -32,6 +33,7 @@ plugin: resource environ: STRESS_S4_ITERATIONS command: echo "s4_iterations: ${STRESS_S4_ITERATIONS:-30}" + python3 -c 'import platform;print("fwts: {}".format("supported" if platform.machine() in ["x86_64", "i386"] else "unsupported"))' estimated_duration: 1s flags: preserve-locale @@ -39,10 +41,11 @@ flags: preserve-locale unit: template template-resource: stress_s3_iterations template-unit: job +template-engine: jinja2 plugin: shell flags: preserve-locale category_id: stress-tests/suspend -id: stress-tests/suspend_{s3_iterations}_cycles +id: stress-tests/suspend_{{ s3_iterations }}_cycles imports: from com.canonical.certification import sleep from com.canonical.certification import rtc @@ -53,11 +56,19 @@ estimated_duration: 2400.0 environ: PLAINBOX_SESSION_SHARE STRESS_S3_SLEEP_DELAY STRESS_S3_WAIT_DELAY LD_LIBRARY_PATH user: root command: + {%- if fwts == "supported" %} export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$SNAP/usr/lib/fwts" - set -o pipefail; checkbox-support-fwts_test -l "$PLAINBOX_SESSION_SHARE"/suspend_{s3_iterations}_cycles -f none -s s3 --s3-device-check --s3-device-check-delay="${{STRESS_S3_WAIT_DELAY:-45}}" --s3-sleep-delay="${{STRESS_S3_SLEEP_DELAY:-30}}" --s3-multiple={s3_iterations} -j "$SNAP"/share/fwts | tee "$PLAINBOX_SESSION_SHARE"/suspend_{s3_iterations}_cycles_times.log + set -o pipefail; checkbox-support-fwts_test -l "$PLAINBOX_SESSION_SHARE"/suspend_{{ s3_iterations }}_cycles -f none -s s3 --s3-device-check --s3-device-check-delay="${STRESS_S3_WAIT_DELAY:-45}" --s3-sleep-delay="${STRESS_S3_SLEEP_DELAY:-30}" --s3-multiple={{ s3_iterations }} -j "$SNAP"/share/fwts | tee "$PLAINBOX_SESSION_SHARE"/suspend_{{ s3_iterations }}_cycles_times.log + {%- else %} + for i in {1..{{ s3_iterations }}}; + do + echo "Iteration $i" + rtcwake -v -m mem -s "${STRESS_S3_SLEEP_DELAY:-30}" + done + {% endif -%} _description: PURPOSE: - This is an automated stress test that will force the system to suspend/resume for {s3_iterations} cycles. + This is an automated stress test that will force the system to suspend/resume for {{ s3_iterations }} cycles. unit: template template-resource: stress_s3_iterations @@ -67,6 +78,7 @@ flags: preserve-locale category_id: stress-tests/suspend id: stress-tests/suspend-{s3_iterations}-cycles-log-check after: stress-tests/suspend_{s3_iterations}_cycles +requires: cpuinfo.platform in ("i386", "x86_64") estimated_duration: 1.0 command: [ -e "$PLAINBOX_SESSION_SHARE"/suspend_{s3_iterations}_cycles.log ] && sleep_test_log_check.py -v s3 "$PLAINBOX_SESSION_SHARE"/suspend_{s3_iterations}_cycles.log _description: @@ -81,6 +93,7 @@ category_id: stress-tests/suspend id: stress-tests/suspend-{s3_iterations}-cycles-log-attach estimated_duration: 1.0 after: stress-tests/suspend_{s3_iterations}_cycles +requires: cpuinfo.platform in ("i386", "x86_64") command: [ -e "$PLAINBOX_SESSION_SHARE"/suspend_{s3_iterations}_cycles.log ] && cat "$PLAINBOX_SESSION_SHARE"/suspend_{s3_iterations}_cycles.log _description: Attaches the log from the {s3_iterations} cycles Suspend/Resume test if it exists @@ -89,10 +102,11 @@ _description: unit: template template-resource: stress_s4_iterations template-unit: job +template-engine: jinja2 plugin: shell flags: preserve-locale category_id: stress-tests/hibernate -id: stress-tests/hibernate_{s4_iterations}_cycles +id: stress-tests/hibernate_{{ s4_iterations }}_cycles imports: from com.canonical.certification import sleep from com.canonical.certification import rtc @@ -104,10 +118,10 @@ environ: PLAINBOX_SESSION_SHARE STRESS_S4_SLEEP_DELAY STRESS_S4_WAIT_DELAY LD_LI user: root command: export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$SNAP/usr/lib/fwts" - checkbox-support-fwts_test -l "$PLAINBOX_SESSION_SHARE"/hibernate_{s4_iterations}_cycles -f none -s s4 --s4-device-check --s4-device-check-delay="${{STRESS_S4_WAIT_DELAY:-45}}" --s4-sleep-delay="${{STRESS_S4_SLEEP_DELAY:-120}}" --s4-multiple={s4_iterations} -j "$SNAP"/share/fwts + checkbox-support-fwts_test -l "$PLAINBOX_SESSION_SHARE"/hibernate_{{ s4_iterations }}_cycles -f none -s s4 --s4-device-check --s4-device-check-delay="${STRESS_S4_WAIT_DELAY:-45}" --s4-sleep-delay="${STRESS_S4_SLEEP_DELAY:-120}" --s4-multiple={{ s4_iterations }} -j "$SNAP"/share/fwts _description: PURPOSE: - This is an automated stress test that will force the system to hibernate/resume for {s4_iterations} cycles + This is an automated stress test that will force the system to hibernate/resume for {{ s4_iterations }} cycles unit: template template-resource: stress_s4_iterations @@ -117,6 +131,7 @@ flags: preserve-locale category_id: stress-tests/hibernate id: stress-tests/hibernate-{s4_iterations}-cycles-log-check after: stress-tests/hibernate_{s4_iterations}_cycles +requires: cpuinfo.platform in ("i386", "x86_64") estimated_duration: 1.0 command: [ -e "$PLAINBOX_SESSION_SHARE"/hibernate_{s4_iterations}_cycles.log ] && sleep_test_log_check.py -v s4 "$PLAINBOX_SESSION_SHARE"/hibernate_{s4_iterations}_cycles.log _description: @@ -131,6 +146,7 @@ category_id: stress-tests/hibernate id: stress-tests/hibernate-{s4_iterations}-cycles-log-attach estimated_duration: 1.0 after: stress-tests/hibernate_{s4_iterations}_cycles +requires: cpuinfo.platform in ("i386", "x86_64") command: [ -e "$PLAINBOX_SESSION_SHARE"/hibernate_{s4_iterations}_cycles.log ] && cat "$PLAINBOX_SESSION_SHARE"/hibernate_{s4_iterations}_cycles.log _description: Attaches the log from the {s4_iterations} cycles Hibernate/Resume test if it exists diff --git a/units/submission/jobs.pxu b/units/submission/jobs.pxu index 892d4e6..a8c8c7f 100644 --- a/units/submission/jobs.pxu +++ b/units/submission/jobs.pxu @@ -22,8 +22,10 @@ requires: dmi_present.state == 'supported' user: root command: + BOOT_MODE=$(inxi_snapshot -M --output json --output-file print | grep -oP '(?<=\d#)(UEFI|BIOS)(\s+\[Legacy\])?') + # shellcheck disable=SC2016 dmidecode | python3 -m plainbox dev parse dmidecode | \ - jq '[.[] | ._attributes + {"category": .category}]' + jq --arg BOOT_MODE "$BOOT_MODE" '[.[] | ._attributes + {"category": .category} + (if .category == "BIOS" then {boot_mode: $BOOT_MODE} else {} end)]' estimated_duration: 1 _description: Attaches dmidecode output _summary: Attaches json dumps of raw dmi devices diff --git a/units/submission/test-plan.pxu b/units/submission/test-plan.pxu index 5ae692f..5f3d9f6 100644 --- a/units/submission/test-plan.pxu +++ b/units/submission/test-plan.pxu @@ -1,10 +1,26 @@ id: submission-cert-full unit: test plan -_name: Submission resources -_description: Submission resources +_name: Full submission resources +_description: Full submission resources +include: +nested_part: + submission-cert-manual + submission-cert-automated + +id: submission-cert-manual +unit: test plan +_name: Manual submission resources +_description: Manual submission resources include: mandatory_include: miscellanea/device_check + +id: submission-cert-automated +unit: test plan +_name: Automated submission resources +_description: Automated submission resources +include: +mandatory_include: # Meta-job to include required resources, don't remove. miscellanea/submission-resources info/systemd-analyze diff --git a/units/suspend/suspend-graphics.pxu b/units/suspend/suspend-graphics.pxu index 84bfab8..9a52fbb 100644 --- a/units/suspend/suspend-graphics.pxu +++ b/units/suspend/suspend-graphics.pxu @@ -109,7 +109,7 @@ plugin: attachment category_id: com.canonical.plainbox::suspend id: suspend/{index}_xrandr_screens_after_suspend.tar.gz_auto depends: suspend/{index}_cycle_resolutions_after_suspend_{product_slug}_graphics -command: [ -f "$PLAINBOX_SESSION_SHARE"/{index}_xrandr_screens_after_suspend.tgz ] && cat "$PLAINBOX_SESSION_SHARE"/{index}_xrandr_screens_after_suspend.tgz +command: [ -f "$PLAINBOX_SESSION_SHARE"/xrandr_screens_{index}_after_suspend.tgz ] && cat "$PLAINBOX_SESSION_SHARE"/xrandr_screens_{index}_after_suspend.tgz _description: This attaches screenshots from the suspend/cycle_resolutions_after_suspend test to the results submission. unit: template diff --git a/units/suspend/suspend.pxu b/units/suspend/suspend.pxu index 034f97b..a2830d4 100644 --- a/units/suspend/suspend.pxu +++ b/units/suspend/suspend.pxu @@ -1636,32 +1636,6 @@ _description: plugin: shell category_id: com.canonical.plainbox::suspend -id: suspend/usb_storage_preinserted_after_suspend -estimated_duration: 1.2 -user: root -depends: suspend/suspend_advanced_auto -command: removable_storage_test.py -l usb && removable_storage_test.py -s 268400000 usb -_description: - This is an automated version of usb/storage-automated and assumes that the - server has usb storage devices plugged in prior to checkbox execution. It - is intended for servers and SRU automated testing. - -plugin: shell -category_id: com.canonical.plainbox::suspend -id: suspend/usb3_storage_preinserted_after_suspend -estimated_duration: 1.2 -user: root -requires: - usb.usb3 == 'supported' -depends: suspend/suspend_advanced_auto -command: removable_storage_test.py -l usb && removable_storage_test.py -s 268400000 -m 500000000 usb --driver xhci_hcd -_description: - This is an automated version of usb3/storage-automated and assumes that the - server has usb 3.0 storage devices plugged in prior to checkbox execution. It - is intended for servers and SRU automated testing. - -plugin: shell -category_id: com.canonical.plainbox::suspend id: suspend/usb_performance_after_suspend depends: suspend/usb_insert_after_suspend user: root diff --git a/units/thunderbolt/jobs.pxu b/units/thunderbolt/jobs.pxu index 73fadb5..031c2ad 100644 --- a/units/thunderbolt/jobs.pxu +++ b/units/thunderbolt/jobs.pxu @@ -105,7 +105,7 @@ _siblings: [ _summary: Storage insert detection on Thunderbolt 3 port _description: PURPOSE: - This test will check if the insertion of a Thunderbolt HDD could be detected + This test will check if the insertion of a Thunderbolt 3 HDD could be detected STEPS: 1. Click 'Test' to begin the test. This test will timeout and fail if the insertion has not been detected within 40 seconds. @@ -164,7 +164,7 @@ _siblings: [ _summary: Storage removal detection on Thunderbolt 3 port _description: PURPOSE: - This test will check the system can detect the removal of a Thunderbolt HDD + This test will check the system can detect the removal of a Thunderbolt 3 HDD STEPS: 1. Click 'Test' to begin the test. This test will timeout and fail if the removal has not been detected within 20 seconds. @@ -176,6 +176,7 @@ _description: plugin: user-interact-verify category_id: com.canonical.plainbox::disk id: thunderbolt3/daisy-chain +user: root imports: from com.canonical.plainbox import manifest requires: manifest.has_thunderbolt3 == 'True' flags: also-after-suspend-manual diff --git a/units/touchpad/jobs.pxu b/units/touchpad/jobs.pxu index 2fcdbc3..bb6f596 100644 --- a/units/touchpad/jobs.pxu +++ b/units/touchpad/jobs.pxu @@ -218,6 +218,36 @@ _siblings: [{ "id": "touchpad/continuous-move-after-suspend", "depends": "suspend/suspend_advanced touchpad/continuous-move" }] +unit: template +template-resource: device +template-filter: device.category == 'TOUCHPAD' +template-unit: job +plugin: shell +category_id: com.canonical.plainbox::touchpad +id: touchpad/palm-rejection-firmware-labeling_{product_slug} +requires: device.driver == 'hid-multitouch' +estimated_duration: 5.0 +command: + abs_caps=$(cat </sys{path}/capabilities/abs) + abs_caps_hex=$((16#"$abs_caps")) + tool_type_bit=$((abs_caps_hex >> 55)) + support=$((tool_type_bit & 1)) + if [ $support -eq 1 ]; then + exit 0 + else + echo "Touchapd info:" + cat </sys{path}/name + cat </sys{path}/modalias + echo "Touchpad EV_ABS capabilities:" + echo "$abs_caps" + exit 1 + fi +_summary: Touchpad EV_ABS capability check +_description: + Libinput firmware/labeling palm detection rely on touchpad ABS_MT_TOOL_TYPE + capability. This test checks touchpad's EV_ABS capability to + make sure that firmware/labeling bit is set in touchpad firmware. + id: touchpad/palm-rejection plugin: user-interact category_id: com.canonical.plainbox::touchpad diff --git a/units/touchpad/test-plan.pxu b/units/touchpad/test-plan.pxu index 188e7f2..39769d0 100644 --- a/units/touchpad/test-plan.pxu +++ b/units/touchpad/test-plan.pxu @@ -30,6 +30,7 @@ _description: Touchpad tests (Automated) include: touchpad/detected-as-mouse certification-status=blocker + touchpad/palm-rejection-firmware-labeling_.* certification-status=blocker id: after-suspend-touchpad-cert-full diff --git a/units/ubuntucore/category.pxu b/units/ubuntucore/category.pxu new file mode 100644 index 0000000..b6c6461 --- /dev/null +++ b/units/ubuntucore/category.pxu @@ -0,0 +1,3 @@ +unit: category +id: ubuntucore +_name: Ubuntu Core OS feature tests diff --git a/units/ubuntucore/jobs.pxu b/units/ubuntucore/jobs.pxu new file mode 100644 index 0000000..c82c43b --- /dev/null +++ b/units/ubuntucore/jobs.pxu @@ -0,0 +1,53 @@ +id: ubuntucore/os-recovery-mode +_summary: Reboot into recovery mode and log into the system using prior credentials. +_purpose: + Check if system will reboot to recovery mode successfully +requires: + lsb.release >= '20' +_steps: + 1. Send unix socket command to reboot system into recovery mode + $ sudo http --pretty=format POST snapd:///v2/systems/$(ls /run/mnt/ubuntu-seed/systems/) action=do mode=recover + If 'http' is not installed, run the following command first + $ sudo snap install http + 2. System should respond to the unix socket command and reboot itself + 3. Wait until system completes the reboot process + 4. Check if system is running in recovery mode through kernel cmdline + $ cat /proc/cmdline + 5. Reboot the system and check again if system goes back to normal run mode + $ cat /proc/cmdline +_verification: + Check if kernel cmdline when system in recovery mode includes: + 'snapd_recovery_mode=recover' + Check if kernel cmdline when system in normal run mode includes: + 'snapd_recovery_mode=run' +plugin: manual +category_id: ubuntucore + +id: ubuntucore/os-reinstall-mode +_summary: Reboot into reinstall mode and trigger a factory reset on the device. +_purpose: + Check if system will reboot to reinstall mode and reinitialise the device with fresh factory reset +requires: + lsb.release >= '20' +_steps: + WARNING: ALL EXISTING DATA ON THIS DEVICE WILL BE WIPED!! + 1. Check the current serial-assertion device-key + $ ls /var/lib/snapd/save/device/private-keys-v1 + 2. Clear TPM first if this device has enabled secure boot & FDE + For x86-based platforms: + $ sudo su + $ echo 5 > /sys/class/tpm/tpm0/ppi/request + For ARM-based platforms: + There is no generic command for ARM-based platforms, please refer to device user manual + 3. Send unix socket command to reboot system into reinstall mode + $ sudo http --pretty=format POST snapd:///v2/systems/$(ls /run/mnt/ubuntu-seed/systems/) action=do mode=install + If 'http' is not installed, run the following command first + $ sudo snap install http + 4. System should respond to the unix socket command and reboot itself + 5. Wait until system completes the installation and initialization process + 6. Check serial-assertion device-key after installation completes + $ ls /var/lib/snapd/save/device/private-keys-v1 +_verification: + Check if a new serial-assertion device-key got generated after reinstallation completes +plugin: manual +category_id: ubuntucore diff --git a/units/ubuntucore/test-plan.pxu b/units/ubuntucore/test-plan.pxu new file mode 100644 index 0000000..cdc03d7 --- /dev/null +++ b/units/ubuntucore/test-plan.pxu @@ -0,0 +1,22 @@ +id: ubuntucore-full +unit: test plan +_name: Ubuntu Core OS feature tests +_description: OS feature test for Ubuntu Core devices +include: +nested_part: + ubuntucore-manual + ubuntucore-automated + +id: ubuntucore-automated +unit: test plan +_name: Automated Ubuntu Core OS feature tests +_description: Automated OS feature tests for Ubuntu Core devices +include: + +id: ubuntucore-manual +unit: test plan +_name: Manual Ubuntu Core OS feature tests +_description: Manual OS feature tests for Ubuntu Core devices +include: + ubuntucore/os-reinstall-mode + ubuntucore/os-recovery-mode diff --git a/units/usb/usb.pxu b/units/usb/usb.pxu index 0b923cb..f9e45da 100644 --- a/units/usb/usb.pxu +++ b/units/usb/usb.pxu @@ -240,10 +240,12 @@ user: root estimated_duration: 45.0 command: removable_storage_test.py -l usb && timeout 300 removable_storage_test.py -s 268400000 usb flags: also-after-suspend preserve-cwd +imports: from com.canonical.plainbox import manifest requires: cpuinfo.platform != 's390x' package.name == 'udisks2' or snap.name == 'udisks2' package.name == 'udisks2' or (snap.name == 'core' and int(snap.revision) >= 1804) + manifest.has_usb_storage == 'True' _summary: Test USB 2.0 or 1.1 ports _description: @@ -256,11 +258,13 @@ category_id: com.canonical.plainbox::usb id: usb3/storage-preinserted user: root flags: also-after-suspend +imports: from com.canonical.plainbox import manifest requires: cpuinfo.platform != 's390x' usb.usb3 == 'supported' package.name == 'udisks2' or snap.name == 'udisks2' package.name == 'udisks2' or (snap.name == 'core' and int(snap.revision) >= 1804) + manifest.has_usb_storage == 'True' estimated_duration: 45.0 command: removable_storage_test.py -l usb && timeout 300 removable_storage_test.py -s 268400000 -m 500000000 usb --driver xhci_hcd _summary: diff --git a/units/watchdog/jobs.pxu b/units/watchdog/jobs.pxu index 3247941..0e16f82 100644 --- a/units/watchdog/jobs.pxu +++ b/units/watchdog/jobs.pxu @@ -1,3 +1,11 @@ +id: watchdog/detect +category_id: com.canonical.plainbox::power-management +_summary: Detect presence of a Hardware Watchdog +flags: simple +imports: from com.canonical.plainbox import manifest +requires: manifest.has_hardware_watchdog == 'True' +command: udev_resource.py -f WATCHDOG + id: watchdog/systemd-config _summary: Check if the hardware watchdog is properly configured template-engine: jinja2 @@ -29,6 +37,8 @@ command: {% endif -%} category_id: com.canonical.plainbox::power-management flags: simple +imports: from com.canonical.plainbox import manifest +requires: manifest.has_hardware_watchdog == 'True' id: watchdog/trigger-system-reset depends: watchdog/systemd-config @@ -75,3 +85,5 @@ unit: job plugin: shell command: failed_service_check.sh estimated_duration: 1.0 +imports: from com.canonical.plainbox import manifest +requires: manifest.has_hardware_watchdog == 'True' diff --git a/units/watchdog/manifest.pxu b/units/watchdog/manifest.pxu new file mode 100644 index 0000000..d80d7e1 --- /dev/null +++ b/units/watchdog/manifest.pxu @@ -0,0 +1,5 @@ + +unit: manifest entry +id: has_hardware_watchdog +_name: Hardware Watchdog +value-type: bool diff --git a/units/watchdog/test-plan.pxu b/units/watchdog/test-plan.pxu index 6de8e71..01057d0 100644 --- a/units/watchdog/test-plan.pxu +++ b/units/watchdog/test-plan.pxu @@ -23,6 +23,7 @@ _description: QA test plan that includes automated watchdog tests estimated_duration: 1s include: + watchdog/detect watchdog/systemd-config watchdog/trigger-system-reset-auto watchdog/post-trigger-system-reset-auto diff --git a/units/wireless/jobs.pxu b/units/wireless/jobs.pxu index 3e50c90..4827af1 100644 --- a/units/wireless/jobs.pxu +++ b/units/wireless/jobs.pxu @@ -30,7 +30,7 @@ requires: {%- if __on_ubuntucore__ %} connections.slot == 'network-manager:service' and connections.plug == '{{ __system_env__["SNAP_NAME"] }}:network-manager' {% endif -%} -# net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'NetworkManager' + net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'NetworkManager' unit: template template-resource: device @@ -53,7 +53,7 @@ requires: {%- if __on_ubuntucore__ %} connections.slot == 'network-manager:service' and connections.plug == '{{ __system_env__["SNAP_NAME"] }}:network-manager' {% endif -%} -# net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'NetworkManager' + net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'NetworkManager' unit: template template-resource: device @@ -76,7 +76,7 @@ requires: {%- if __on_ubuntucore__ %} connections.slot == 'network-manager:service' and connections.plug == '{{ __system_env__["SNAP_NAME"] }}:network-manager' {% endif -%} -# net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'NetworkManager' + net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'NetworkManager' unit: template template-resource: device @@ -99,7 +99,7 @@ requires: {%- if __on_ubuntucore__ %} connections.slot == 'network-manager:service' and connections.plug == '{{ __system_env__["SNAP_NAME"] }}:network-manager' {% endif -%} -# net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'NetworkManager' + net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'NetworkManager' unit: template template-resource: device @@ -122,7 +122,7 @@ requires: {%- if __on_ubuntucore__ %} connections.slot == 'network-manager:service' and connections.plug == '{{ __system_env__["SNAP_NAME"] }}:network-manager' {% endif -%} -# net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'NetworkManager' + net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'NetworkManager' unit: template template-resource: device @@ -145,8 +145,8 @@ requires: wireless_sta_protocol.{{ interface }}_ac == 'supported' {%- if __on_ubuntucore__ %} connections.slot == 'network-manager:service' and connections.plug == '{{ __system_env__["SNAP_NAME"] }}:network-manager' - {% endif -%} -# net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'NetworkManager' + {%- endif %} + net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'NetworkManager' unit: template template-resource: device @@ -169,8 +169,8 @@ requires: wireless_sta_protocol.{{ interface }}_ac == 'supported' {%- if __on_ubuntucore__ %} connections.slot == 'network-manager:service' and connections.plug == '{{ __system_env__["SNAP_NAME"] }}:network-manager' - {% endif -%} -# net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'NetworkManager' + {%- endif %} + net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'NetworkManager' unit: template template-resource: device @@ -193,8 +193,8 @@ requires: wireless_sta_protocol.{{ interface }}_ax == 'supported' {%- if __on_ubuntucore__ %} connections.slot == 'network-manager:service' and connections.plug == '{{ __system_env__["SNAP_NAME"] }}:network-manager' - {% endif -%} -# net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'NetworkManager' + {%- endif %} + net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'NetworkManager' unit: template template-resource: device @@ -217,8 +217,8 @@ requires: wireless_sta_protocol.{{ interface }}_ax == 'supported' {%- if __on_ubuntucore__ %} connections.slot == 'network-manager:service' and connections.plug == '{{ __system_env__["SNAP_NAME"] }}:network-manager' - {% endif -%} -# net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'NetworkManager' + {%- endif %} + net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'NetworkManager' plugin: user-interact-verify category_id: com.canonical.plainbox::wireless diff --git a/units/wireless/test-plan.pxu b/units/wireless/test-plan.pxu index f6d6fb3..6b2b8c1 100644 --- a/units/wireless/test-plan.pxu +++ b/units/wireless/test-plan.pxu @@ -134,17 +134,6 @@ 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_ax_.* - wireless/wireless_connection_open_ac_.* - wireless/wireless_connection_open_bg_.* - wireless/wireless_connection_open_n_.* - wireless/wireless_connection_wpa_ax_.* - wireless/wireless_connection_wpa_ac_.* - wireless/wireless_connection_wpa_bg_.* - wireless/wireless_connection_wpa_n_.* id: wireless-automated unit: test plan @@ -163,14 +152,14 @@ include: wireless/wireless_connection_wpa_ac_nm_.* wireless/wireless_connection_wpa_bg_nm_.* wireless/wireless_connection_wpa_n_nm_.* - # wireless/wireless_connection_open_ax_np_.* - # wireless/wireless_connection_open_ac_np_.* - # wireless/wireless_connection_open_bg_np_.* - # wireless/wireless_connection_open_n_np_.* - # wireless/wireless_connection_wpa_ax_np_.* - # wireless/wireless_connection_wpa_ac_np_.* - # wireless/wireless_connection_wpa_bg_np_.* - # wireless/wireless_connection_wpa_n_np_.* + wireless/wireless_connection_open_ax_np_.* + wireless/wireless_connection_open_ac_np_.* + wireless/wireless_connection_open_bg_np_.* + wireless/wireless_connection_open_n_np_.* + wireless/wireless_connection_wpa_ax_np_.* + wireless/wireless_connection_wpa_ac_np_.* + wireless/wireless_connection_wpa_bg_np_.* + wireless/wireless_connection_wpa_n_np_.* bootstrap_include: device @@ -182,15 +171,15 @@ _description: networks using netplan. include: wireless/detect - # wireless/wireless_scanning_.* - # wireless/wireless_connection_open_ax_nm_.* - # wireless/wireless_connection_open_ac_nm_.* - # wireless/wireless_connection_open_bg_nm_.* - # wireless/wireless_connection_open_n_nm_.* - # wireless/wireless_connection_wpa_ax_nm_.* - # wireless/wireless_connection_wpa_ac_nm_.* - # wireless/wireless_connection_wpa_bg_nm_.* - # wireless/wireless_connection_wpa_n_nm_.* + wireless/wireless_scanning_.* + wireless/wireless_connection_open_ax_nm_.* + wireless/wireless_connection_open_ac_nm_.* + wireless/wireless_connection_open_bg_nm_.* + wireless/wireless_connection_open_n_nm_.* + wireless/wireless_connection_wpa_ax_nm_.* + wireless/wireless_connection_wpa_ac_nm_.* + wireless/wireless_connection_wpa_bg_nm_.* + wireless/wireless_connection_wpa_n_nm_.* wireless/wireless_connection_open_ax_np_.* wireless/wireless_connection_open_ac_np_.* wireless/wireless_connection_open_bg_np_.* @@ -337,18 +326,6 @@ 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_ax_.* - 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_ax_.* - 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 @@ -366,14 +343,14 @@ include: 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_ax_np_.* - # 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_ax_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_.* + after-suspend-wireless/wireless_connection_open_ax_np_.* + 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_ax_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 @@ -384,15 +361,15 @@ _description: Automated connection tests for unencrypted or WPA-encrypted 802.11 bg, n, ac, ax networks using netplan. include: - # after-suspend-wireless/wireless_scanning_.* - # after-suspend-wireless/wireless_connection_open_ax_nm_.* - # 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_ax_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_scanning_.* + after-suspend-wireless/wireless_connection_open_ax_nm_.* + 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_ax_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_ax_np_.* after-suspend-wireless/wireless_connection_open_ac_np_.* after-suspend-wireless/wireless_connection_open_bg_np_.* diff --git a/units/wireless/wireless-connection-netplan.pxu b/units/wireless/wireless-connection-netplan.pxu index 8eaf8b2..44677e2 100644 --- a/units/wireless/wireless-connection-netplan.pxu +++ b/units/wireless/wireless-connection-netplan.pxu @@ -19,7 +19,7 @@ estimated_duration: 15 flags: preserve-locale also-after-suspend also-after-suspend-manual requires: wireless_sta_protocol.{{ interface }}_ax == 'supported' -# net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'networkd' + net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'networkd' unit: template @@ -43,7 +43,7 @@ estimated_duration: 15 flags: preserve-locale also-after-suspend also-after-suspend-manual requires: wireless_sta_protocol.{{ interface }}_ac == 'supported' -# net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'networkd' + net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'networkd' @@ -66,8 +66,8 @@ environ: LD_LIBRARY_PATH OPEN_BG_SSID NET_DRIVER_INFO category_id: com.canonical.plainbox::wireless estimated_duration: 15 flags: preserve-locale also-after-suspend also-after-suspend-manual -#requires: -# net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'networkd' +requires: + net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'networkd' unit: template @@ -89,8 +89,8 @@ environ: LD_LIBRARY_PATH OPEN_N_SSID NET_DRIVER_INFO category_id: com.canonical.plainbox::wireless estimated_duration: 15 flags: preserve-locale also-after-suspend also-after-suspend-manual -#requires: -# net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'networkd' +requires: + net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'networkd' unit: template @@ -114,7 +114,7 @@ estimated_duration: 15 flags: preserve-locale also-after-suspend also-after-suspend-manual requires: wireless_sta_protocol.{{ interface }}_ax == 'supported' -# net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'networkd' + net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'networkd' unit: template @@ -138,7 +138,7 @@ estimated_duration: 15 flags: preserve-locale also-after-suspend also-after-suspend-manual requires: wireless_sta_protocol.{{ interface }}_ac == 'supported' -# net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'networkd' + net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'networkd' unit: template @@ -160,8 +160,8 @@ environ: LD_LIBRARY_PATH WPA_BG_SSID WPA_BG_PSK NET_DRIVER_INFO category_id: com.canonical.plainbox::wireless estimated_duration: 15 flags: preserve-locale also-after-suspend also-after-suspend-manual -#requires: -# net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'networkd' +requires: + net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'networkd' unit: template @@ -183,5 +183,5 @@ environ: LD_LIBRARY_PATH WPA_N_SSID WPA_N_PSK NET_DRIVER_INFO category_id: com.canonical.plainbox::wireless estimated_duration: 15 flags: preserve-locale also-after-suspend also-after-suspend-manual -#requires: -# net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'networkd' +requires: + net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'networkd' diff --git a/units/wwan/jobs.pxu b/units/wwan/jobs.pxu index aaa2089..de4b1bc 100644 --- a/units/wwan/jobs.pxu +++ b/units/wwan/jobs.pxu @@ -24,7 +24,6 @@ flags: preserve-locale also-after-suspend preserve-cwd imports: from com.canonical.plainbox import manifest requires: manifest.has_wwan_module == 'True' - snap.name == 'core' and int(snap.revision) >= 1804 or package.name == 'modemmanager' snap.name == 'modem-manager' or package.name == 'modemmanager' unit: template @@ -53,7 +52,6 @@ flags: preserve-locale also-after-suspend preserve-cwd imports: from com.canonical.plainbox import manifest requires: manifest.has_wwan_module == 'True' - snap.name == 'core' and int(snap.revision) >= 1804 or package.name == 'modemmanager' snap.name == 'modem-manager' or package.name == 'modemmanager' unit: template @@ -73,7 +71,6 @@ flags: preserve-locale also-after-suspend preserve-cwd imports: from com.canonical.plainbox import manifest requires: manifest.has_wwan_module == 'True' - snap.name == 'core' and int(snap.revision) >= 1804 or package.name == 'modemmanager' snap.name == 'modem-manager' or package.name == 'modemmanager' unit: template @@ -99,7 +96,6 @@ flags: preserve-locale also-after-suspend preserve-cwd imports: from com.canonical.plainbox import manifest requires: manifest.has_wwan_module == 'True' - snap.name == 'core' and int(snap.revision) >= 1804 or package.name == 'modemmanager' snap.name == 'modem-manager' or package.name == 'modemmanager' id: wwan/detect-manual |