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

Re: [PATCH 1/2] automation: Add support for using XTF for arm64 testing


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Fri, 16 Dec 2022 10:31:46 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none
  • 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=fidLWj+lVO2NuRNu/kgRIIV8xUQWIjGeR3sqB4FgImY=; b=oKIi7qqVfHW5yDV8hc8pMpzNzpKKJ6AUkuSt+FJ26Qw+38TwX/dYR505IhXGD/D0QVfsiUR5X3IRTx2tdDbLtfbC3852nks2m0vtlOFjvxDpmriXI3N36YoTkK7CPNUdz8OSjdxBA754tLRr9JD5S4fnL088nSNO+RP9InS/T1joS2q2wqaFUKldilDGk5Pp52Rj48l6nhY2dVU4AgUfn64ZVi5pZl31tGAMXpK8fA3IZXPiBcv+zoW2P3x7nPBZVh+rMTREJ5zOXdAzrlmTv9B1Rm06/Nz4XDLk54kjm2+DmOvVFO7Xago2wss0mjwyBxgUHqYNvjiRUAkhxvhSIA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OWuQXnZGXHx/Y6vv0f4CBmr87rKYNyZmhJhjTUpK8C6DyDNE8umBkzux96mYtsdzjX0ZwSxohmwSY1jxTeTEoXMI9bHUJfQpW3hCneV02dq+58u7eJcR6NT5l8lNS4pzbdnoTQjRTOpl11qKhBrECX1iRbAacW4dia8GYi4nw2Lf6suO3D2SnRhICJwyXo6J6UbBpTKvXW25+KxPyy9teC3pVcOi+kPQQfxVXHMPaAqw27k9Vw66xZ1C1oggA7lEaa1Cup6RRB56jAZSHVCuqdQJMiWudurIBtJsstdY6IQ1fsvCuw6W5JbJEoIFvjlZ3W02IfkJqFx7OiJ4VApbTg==
  • Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Doug Goldstein <cardoe@xxxxxxxxxx>
  • Delivery-date: Fri, 16 Dec 2022 09:31:55 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi Stefano,

On 15/12/2022 22:05, Stefano Stabellini wrote:
> 
> 
> On Thu, 15 Dec 2022, Michal Orzel wrote:
>> Introduce support for using XTF on Arm to perform low-level testing.
>> For the purpose of the CI testing, let's use the fork [1] from upstream
>> XTF with implemented support for arm64 (the upstream XTF only supports
>> x86).
>>
>> Add a new script under automation/scripts to be used by the CI XTF test
>> jobs to perform the following tasks:
>>  - Compiling XTF,
>>  - Creating dom0 rootfs,
>>  - Generating u-boot script using ImageBuilder,
>>  - Running Xen with Linux as dom0 and XTF as a dom0less domU using Qemu,
>>  - Checking test result.
>>
>> The script takes the name of the XTF test to run as a first parameter.
>>
>> [1] 
>> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.com%2Fxen-project%2Ffusa%2Fxtf.git&data=05%7C01%7Cmichal.orzel%40amd.com%7C92d389df450446d2916608dadee01c9d%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C638067351382726466%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=WSQJe1s9%2B67c%2FxvYu3OP9Hr1ZZXWSpjXNnCbIwbw2OU%3D&reserved=0
>>  (branch xtf-arm)
>>
>> Signed-off-by: Michal Orzel <michal.orzel@xxxxxxx>
>> ---
>>  automation/scripts/qemu-xtf-dom0less-arm64.sh | 97 +++++++++++++++++++
>>  1 file changed, 97 insertions(+)
>>  create mode 100755 automation/scripts/qemu-xtf-dom0less-arm64.sh
>>
>> diff --git a/automation/scripts/qemu-xtf-dom0less-arm64.sh 
>> b/automation/scripts/qemu-xtf-dom0less-arm64.sh
>> new file mode 100755
>> index 000000000000..321d1abc543b
>> --- /dev/null
>> +++ b/automation/scripts/qemu-xtf-dom0less-arm64.sh
>> @@ -0,0 +1,97 @@
>> +#!/bin/bash
>> +
>> +set -ex
>> +
>> +# Name of the XTF test
>> +xtf_test=$1
>> +
>> +# Message returned by XTF in case of success
>> +passed="Test result: SUCCESS"
>> +
>> +# XXX QEMU looks for "efi-virtio.rom" even if it is unneeded
>> +curl -fsSLO 
>> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fqemu%2Fqemu%2Fraw%2Fv5.2.0%2Fpc-bios%2Fefi-virtio.rom&data=05%7C01%7Cmichal.orzel%40amd.com%7C92d389df450446d2916608dadee01c9d%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C638067351382726466%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=f9gY1ubTk0NssPcr38A5BUuFzdrIAm8rJXsuMNuGXYs%3D&reserved=0
>> +./binaries/qemu-system-aarch64 \
>> +   -machine virtualization=true \
>> +   -cpu cortex-a57 -machine type=virt \
>> +   -m 2048 -smp 2 -display none \
>> +   -machine dumpdtb=binaries/virt-gicv2.dtb
>> +
>> +# XXX disable pl061 to avoid Linux crash
>> +fdtput binaries/virt-gicv2.dtb -p -t s /pl061@9030000 status disabled
>> +
>> +# XTF
>> +# Build a single XTF test passed as a first parameter to the script.
>> +# Build XTF with GICv2 support to match Qemu configuration and with SBSA 
>> UART
>> +# support, so that the test will use an emulated UART for printing messages.
>> +# This will allow us to run the test on both debug and non-debug Xen builds.
>> +rm -rf xtf
>> +git clone 
>> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.com%2Fxen-project%2Ffusa%2Fxtf.git&data=05%7C01%7Cmichal.orzel%40amd.com%7C92d389df450446d2916608dadee01c9d%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C638067351382726466%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=WSQJe1s9%2B67c%2FxvYu3OP9Hr1ZZXWSpjXNnCbIwbw2OU%3D&reserved=0
>>  -b xtf-arm
>> +make -C xtf TESTS=tests/${xtf_test} CONFIG_SBSA_UART=y CONFIG_GICV2=y 
>> -j$(nproc)
>> +cp xtf/tests/${xtf_test}/test-mmu64le-${xtf_test} binaries/xtf-test
>> +
>> +# DOM0 rootfs
> 
> Given that we don't actually need dom0 for anything, maybe we could only
> run xtf as the only domU guest without dom0 (pure dom0less
> configuration)?
This is what I thought at the beginning. It definitely makes sense because at 
the moment
we do not test pure dom0less configuration. I will do this in v2.

~Michal



 


Rackspace

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