You've already forked open-source-firmware-validation
mirror of
https://github.com/Dasharo/open-source-firmware-validation.git
synced 2026-03-06 14:51:55 -08:00
* .gitignore: Add _envvars, _roms directories Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> * keywords.robot: Allow for the DUT ssh key to change when trying to connect via SSH in Login To Linux via SSH * lib/tpm.robot: Check all PCRs before failing in Validate PCRs Against Event Log Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> * miniPCIe-slot-verification: Skip LTE_CARD tests if card is not defined * Stress Test Windows: use Execute Command In Terminal Otherwise there is no timeout for the keyword and the tests could hang forever Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> * CBMEM001: Add semiauto implementation Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> * Set Nextboot Bootentry: compare strings as variables to fix utf decode errors Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> * novacustom-mtl.robot: Add USB model t oconfig Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> * novacustom-v560tne: v1.0.0-rc10 platform configs changes Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> novacustom-v560tne: Add windows support Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> v560tne: temp RTE serial tests Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> v560tne: dmidecode update version Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> v560tne: Restore fedora support flag Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> v560tne: Add USB drives model names for detection tests Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> v560tne: Add DOCKING_STATION_USB_C_CHARGING_SUPPORT Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> v560tne: add qubes support Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> v540tnd: Restore ubuntu default boot os Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> REMOVE platform-configs: restore SSH Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> * acpi-driver.robot: Fix typo in deb package name Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> * minipcie-slot-verification: Replace hardcoded wifi name with the configs Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> * Switch To Root User: Add workaround for passwordless root Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> * os-specific-tasks/203.yml: Add qubesos ansible config Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> * fwupd-support.robot: automate qubes Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> * cpu-performance.robot: Add missing phoronix batch mode setup to automated suite Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> * Login To Windows Via SSH: Allow the key to change across retries Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> * Get Index Of Matching Option In Menu: do not use fuzzy match It works a bit differently - the * is not a special character in fuzzy search Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> * Execute Shutdown Command: Add linux systemd support Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> Execute Shutdown Command: Add some workaround for no power_led Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> * Measure Warmboot Time: add workaround for no RTC boot Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> * platform-configs: Add RTC_BOOT_SUPPORT https://github.com/Dasharo/open-source-firmware-validation/issues/1068 Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> * CBMEM suite: dynamic semiauto skips for no RTC boot support Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> * network-interface-after-suspend: Add workaroud for no RTC boot https://github.com/Dasharo/open-source-firmware-validation/issues/1068 Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> * linux-packages-playbook.yaml: Remove masking systemd suspend It makes it impossible to suspend the device in conventional ways like using the UI or via suspend key combination. It has more cons that pros Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> * cbnt.robot: Fix invalid ibg menu parsing Due to confusing line wrapping in the menu the state of the options following to the target were being parsed Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> * SBO: Fix test ids ENV_ID Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> * fast-boot.robot: Increase wait time for systemd-analyze 50s was not always enough for bootup to finish. 150s should be better. Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> * gpu-performance.robot: stability fixes Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> gpu-performance.robot: Fix string comparison error and x11 invalid display Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> gpu-performance.robot: Detect not running x11 Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> gpu-performance.robot: Note that X11 is required Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> gpu-performance.robot: fix check for installed unigine-super Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> gpu-performance.robot: Add comment about display numbering bug https://github.com/Dasharo/open-source-firmware-validation/issues/1215 Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> lib/performance/common: Setup Phoronix: Upload results to openbenchmarking Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> disk-io.robot: Verify correct disk model before checking performance Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> disk-io.robot: move sleep to after skips to reduce unnecessary idle time Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> * phoronix-test-suite tests: Cap run count to 3 Using: FORCE_TIMES_TO_RUN env variable Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> * lib/docs.robot: Increase time for docking station to init Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> * util/fwupd-support-lvfs: stylistic changes Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> util/fwupd-support-lvfs: Remove unused variable Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> util/fwupd-support-lvfs.robot: Add missing newline in fwupd config Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> * cbnt.robot: Remove newline characters from cbmem regex The newline characters are not matched by this keyword. Its matched line-by-line so newline characters never appear Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> * lib/utc.robot: stability fixes Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> lib/utc.robot: reboot tests add delay to prevent immediate re-login Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> lib/utc: hotplug tests: reorder disconnect/connect to end with connected Otherwise the docking station would be left disconnected after the tests causing further automated tests to possibly fail Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> UTC: Add dynamic skips for laptop semiautos Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> * fwupd-support: Add --assume-yes to get-devices First time its executed after a fwupd update it will prompt to send the results to the vendor. It was not handled before. Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> * Execute Reboot Command: Add delay for no-power-ctrl devices Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> * EXTERNAL_HEADSET: Change to list of acceptable values Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> * BOOTED_OS_ID: Prevent resetting on new suite Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> * warm/coldboot tests: Add dynamic semiauto skips if not supported Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> * lib/robot.sh: Run all suites at once and split results later We've made it so that the test suites are run separately so that the logs can be organized neatly before. Turns out that makes the state between suites get lost. It's especially important for SSH tests which need to always remember which OS is booted to use the correct SSH credentials. This commit changes this so that everything is run at once, but the results are later parsed and split per-suite using rebot. An important thing to remember is that testers will often interrupt the run using ctrl+c to get the test results early and skip further execution. The change handles that by trapping the INT signal and running the split anyway. Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> lib/robot.sh: Move robot to fg instead of waiting When running robot as a subprocess it wont receive the control over stdin otherwise. Some semi-auto tests require user input in terminal which will crash otherwise. Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> lib/robot.sh: fix detecting tags tests that are fullauto on some and semi on some platforms need to have both tags so that they are executed no matter the `-i` param and the skips can take care of whether the test is automated on given platform or not Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> * TEST_TAGS: rename to INCLUDE_TAGS Theres a builtin ${TEST TAGS}, but for some reason ${TEST_TAGS} seems to be like an alias to it. Our variable that keeps track of the tags requested by tester needs to be changed because of that Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> * options-lib_dcu: Set nextboot before Set UEFI Option Set UEFI Option of options-lib_dcu reads the current SMM Store, modifies it, and flashes it back. If we set the Nextboot variable in SMM before reading the SMM store it will stay after flash and reboot reducing an unnecessary DEFAULT_BOOT_OS_ID boot. Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> * sleep-lib.robot: warn on failed fwts sleep Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> sleep-lib: Add description of s3 test also working for s2idle(soix) Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> * keywords.robot: Identify Path To USB: Fix returning TYPE instead of PATH Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> * capsule-update.robot: Skip unnecessary setup when on ssh Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> * scripts/lib/robot.sh & related: Restore old logs directory structure Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> * audio-subsystem.robot: Delete old version of suite Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> * platform-configs/include/protectli-vp66xx.robot: enable redundant boot Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com> * coreboot-redundant-boot.robot: work with the new log convention Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com> * platform-configs/include/protectli-vp66xx.robot: enable CBnT w/ status menu Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com> * lib/bios/menus.robot: Parse Menu Snapshot Into Construction: drop fuzzy search Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com> * platform-configs/include/protectli-vp66xx.robot: remove unused variable Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com> * coreboot-redundant-boot.robot: RTC BUC Control Bit Should Be: don't convert case Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com> * coreboot-redundant-boot.robot: parse log from current boot only Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com> --------- Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com> Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com> Co-authored-by: Michał Kopeć <michal.kopec@3mdeb.com>
159 lines
7.4 KiB
Plaintext
159 lines
7.4 KiB
Plaintext
*** Settings ***
|
|
Documentation Collection of keywords for testing USB-C docking stations
|
|
|
|
Resource ../keywords.robot
|
|
|
|
|
|
*** Keywords ***
|
|
Ensure DisplayLink Driver Is Installed Linux
|
|
[Documentation] Keyword installs DisplayLink drivers if they're missing.
|
|
TRY
|
|
${out}= Execute Linux Command apt list --installed
|
|
Should Contain ${out} displaylink-driver
|
|
EXCEPT
|
|
Download File
|
|
... https://www.synaptics.com/sites/default/files/Ubuntu/pool/stable/main/all/synaptics-repository-keyring.deb
|
|
... synaptics-repository-keyring.deb
|
|
Install Package ./synapics-repository-keyring.deb
|
|
Execute Linux Command apt update
|
|
Install Package displaylink-driver
|
|
Execute Linux Command systemctl start displaylink-driver.service
|
|
Sleep 5s
|
|
Execute Linux Command systemctl restart gdm.service
|
|
Sleep 5s
|
|
END
|
|
|
|
Check DisplayLink Dock In Linux
|
|
[Documentation] Keyword looks for any enabled outputs on connected
|
|
... DisplayLink docks.
|
|
Ensure DisplayLink Driver Is Installed Linux
|
|
${out}= Execute Linux Command cat /sys/devices/platform/evdi.*/drm/card*/card*-*/enabled
|
|
Should Contain ${out} enabled
|
|
|
|
Check Docking Station HDMI Windows
|
|
[Documentation] Check if docking station HDMI display is recognized by
|
|
... Windows OS.
|
|
# this actually just checks if HDMI or DP is found
|
|
${out}= Check Displays Windows
|
|
Should Contain Any ${out} VideoOutputTechnology : 12 VideoOutputTechnology : 10
|
|
|
|
Check PCON On MST Hub In Linux
|
|
[Documentation] Keyword checks if a HDMI port on an MST hub is active.
|
|
${out}= Execute Linux Command cat /sys/kernel/debug/dri/*/i915_dp_mst_info
|
|
# XXX: Conversion to HDMI, DVI or VGA is detected the same way
|
|
Should Contain ${out} DP LEGACY CONV
|
|
|
|
Check DP Port On MST Hub In Linux
|
|
[Documentation] Keyword checks if a DP port on an MST hub is active.
|
|
${out}= Execute Linux Command cat /sys/kernel/debug/dri/*/i915_dp_mst_info
|
|
# Either a normal SST sink, or MST hub downstream, means the port is OK.
|
|
Should Contain ${out} SST SINK MST BRANCHING
|
|
|
|
Check Display Port On Hub In Linux
|
|
[Documentation] Check if a monitor is connected to a docking station (ignoring eDP)
|
|
[Arguments] ${target}
|
|
Log Please ensure that all external monitors are exclusively connected to WARN
|
|
Log the docking station to eliminate false positives WARN
|
|
${content}= Execute Command In Terminal cat ../../../sys/kernel/debug/dri/1/i915_display_info
|
|
${dock_connected}= Check Docking Connection ${content} ${target}
|
|
IF ${dock_connected}
|
|
Log Monitor is connected to docking station
|
|
ELSE
|
|
Fail No monitor connected to docking station or only eDP connected
|
|
END
|
|
|
|
Check Docking Station DP Windows
|
|
[Documentation] Check if docking station DP display is recognized by
|
|
... Windows OS.
|
|
# this actually just checks if DP is found
|
|
${out}= Check Displays Windows
|
|
Should Contain Any ${out} VideoOutputTechnology : 10 VideoOutputTechnology : 11
|
|
|
|
Detect Docking Station USB Devices In Linux
|
|
[Documentation] Keyword check the docking station is detected correctly.
|
|
[Arguments] ${docking_station_model}
|
|
# USB devices
|
|
${out}= List Devices In Linux usb
|
|
IF '${docking_station_model}' == 'WL-UMD05 Pro Rev.E'
|
|
Should Contain ${out} VIA Labs, Inc. USB2.0 Hub
|
|
Should Contain ${out} Fresco Logic Generic Billboard Device
|
|
Should Contain ${out} Prolific Technology, Inc. USB 2.0 Hub
|
|
Should Contain ${out} Genesys Logic, Inc. Hub
|
|
Should Contain ${out} Realtek Semiconductor Corp. USB3.0 Card Reader
|
|
Should Contain ${out} Realtek Semiconductor Corp. RTL8153 Gigabit Ethernet Adapter
|
|
Should Contain ${out} VIA Labs, Inc. USB3.0 Hub
|
|
Should Contain ${out} 05e3:0620 # Genesys Logic, Inc. USB3.2 Hub
|
|
ELSE IF '${docking_station_model}' == 'WL-UMD05 Pro Rev.C1'
|
|
Should Contain ${out} VIA Labs, Inc. USB2.0 Hub
|
|
Should Contain ${out} Fresco Logic USB2.0 Hub
|
|
Should Contain ${out} Linux Foundation 2.0 root hub
|
|
Should Contain ${out} ASIX Electronics Corp. AX88179 Gigabit Ethernet
|
|
Should Contain ${out} VIA Labs, Inc. USB3.0 Hub
|
|
Should Contain ${out} Realtek Semiconductor Corp. USB3.0 Card Reader
|
|
Should Contain ${out} Fresco Logic USB3.0 Hub
|
|
Should Contain ${out} JMTek, LLC. USB PnP Audio Device
|
|
ELSE IF '${docking_station_model}' == 'WL-UG69PD2 Rev.A1'
|
|
Should Contain ${out} Genesys Logic, Inc. Hub
|
|
Should Contain ${out} Fresco Logic USB2.0 Hub
|
|
Should Contain ${out} Genesys Logic, Inc. USB3.1 Hub
|
|
Should Contain ${out} DisplayLink USB3.0 5K Graphic Docking
|
|
Should Contain ${out} Fresco Logic USB3.0 Hub
|
|
ELSE
|
|
Fail unknown docking station
|
|
END
|
|
|
|
Detect Docking Station Video Ports In Linux
|
|
[Documentation] Keyword check the docking station is detected correctly.
|
|
[Arguments] ${docking_station_model}
|
|
IF '${docking_station_model}' == 'WL-UMD05 Pro Rev.E'
|
|
Check PCON On MST Hub In Linux
|
|
Check DP Port On MST Hub In Linux
|
|
ELSE IF '${docking_station_model}' == 'WL-UMD05 Pro Rev.C1'
|
|
Check PCON On MST Hub In Linux
|
|
Check DP Port On MST Hub In Linux
|
|
ELSE IF '${docking_station_model}' == 'WL-UG69PD2 Rev.A1'
|
|
Check DisplayLink Dock In Linux
|
|
ELSE
|
|
Fail unknown docking station
|
|
END
|
|
|
|
Detect Docking Station In Linux
|
|
[Documentation] Keyword check the docking station is detected correctly.
|
|
[Arguments] ${docking_station_model}
|
|
# Workaround for full initialize docking station.
|
|
Sleep 20s
|
|
Detect Docking Station USB Devices In Linux ${docking_station_model}
|
|
Detect Docking Station Video Ports In Linux ${docking_station_model}
|
|
|
|
Check Docking Connection
|
|
[Documentation] Returns True if a monitor is connected to a docking station, False otherwise.
|
|
[Arguments] ${content} ${target}
|
|
${lines}= Split To Lines ${content}
|
|
VAR ${dock_connected}= ${FALSE}
|
|
VAR ${check_for_hdmi}= ${FALSE}
|
|
FOR ${line} IN @{lines}
|
|
${line}= Strip String ${line}
|
|
# at first we ignore that condition, it' ll become relevant once we find connector
|
|
IF ${check_for_hdmi}
|
|
${is_hdmi}= Evaluate "Type: HDMI" in """${line}"""
|
|
IF ${is_hdmi}
|
|
VAR ${dock_connected}= ${TRUE}
|
|
VAR ${check_for_hdmi}= ${FALSE}
|
|
END
|
|
ELSE
|
|
# we start by finding non eDP display
|
|
${contains}= Evaluate 'status: connected' in """${line}"""
|
|
IF ${contains}
|
|
IF "eDP" not in "${line}"
|
|
# since HDMI screens are listed as DP connector we need to look more clues
|
|
IF "${target}" == "HDMI"
|
|
VAR ${check_for_hdmi}= ${TRUE}
|
|
ELSE IF "${target}" == "DP"
|
|
VAR ${dock_connected}= ${TRUE}
|
|
END
|
|
END
|
|
END
|
|
END
|
|
END
|
|
RETURN ${dock_connected}
|