[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 3/5] automation: Add the expect script with test case for FVP


  • To: Wei Chen <Wei.Chen@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>
  • From: Henry Wang <Henry.Wang@xxxxxxx>
  • Date: Fri, 8 Dec 2023 12:27:20 +0000
  • Accept-language: zh-CN, en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=8RRSNwxFwIjpdjXh6Vx1T6HIBiH4SEPVJTSS7gCkaj0=; b=BL5IsrFO6Wg/9+X7n5gF6R190+SjCcHVrkIvxszGlExCGLctuJFhtwPnq5CdKm/U7xstyPbET2v1IaTDaCp6wsqfbtveq6FV0Ip9wWSWQ7nz/3cbKoB5yuLrBH3b9Rcd3qRIFbGC1rUQG3HFn+aqaOsCLEc/O2iOWfNimWaiURjO+1fxnInra8wDdma5+IDFSdoZxNKPhBvxTXjWBvmYrYEnqVnYtWmneNWgeDdgKI9g0n2g/5H+Suarx9yaEA9MU5d1mIP5nd8njK2Rn/vZHkRzBGluFa8HjVVsHLWdqGnBChVB8vv7GHuy0MogpgFg1zJWsKYhODsjk/E+5bRX/g==
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=8RRSNwxFwIjpdjXh6Vx1T6HIBiH4SEPVJTSS7gCkaj0=; b=VeYBTwbdDIU1pVgWa9K4fBynjEh8Y5SGGsI1MKMELW4DhmYY/6TOIeX8TjKbxlrRceJCF/Esb17w+/T5Cn1wBOqUg76lQNl7kRz2TepjICbdwUraB6k1krWth7pIFEE4YMU4oCvGOQUldbxaJiWtsqDN3DigUXYnac8kf+QIY8E02CdA3CFJ1ZJtJh9+Cx5aMuOsWeicoXAShfhq1hx7kK/OGRNQm8UkJqVn6zRDsGb620omkCpHNay4iAUKufp5cBTYOQRqz33XDMMgoeZ5YDKgLOVxeoA/hzM7kC0Vx1YcABBw1o3r1ce+Ru/XYSBu5lSp8HqC74x7M9ueUsLvrQ==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=dMaLZ8+fv7PrTCKmW7hPBqXtpbKaXlbAtta3bA3rOiLIHi0Sn7/wjDy07FThifKjVYgBcQ7P9AR0BC4PcK0lwsRo36ivY5OWwhEmGBl2Lxh4D6wGA+XFRq/1fm3S9AYgs+qcns2ZIkDwD7sj9wBkSDKctw29O2umQJI4uKOmyKbxjGMwgY2fpz0SBPTrBtjv2MGyGBuZX0QIoel5iE3EpCCkTZgqizpqTn8mxBErGZX0I/hP/jazHNmh1b/ar+mx9UvCvbVC82GOnEOvhyjnZfUukEH4edAyUl1LW0uORggoDpX5xhzpQ2aTwyXndGcB5HL/I/jIfj26HfCccYJVvw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Hax8M2ysZMcb2a/RcFStzHBrcZYmKEwvn5ivbdGbv6OETySo+BbrAr5SJ9nmZ2Ka4Tx1af7Z66hoRQ4C5UASJ+AH9iyFq1P9TP3vJQLszI9HO5XD+M0lMwPWAO4zq4943sOtgUdloWt0RvqevgQAlVoElal8aFve+4aSz6TL29w0C5tmJz9uPr4rBWiZM1ramdkawDXK7WE6xWcu2OO9LE2GWJ3wiFtNNCUgy/cKoR6VGE36wAiAAvuW5hSeGK5GrsRmAeUlg2Zvn5cXXomrtFTzhj3MicN4p9+Yp9xFi/UO5N0jf1bXdMv6glQrLwOTWuvWtAurZSgnUCPVTMKKVQ==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Doug Goldstein <cardoe@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Delivery-date: Fri, 08 Dec 2023 12:27:49 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHaKZoAVIHO2rCYDECWUL8sUR2sfLCfFe6AgAACFwCAAAHkAIAAAsIAgAAIGgCAAAGZgIAAFYMAgAAUooA=
  • Thread-topic: [PATCH v2 3/5] automation: Add the expect script with test case for FVP

Hi Wei, Michal,

