Closed m-iwanicki closed 2 weeks ago
@BeataZdunczyk Inconsistent output from keyword leads to inconsistent tests results. We need to get to the bottom of this problem, or at least workaround this in keyword, to drop the extra content. Need reliability suite for this keyword as well to ensure this is properly improved.
@JanPrusinowski There is nothing in your PR that fixes it.
Also in your logs second Execute
command returns:
Return: ">> Ge\r\n>> Get-\r\n>> > Get-PnpDevice -PresentOnly | Where-Object { $_.InstanceId -match '\r\n>> > Get-PnpDevice -PresentOnly | Where-Object { $_.InstanceId -match '^USB' }\r\n>> \r\n\r\nStatus Class FriendlyName InstanceId \r\n------ ----- ------------ ---------- \r\nOK USB USB Mass Storage Device USB\\VID_0781...\r\nOK USB USB Root Hub (USB 3.0) USB\\ROOT_HUB...\r\nOK USB Qualcomm USB Composite Device 90B3 USB\\VID_05C6...\r\nOK Net Remote NDIS based Internet Sharing Device USB\\VID_05C6...\r\nOK DiskDrive USB SanDisk 3.2Gen1 USB Device USBSTOR\\DISK...\r\nOK Bluetooth Intel(R) Wireless Bluetooth(R) USB\\VID_8087..."
I was trying to create a keyword which would clean the output from the command and any trash that might have stayed in the console from running the previous command. https://github.com/Dasharo/open-source-firmware-validation/pull/402/commits/7889341d3860daa8e2736ab23b3445c346026bdb Unfortunatelly there is an issue when comparing two identical strings:
OUT1 START
.
STRING CONTAINS:
Line: G> Get-PnpDevice -PresentOnly | Where-Object { $_.InstanceId -match '^USB' }
Command: Get-PnpDevice -PresentOnly | Where-Object { $_.InstanceId -match '^USB' }
ADD: False
STRING CONTAINS:
Line:
Command: Get-PnpDevice -PresentOnly | Where-Object { $_.InstanceId -match '^USB' }
ADD: False
STRING CONTAINS:
Line: Status Class FriendlyName InstanceId
Command: Get-PnpDevice -PresentOnly | Where-Object { $_.InstanceId -match '^USB' }
ADD: False
Command is a substring of Line - but robot framework returns check condition as false.
To run:
robot -v snipeit:no -L TRACE -v rte_ip:192.168.10.221 -v device_ip:192.168.10.161 -v config:protectli-vp2420 -t 'TEST*' self-tests/os-boot.robot
@JanPrusinowski
This fixes the issue for me: https://github.com/Dasharo/open-source-firmware-validation/pull/409/files
I focused on trying something else and fixing the original issue, more than trying to get to the bottom of weird behavior you face, as it seemed overly complex.
Please confirm.
@macpijan Your fix works. logs.zip
@m-iwanicki PR with test: https://github.com/Dasharo/open-source-firmware-validation/pull/402
Device
Protectli VP2420
RTE version
0.7.5 (dunfell)
OSFV version
develop
Affected component(s) or functionality
No response
Brief summary
multiple
Execute Command In Terminal
on Windows doesn't return only cmd outputHow reproducible
Always but with different results
How to reproduce
Command used to run test:
test.robot
:Expected behavior
${out}
should contain only output of command, e.g.Actual behavior
${out}
contains part or whole of command that was calledWhat is returned is inconsistent, e.g.:
Link to screenshots or logs
logs: log.tar.gz
Additional context
No response
Solutions you've tried
No response