<html><body><p><tt><font size="2">Hi Tim,</font></tt><br><br><tt><font size="2">    ${image_id}=  Wait Until Keyword Succeeds  180 sec  10 sec  Get Latest Image ID<br>    Rprint Vars  image_id<br></font></tt><br><br><font size="2">           It looks like the image didn't get downloaded / transferred from the TFTP server to BMC  /tmp/images/  within 3 minutes 10 seconds.  If the TFTP server is slower or take longer time, it could lead to this failure.</font><br><font size="2">           </font><br><font size="2">           It worked when I tried, but hey its been sometime since, we will try again and see if it working or not on the latest upstream master image.</font><br><br><b><font size="2" color="#0000FF">Thanks and Regards,</font></b><br><font size="2" color="#0000FF">   George Keishing</font><br><br><br><img width="16" height="16" src="cid:1__=8FBB0CB6DFABD94E8f9e8a93df938690918c8FB@" border="0" alt="Inactive hide details for CS20 CHLi30 ---19-11-2020 12:38:59 PM---Hi Adriana, Thanks your prompt response. You can check more d"><font size="2" color="#424282">CS20 CHLi30 ---19-11-2020 12:38:59 PM---Hi Adriana, Thanks your prompt response. You can check more detail from the robot script:</font><br><br><font size="2" color="#5F5F5F">From:        </font><font size="2">CS20 CHLi30 <CHLI30@nuvoton.com></font><br><font size="2" color="#5F5F5F">To:        </font><font size="2">Adriana Kobylak <anoo@linux.ibm.com></font><br><font size="2" color="#5F5F5F">Cc:        </font><font size="2">"openbmc@lists.ozlabs.org" <openbmc@lists.ozlabs.org>, "anoo@us.ibm.com" <anoo@us.ibm.com>, CS20 CHLi30 <CHLI30@nuvoton.com></font><br><font size="2" color="#5F5F5F">Date:        </font><font size="2">19-11-2020 12:38 PM</font><br><font size="2" color="#5F5F5F">Subject:        </font><font size="2">[EXTERNAL] RE: [Test Automation] [Update Sevice] Failed: Test Firmware Tftp Upload Image.Install Same Image Two Times</font><br><font size="2" color="#5F5F5F">Sent by:        </font><font size="2">"openbmc" <openbmc-bounces+gkeishin=in.ibm.com@lists.ozlabs.org></font><br><hr width="100%" size="2" align="left" noshade style="color:#8091A5; "><br><br><br><tt><font size="2">Hi Adriana,<br><br>Thanks your prompt response. You can check more detail from the robot script:<br></font></tt><tt><font size="2"><a href="https://github.com/openbmc/openbmc-test-automation/blob/master/redfish/update_service/test_firmware_tftp_upload_image.robot">https://github.com/openbmc/openbmc-test-automation/blob/master/redfish/update_service/test_firmware_tftp_upload_image.robot</a></font></tt><tt><font size="2"> <br><br>Test failed at Get Latest Image ID return false, due to /tmp/images/${image_id} didn't exist.<br>Below are failed log and test script for you refer it. If there is any question, just let me know. Thank you.<br><br>[Failed log]<br>Keyword 'Get Latest Image ID' failed after retrying...<br>The last error was: **ERROR** Invalid variable value: image_id: <blank> <str><br><br>[Test script]<br>Same Firmware Install Two Times<br>    [Documentation]  Download same image twice to BMC via ImageURI. Second attempt would fail.<br>    [Arguments]  ${apply_time}  ${tftp_server}=${TFTP_SERVER}  ${image_file_name}=${IMAGE_FILE_NAME}<br><br>    # Description of argument(s):<br>    # apply_time       ApplyTime allowed values (e.g. "OnReset", "Immediate").<br>    # tftp_server      Server IP.<br>    # image_file_name  Image file name.<br><br>    ImageURI Download Install  ${apply_time}<br><br>    # Download image from TFTP server via ImageURI to BMC.<br>    Redfish.Post  /redfish/v1/UpdateService/Actions/UpdateService.SimpleUpdate<br>    ...  body={"ImageURI": "t</font></tt><tt><font size="2">ftp://$</font></tt><tt><font size="2">{tftp_server}/${image_file_name}"}<br><br>    ${image_version}=  Get Image Version From TFTP Server  ${tftp_server}  ${image_file_name}<br>    ${software_inventory_record}=  Get Software Inventory State By Version<br>    ...  ${image_version}<br>    Rprint Vars  software_inventory_record<br><br>    ${image_id}=  Wait Until Keyword Succeeds  180 sec  10 sec  Get Latest Image ID<br>    Rprint Vars  image_id<br><br>    Check Image Update Progress State  match_state='Enabled'  image_id=${image_id}<br>    # Check if the existing firmware is functional.<br>    Pass Execution If  ${software_inventory_record['functional']}<br>    ...  The existing ${image_version} firmware is already functional.<br><br>Get Latest Image ID<br>    [Documentation]  Return the ID of the most recently extracted image.<br>    # Note: This keyword will fail if there is no such file.<br><br>    # Example: # ls /tmp/images/<br>    #            1b714fb7<br>    ${image_id}=  Get Latest File  /tmp/images/<br>    Valid Value  image_id<br><br>    # Though an image sub-directory was found, it really isn't valid unless<br>    # the MANIFEST file is present.<br>    BMC Execute Command  ls -l /tmp/images/${image_id}/MANIFEST<br><br>    [Return]  ${image_id}<br><br>Best regards,<br>Tim<br>-----Original Message-----<br>From: Adriana Kobylak [</font></tt><tt><font size="2"><a href="mailto:anoo@linux.ibm.com">mailto:anoo@linux.ibm.com</a></font></tt><tt><font size="2">]<br>Sent: Thursday, November 19, 2020 11:40 AM<br>To: CS20 CHLi30 <CHLI30@nuvoton.com><br>Cc: anoo@us.ibm.com; openbmc@lists.ozlabs.org<br>Subject: Re: [Test Automation] [Update Sevice] Failed: Test Firmware Tftp Upload Image.Install Same Image Two Times<br><br>On 2020-11-18 19:51, CS20 CHLi30 wrote:<br>><br>> Recently, we met 1 test item fail "Test Firmware Tftp Upload<br>> Image.Install Same Image Two Times" in Update Service of OpenBMC Test<br>> Automation.<br><br>> According your commit, I understand this is a good fix to clear no use<br>> image files in /tmp folder.<br>><br>> But, it seems against test item of update service in openbmc test<br>> automation.<br>><br>> The test script will check if the existing firmware is functional<br>> according image_id in /tmp folder, if existing then it's not allow to<br>> update same image two times.<br>><br>> However, after your commit then test script will fail due to image_id<br>> dir be deleted. Did you have any suggestion for this symptom?<br><br>Hi Tim,<br><br>Could you provide a bit more details about this test case, you hint that it may exist in the openbmc-test-automation repo?<br><br>The openbmc-test-automation handles this scenario by extracting the MANIFEST file out of the code update tarball before the upload and reading the VERSION string, then comparing that with the VERSION in the /etc/os-release file in the BMC to determine if the version is already running in the BMC.<br><br>I wouldn't recommend trying to generate the id from within the test case because the algorithm may change. So hopefully checking the version string is an alternative that'd work.<br>________________________________<br>________________________________<br> The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.<br><br></font></tt><br><br><BR>
</body></html>