diff options
author | PMR <pmr@pmr-lander> | 2021-02-04 11:09:59 +0000 |
---|---|---|
committer | PMR <pmr@pmr-lander> | 2021-02-04 11:09:59 +0000 |
commit | 9dcda4961e48b5ec68ff7de60a205382f5952169 (patch) | |
tree | 6d4fcfe86b6519299597d49ef0e0baad1d217d3a /units | |
parent | 7fddd6364101eca5effc3ced1657221ea11a3300 (diff) |
Import plainbox-provider-checkbox_0.57.0.orig.tar.gzupstream-0.57.0patched-0.57.0-1
Diffstat (limited to 'units')
-rw-r--r-- | units/ethernet/jobs.pxu | 129 | ||||
-rw-r--r-- | units/ethernet/test-plan.pxu | 2 | ||||
-rw-r--r-- | units/graphics/jobs.pxu | 12 | ||||
-rw-r--r-- | units/snapd/category.pxu | 3 | ||||
-rw-r--r-- | units/snapd/snapd.pxu (renamed from units/snappy/snappy.pxu) | 40 | ||||
-rw-r--r-- | units/snapd/test-plan.pxu (renamed from units/snappy/test-plan.pxu) | 0 | ||||
-rw-r--r-- | units/snappy/category.pxu | 3 | ||||
-rw-r--r-- | units/ubuntucore/jobs.pxu | 22 | ||||
-rw-r--r-- | units/usb/test-plan.pxu | 8 | ||||
-rw-r--r-- | units/usb/usb.pxu | 8 |
10 files changed, 67 insertions, 160 deletions
diff --git a/units/ethernet/jobs.pxu b/units/ethernet/jobs.pxu index 69e7760..64a0578 100644 --- a/units/ethernet/jobs.pxu +++ b/units/ethernet/jobs.pxu @@ -270,136 +270,19 @@ unit: template template-resource: device template-filter: device.category == 'NETWORK' and device.interface != 'UNKNOWN' template-engine: jinja2 -id: ethernet/hotplug-{{ interface }}-check-disconnected -_summary: Ensure ethernet port {{ interface }} is physically disconnected +id: ethernet/hotplug-{{ interface }} +_summary: Ensure hotplugging works on port {{ interface }} _purpose: - Check that ethernet port {{ interface }} is detected as being in the correct state - to begin a hotplug connection test. + Check that hotplugging works on port {{ interface }} _steps: - 1. Ensure there is no ethernet cable attached to port {{ interface }}. - 2. Begin test. + 1. Begin the test. + 2. Follow the instructions on the screen. plugin: user-interact command: - if [ "$(cat /sys/class/net/{{ interface }}/carrier)" -ne 0 ]; then - # carrier indicating cable present - exit 1 - fi - exit 0 + eth_hotplugging.py {{ interface }} && gateway_ping_test.py -v --interface {{ interface }} category_id: com.canonical.plainbox::ethernet estimated_duration: 1.0 flags: preserve-locale -after: - {%- if __index__ > 1 %}ethernet/hotplug-{{ __index__ - 1 }}-end-cycle{%- endif %} - -unit: template -template-resource: device -template-filter: device.category == 'NETWORK' and device.interface != 'UNKNOWN' -id: ethernet/hotplug-{interface}-connect -_summary: Ethernet port {interface} hotplug detection test -_purpose: - Check ethernet port {interface} connects when cable inserted. Assumes an IP - address will be assigned by DHCP. Connection asserted by pinging the network - defined gateway. -_steps: - 1. Begin the test. - 2. Insert the ethernet cable in to ethernet port {interface}. - 3. This test will timeout and fail if the insertion and connection - establishment has not been detected (10 second timeout for each check). -plugin: user-interact -command: - LOOP=0 - CABLE_DETECT=0 - while [ $LOOP -lt 10 ] && [ "$CABLE_DETECT" -eq 0 ] - do - sleep 1 - CABLE_DETECT=$(cat /sys/class/net/{interface}/carrier) - LOOP=$((LOOP=LOOP+1)) - done - if [ "$CABLE_DETECT" -eq 0 ]; then - echo "Didn't detect a cable insertion" - exit 1 - fi - echo "Detected a cable insertion" - LOOP=0 - OPSTATE="unknown" - while [ $LOOP -lt 10 ] && [ "$OPSTATE" != "up" ] - do - sleep 1 - OPSTATE=$(cat /sys/class/net/{interface}/operstate) - LOOP=$((LOOP=LOOP+1)) - done - if [ "$OPSTATE" != "up" ]; then - echo "Interface did not up" - exit 1 - fi - echo "Interface up" - gateway_ping_test.py -v --interface {interface} - PING_TEST=$? - if [ $PING_TEST -ne 0 ]; then - echo "Ping test failed" - exit 1 - fi - exit 0 -category_id: com.canonical.plainbox::ethernet -estimated_duration: 60.0 -depends: ethernet/hotplug-{interface}-check-disconnected - -unit: template -template-resource: device -template-filter: device.category == 'NETWORK' and device.interface != 'UNKNOWN' -id: ethernet/hotplug-{interface}-disconnect -_summary: Ethernet port {interface} hotplug disconnect step -_purpose: - Check that when cable removed from ethernet port {interface} the system - detects this correctly. -_steps: - 1. Depends on previous hotplug connection test passing. We will now test - cable disconnection. - 2. Begin the test. - 3. Remove the ethernet cable from ethernet port {interface}. - 4. This test will timeout and fail if the removal has not been detected and - interface marked as down (10 second timeout for each check). -plugin: user-interact -command: - LOOP=0 - CABLE_DETECT=1 - while [ $LOOP -lt 10 ] && [ "$CABLE_DETECT" -ne 0 ] - do - sleep 1 - CABLE_DETECT=$(cat /sys/class/net/{interface}/carrier) - LOOP=$((LOOP=LOOP+1)) - done - if [ "$CABLE_DETECT" -ne 0 ]; then - echo "Didn't detect a cable removal" - exit 1 - fi - echo "Detected a cable removal" - LOOP=0 - OPSTATE="up" - while [ $LOOP -lt 10 ] && [ "$OPSTATE" == "up" ] - do - sleep 1 - OPSTATE=$(cat /sys/class/net/{interface}/operstate) - LOOP=$((LOOP=LOOP+1)) - done - if [ "$OPSTATE" == "up" ]; then - echo "Interface did not go down" - exit 1 - fi - echo "Interface went down" - exit 0 -category_id: com.canonical.plainbox::ethernet -estimated_duration: 20.0 -depends: ethernet/hotplug-{interface}-connect - -unit: template -template-resource: device -template-filter: device.category == 'NETWORK' and device.interface != 'UNKNOWN' -id: ethernet/hotplug-{__index__}-end-cycle -category_id: com.canonical.plainbox::ethernet -after: ethernet/hotplug-{interface}-disconnect -command: true -flags: simple unit: template template-resource: device diff --git a/units/ethernet/test-plan.pxu b/units/ethernet/test-plan.pxu index 986c886..5e003ae 100644 --- a/units/ethernet/test-plan.pxu +++ b/units/ethernet/test-plan.pxu @@ -17,6 +17,8 @@ include: ethernet/wol_S4_.* ethernet/wol_S3_.* ethernet/hotplug-.* +bootstrap_include: + device id: ethernet-automated unit: test plan diff --git a/units/graphics/jobs.pxu b/units/graphics/jobs.pxu index bf03878..acf18c3 100644 --- a/units/graphics/jobs.pxu +++ b/units/graphics/jobs.pxu @@ -545,3 +545,15 @@ _summary: Check NVIDIA NVLINK status _description: Check NVLINK are supported and NVLINK are connected properly on system, please make sure below items before testing: 1. More than one NVIDIA Graphic card are installed. 2. Each graphic card are connected by NVLINK. + +unit: template +template-resource: graphics_card +plugin: shell +category_id: com.canonical.plainbox::graphics +id: graphics/{index}_glmark2-es2_{product_slug} +requires: + executable.name == 'glmark2-es2' + 'classic' in environment.SNAP_NAME +command: glmark2-es2 --data-path "$CHECKBOX_RUNTIME"/usr/share/glmark2/ +estimated_duration: 60.5 +_summary: Run OpenGL ES 2.0 X11 benchmark on the {product} video card diff --git a/units/snapd/category.pxu b/units/snapd/category.pxu new file mode 100644 index 0000000..0ada897 --- /dev/null +++ b/units/snapd/category.pxu @@ -0,0 +1,3 @@ +unit: category +id: snapd +_name: Snapd diff --git a/units/snappy/snappy.pxu b/units/snapd/snapd.pxu index 45ffc1b..fdc1922 100644 --- a/units/snappy/snappy.pxu +++ b/units/snapd/snapd.pxu @@ -4,7 +4,7 @@ _purpose: If snap list command is working then should at least find the ubuntu-core package. plugin: shell command: snap_tests.py list -category_id: snappy +category_id: snapd estimated_duration: 10s flags: preserve-locale @@ -16,7 +16,7 @@ _purpose: {{ __checkbox_env__.get("TEST_SNAP", "test-snapd-tools") }} in the store. plugin: shell command: snap_tests.py search -category_id: snappy +category_id: snapd estimated_duration: 10s flags: preserve-locale @@ -29,7 +29,7 @@ _purpose: makes sure this can be downloaded and installed on the system. plugin: shell command: snap_tests.py install stable -category_id: snappy +category_id: snapd estimated_duration: 10s flags: preserve-locale user: root @@ -44,7 +44,7 @@ _purpose: can removed. plugin: shell command: snap_tests.py remove -category_id: snappy +category_id: snapd estimated_duration: 10s flags: preserve-locale user: root @@ -67,7 +67,7 @@ _verification: Check hello version is newer using the beta channel plugin: manual after: snappy/snap-remove -category_id: snappy +category_id: snapd estimated_duration: 60 id: snappy/snap-revert @@ -82,7 +82,7 @@ _steps: _verification: Check hello version is back to its stable version plugin: manual -category_id: snappy +category_id: snapd estimated_duration: 60 id: snappy/snap-reupdate @@ -99,7 +99,7 @@ _steps: _verification: Check hello version is again the one from the beta channel plugin: manual -category_id: snappy +category_id: snapd estimated_duration: 60 id: snappy/snap-refresh-automated @@ -112,7 +112,7 @@ _description: and after the refresh. plugin: shell command: snap_tests.py refresh -category_id: snappy +category_id: snapd estimated_duration: 10s user: root environ: TEST_SNAP SNAPD_TASK_TIMEOUT SNAPD_POLL_INTERVAL @@ -126,7 +126,7 @@ _description: back to the one from stable. plugin: shell command: snap_tests.py revert -category_id: snappy +category_id: snapd estimated_duration: 10s user: root environ: TEST_SNAP SNAPD_TASK_TIMEOUT SNAPD_POLL_INTERVAL @@ -139,7 +139,7 @@ _description: snap can be refreshed after removal of the blacklisted revision. plugin: shell command: snap_tests.py reupdate -category_id: snappy +category_id: snapd estimated_duration: 10s user: root environ: TEST_SNAP SNAPD_TASK_TIMEOUT SNAPD_POLL_INTERVAL @@ -160,7 +160,7 @@ _steps: _verification: Check core version is newer using the edge channel plugin: manual -category_id: snappy +category_id: snapd estimated_duration: 400 id: snappy/os-refresh-with-refresh-control @@ -179,7 +179,7 @@ _steps: _verification: Check core version is newer using the edge channel plugin: manual -category_id: snappy +category_id: snapd estimated_duration: 400 id: snappy/os-revert @@ -199,7 +199,7 @@ _verification: Check core version is back to its stable version plugin: manual depends: snappy/os-refresh -category_id: snappy +category_id: snapd estimated_duration: 400 id: snappy/os-revert-with-refresh-control @@ -219,7 +219,7 @@ _verification: Check core version is back to its stable version plugin: manual depends: snappy/os-refresh-with-refresh-control -category_id: snappy +category_id: snapd estimated_duration: 400 id: snappy/os-fail-boot @@ -242,7 +242,7 @@ _steps: _verification: Check system is currently booting the stable core version plugin: manual -category_id: snappy +category_id: snapd depends: snappy/os-revert estimated_duration: 500 @@ -266,7 +266,7 @@ _steps: _verification: Check system is currently booting the stable core version plugin: manual -category_id: snappy +category_id: snapd depends: snappy/os-revert-with-refresh-control estimated_duration: 500 @@ -281,7 +281,7 @@ _steps: _verification: Can log into system through ssh from other machine plugin: manual -category_id: snappy +category_id: snapd estimated_duration: 120 id: snappy/test-store-install-beta @@ -292,7 +292,7 @@ _purpose: plugin: shell command: snap_tests.py install beta && snap_tests.py remove user: root -category_id: com.canonical.certification::snappy +category_id: snapd estimated_duration: 30s flags: preserve-locale @@ -304,7 +304,7 @@ _purpose: plugin: shell command: snap_tests.py install edge && snap_tests.py remove user: root -category_id: com.canonical.certification::snappy +category_id: snapd estimated_duration: 30s flags: preserve-locale @@ -325,6 +325,6 @@ command: echo "Store ID in model assertion:" echo "{store}" [ "$STORE_ID" == "{store}" ] -category_id: com.canonical.certification::snappy +category_id: snapd estimated_duration: 1.0 flags: preserve-locale diff --git a/units/snappy/test-plan.pxu b/units/snapd/test-plan.pxu index b476809..b476809 100644 --- a/units/snappy/test-plan.pxu +++ b/units/snapd/test-plan.pxu diff --git a/units/snappy/category.pxu b/units/snappy/category.pxu deleted file mode 100644 index 91dd927..0000000 --- a/units/snappy/category.pxu +++ /dev/null @@ -1,3 +0,0 @@ -unit: category -id: snappy -_name: Snappy Ubuntu Core diff --git a/units/ubuntucore/jobs.pxu b/units/ubuntucore/jobs.pxu index c82c43b..9dbf44f 100644 --- a/units/ubuntucore/jobs.pxu +++ b/units/ubuntucore/jobs.pxu @@ -5,15 +5,15 @@ _purpose: 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 + 1. Reboot the system to recovery mode + $ sudo snap reboot --recover + 2. System should respond to the command and reboot itself 3. Wait until system completes the reboot process - 4. Check if system is running in recovery mode through kernel cmdline + 4. Check if system is running in recovery mode $ cat /proc/cmdline - 5. Reboot the system and check again if system goes back to normal run mode + 5. Reboot the system back to normal run mode + $ sudo snap reboot + 6. Check again if system is running in run mode $ cat /proc/cmdline _verification: Check if kernel cmdline when system in recovery mode includes: @@ -39,11 +39,9 @@ _steps: $ 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 + 3. Reboot the system to reinstall mode + $ sudo snap reboot --install + 4. System should respond to the 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 diff --git a/units/usb/test-plan.pxu b/units/usb/test-plan.pxu index 02dc6e5..2f31963 100644 --- a/units/usb/test-plan.pxu +++ b/units/usb/test-plan.pxu @@ -332,3 +332,11 @@ include: bootstrap_include: removable_partition +id: server-usb +unit: test plan +_name: USB Server tests +_description: USB tests for Server Cert +include: + usb/detect + usb/storage-server certification-status=blocker + usb3/storage-server certification-status=blocker diff --git a/units/usb/usb.pxu b/units/usb/usb.pxu index f9e45da..e85be32 100644 --- a/units/usb/usb.pxu +++ b/units/usb/usb.pxu @@ -244,7 +244,6 @@ 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 @@ -252,6 +251,9 @@ _description: Tests USB 2.0 or 1.1 ports on a system by doing write/read/compare tests on randomly created data. It requires that a USB stick is plugged into an available USB port before running the certification suite. +_siblings: + [{ "id": "usb/storage-server", + "requires": "cpuinfo.platform != 's390x'\npackage.name == 'udisks2' or snap.name == 'udisks2'" }] plugin: shell category_id: com.canonical.plainbox::usb @@ -263,7 +265,6 @@ 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 @@ -274,6 +275,9 @@ _description: randomly created data. It requires that a USB stick is plugged into an available USB port before running the certification suite. Additionally, it will only work with USB sticks and ports rated for USB 3.0 speeds or faster. +_siblings: + [{ "id": "usb3/storage-server", + "requires": "cpuinfo.platform != 's390x'\nusb.usb3 == 'supported'\npackage.name == 'udisks2' or snap.name == 'udisks2'" }] plugin: manual category_id: com.canonical.plainbox::usb |