> On Dec 8, 2023, at 19:13, Wei Chen <Wei.Chen@xxxxxxx> wrote:
> 
> Hi Henry and Michal,
> 
>>>>>>> On 08/12/2023 06:46, Henry Wang wrote:
>>>>>>>> diff --git a/automation/scripts/expect/fvp-base-smoke-dom0-arm64.exp 
>>>>>>>> b/automation/scripts/expect/fvp-base-smoke-dom0-arm64.exp
>>>>>>>> new file mode 100755
>>>>>>>> index 0000000000..25d9a5f81c
>>>>>>>> --- /dev/null
>>>>>>>> +++ b/automation/scripts/expect/fvp-base-smoke-dom0-arm64.exp
>>>>>>>> @@ -0,0 +1,73 @@
>>>>>>>> +#!/usr/bin/expect
>>>>>>>> +
>>>>>>>> +set timeout 2000
>>>>>>> Do we really need such a big timeout (~30 min)?
>>>>>>> Looking at your test job, it took 16 mins (quite a lot but I know FVP 
>>>>>>> is slow
>>>>>>> + send_slow slows things down)
>>>>>> 
>>>>>> This is a really good question. I did have the same question while 
>>>>>> working on
>>>>>> the negative test today. The timeout 2000 indeed will fail the job at 
>>>>>> about 30min,
>>>>>> and waiting for it is indeed not really pleasant.
>>>>>> 
>>>>>> But my second thought would be - from my observation, the overall time 
>>>>>> now
>>>>>> would vary between 15min ~ 20min, and having a 10min margin is not that 
>>>>>> crazy
>>>>>> given that we probably will do more testing from the job in the future, 
>>>>>> and if the
>>>>>> GitLab Arm worker is high loaded, FVP will probably become slower. And 
>>>>>> normally
>>>>>> we don’t even trigger the timeout as the job will normally pass. So I 
>>>>>> decided
>>>>>> to keep this.
>>>>>> 
>>>>>> Mind sharing your thoughts about the better value of the timeout? 
>>>>>> Probably 25min?
>>>>> From what you said that the average is 15-20, I think we can leave it set 
>>>>> to 30.
>>>>> But I wonder if we can do something to decrease the average time. ~20 min 
>>>>> is a lot
>>>>> even for FVP :) Have you tried setting send_slow to something lower than 
>>>>> 100ms?
>>>>> That said, we don't send too many chars to FVP, so I doubt it would play 
>>>>> a major role
>>>>> in the overall time.
>>>> 
>>>> I agree with the send_slow part. Actually I do have the same concern, here 
>>>> are my current
>>>> understanding and I think you will definitely help with your knowledge:
>>>> If you check the full log of Dom0 booting, for example [1], you will find 
>>>> that we wasted so
>>>> much time in starting the services of the OS (modloop, udev-settle, etc). 
>>>> All of these services
>>>> are retried many times but in the end they are still not up, and from my 
>>>> understanding they
>>>> won’t affect the actual test(?) If we can somehow get rid of these 
>>>> services from rootfs, I think
>>>> we can save a lot of time.
>>>> 
>>>> And honestly, I noticed that qemu-alpine-arm64-gcc suffers from the same 
>>>> problem and it also
>>>> takes around 15min to finish. So if we managed to tailor the services from 
>>>> the filesystem, we
>>>> can save a lot of time.
>>> That is not true. Qemu runs the tests relatively fast within few minutes. 
>>> The reason you see e.g. 12 mins
>>> for some Qemu jobs comes from the timeout we set in Qemu scripts. We don't 
>>> have yet the solution (we could
>>> do the same as Qubes script) to detect the test success early and exit 
>>> before timeout. That is why currently
>>> the only way for Qemu tests to finish is by reaching the timeout.
>>> 
>>> So the problem is not with the rootfs and services (the improvement would 
>>> not be significant) but with
>>> the simulation being slow. That said, this is something we all know and I 
>>> expect FVP to only be used in scenarios
>>> which cannot be tested using Qemu or real HW.
>> Ok, you made a point. Let me do some experiments to see if I can improve. 
>> Otherwise maybe
>> we can live with this until a better solution.
>> Kind regards,
>> Henry
> 
> QEMU works like FVP enabled use_real_time flag. How about enable 
> use_real_time flag in CI for most test cases, but disable it for
> some time sensitive test cases? Normally, enable use_real_time
> will give several times improvement of FVP performance.

I am seeing below from the FVP parameter lists of the one we are currently 
using. The "Deprecated" word worries
me a bit (the old version FVP does not have the “Deprecated" though).
```
bp.refcounter.use_real_time=0                         # (bool  , init-time) 
default = '0'      : **Deprecated, this parameter will be removed in future 
versions** Update the Generic Timer counter at a real-time base frequency 
instead of simulator time
```

Also, from my testing in the GitLab pipeline, I was not able to see significant 
time improvement. So I guess
instead I will try what Julien suggests to see if things can be better.

Kind regards,
Henry 

> 
> Cheers,
> Wei Chen
> 
>>> 
>>> ~Michal


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.