All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Xen-devel <xen-devel@lists.xenproject.org>,
	Anthony PERARD <anthony.perard@vates.tech>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Michal Orzel <michal.orzel@amd.com>
Subject: Re: [PATCH 1/2] CI: Use bash arrays to simplfy dom0 rootfs construction
Date: Tue, 3 Jun 2025 12:50:58 +0200	[thread overview]
Message-ID: <aD7TkroMOfAmZf3p@mail-itl> (raw)
In-Reply-To: <20250602174618.2641439-2-andrew.cooper3@citrix.com>

[-- Attachment #1: Type: text/plain, Size: 4115 bytes --]

On Mon, Jun 02, 2025 at 06:46:17PM +0100, Andrew Cooper wrote:
> For Qubes, this requires switching from sh to bash.
> 
> This reduces the number of times the target filename needs to be written to 1.
> 
> Expand the comment to explain the concatination constraints.
> 
> No functional change.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

With typo below fixed:

Reviewed-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>

> ---
> CC: Anthony PERARD <anthony.perard@vates.tech>
> CC: Stefano Stabellini <sstabellini@kernel.org>
> CC: Michal Orzel <michal.orzel@amd.com>
> CC: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
> 
> v2:
>  * Use dom0_rootfs_extra_{un,}comp arrays
> ---
>  automation/scripts/qubes-x86-64.sh            | 18 ++++++++++++-----
>  .../scripts/xilinx-smoke-dom0-x86_64.sh       | 20 ++++++++++++-------
>  2 files changed, 26 insertions(+), 12 deletions(-)
> 
> diff --git a/automation/scripts/qubes-x86-64.sh b/automation/scripts/qubes-x86-64.sh
> index 8e86940c6eff..5ec6eff6c469 100755
> --- a/automation/scripts/qubes-x86-64.sh
> +++ b/automation/scripts/qubes-x86-64.sh
> @@ -1,4 +1,4 @@
> -#!/bin/sh
> +#!/bin/bash
>  
>  set -ex -o pipefail
>  
> @@ -22,6 +22,8 @@ domU_type="pvh"
>  domU_vif="'bridge=xenbr0',"
>  domU_extra_config=
>  retrieve_xml=
> +dom0_rootfs_extra_comp=()
> +dom0_rootfs_extra_uncomp=()
>  
>  case "${test_variant}" in
>      ### test: smoke test & smoke test PVH & smoke test HVM & smoke test PVSHIM
> @@ -187,10 +189,16 @@ Kernel \r on an \m (\l)
>      rm -rf rootfs
>  fi
>  
> -# Dom0 rootfs
> -cp binaries/ucode.cpio binaries/dom0-rootfs.cpio.gz
> -cat binaries/rootfs.cpio.gz >> binaries/dom0-rootfs.cpio.gz
> -cat binaries/xen-tools.cpio.gz >> binaries/dom0-rootfs.cpio.gz
> +# Dom0 rootfs.  The order or concatination is important; ucode wants to come

                             of

> +# first, and all uncompressed must be ahead of compressed.
> +dom0_rootfs_parts=(
> +    binaries/ucode.cpio
> +    "${dom0_rootfs_extra_uncomp[@]}"
> +    binaries/rootfs.cpio.gz
> +    binaries/xen-tools.cpio.gz
> +    "${dom0_rootfs_extra_comp[@]}"
> +)
> +cat "${dom0_rootfs_parts[@]}" > binaries/dom0-rootfs.cpio.gz
>  
>  # test-local configuration
>  mkdir -p rootfs
> diff --git a/automation/scripts/xilinx-smoke-dom0-x86_64.sh b/automation/scripts/xilinx-smoke-dom0-x86_64.sh
> index 8f02fa73bd06..45121f39400a 100755
> --- a/automation/scripts/xilinx-smoke-dom0-x86_64.sh
> +++ b/automation/scripts/xilinx-smoke-dom0-x86_64.sh
> @@ -28,6 +28,8 @@ extra = "root=/dev/ram0 console=hvc0"
>  memory = 512
>  '
>  DOMU_CFG_EXTRA=""
> +dom0_rootfs_extra_comp=()
> +dom0_rootfs_extra_uncomp=()
>  
>  # Select test variant.
>  if [ "${TEST}" = "ping" ]; then
> @@ -71,6 +73,7 @@ do
>    sleep 1
>  done | argo-exec -p 28333 -d 0 -- /bin/echo
>  "
> +    dom0_rootfs_extra_comp+=(binaries/argo.cpio.gz)
>      DOM0_CMD="
>  insmod /lib/modules/\$(uname -r)/updates/xen-argo.ko
>  xl -vvv create /etc/xen/domU.cfg
> @@ -103,13 +106,16 @@ find . | cpio -H newc -o | gzip >> ../binaries/domU-rootfs.cpio.gz
>  cd ..
>  rm -rf rootfs
>  
> -# Dom0 rootfs
> -cp binaries/ucode.cpio binaries/dom0-rootfs.cpio.gz
> -cat binaries/rootfs.cpio.gz >> binaries/dom0-rootfs.cpio.gz
> -cat binaries/xen-tools.cpio.gz >> binaries/dom0-rootfs.cpio.gz
> -if [[ "${TEST}" == argo ]]; then
> -    cat binaries/argo.cpio.gz >> binaries/dom0-rootfs.cpio.gz
> -fi
> +# Dom0 rootfs.  The order or concatination is important; ucode wants to come
> +# first, and all uncompressed must be ahead of compressed.
> +dom0_rootfs_parts=(
> +    binaries/ucode.cpio
> +    "${dom0_rootfs_extra_uncomp[@]}"
> +    binaries/rootfs.cpio.gz
> +    binaries/xen-tools.cpio.gz
> +    "${dom0_rootfs_extra_comp[@]}"
> +)
> +cat "${dom0_rootfs_parts[@]}" > binaries/dom0-rootfs.cpio.gz
>  
>  # test-local configuration
>  mkdir -p rootfs
> -- 
> 2.39.5
> 

-- 
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  parent reply	other threads:[~2025-06-03 10:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-02 17:46 [PATCH 0/2] CI: Improve domU handling Andrew Cooper
2025-06-02 17:46 ` [PATCH 1/2] CI: Use bash arrays to simplfy dom0 rootfs construction Andrew Cooper
2025-06-02 22:49   ` Stefano Stabellini
2025-06-03 10:50   ` Marek Marczykowski-Górecki [this message]
2025-06-02 17:46 ` [PATCH 2/2] CI: Adjust how domU is packaged in dom0 Andrew Cooper
2025-06-02 22:53   ` Stefano Stabellini
2025-06-03 10:51   ` Marek Marczykowski-Górecki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aD7TkroMOfAmZf3p@mail-itl \
    --to=marmarek@invisiblethingslab.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=anthony.perard@vates.tech \
    --cc=michal.orzel@amd.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.