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

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

On Tue, May 27, 2025 at 04:01:34PM +0200, Anthony PERARD wrote:
> On Thu, May 22, 2025 at 06:36:39PM +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.
> 
> Isn't the correct spelling "concatenation"? Same for the two comments.
> 
> > 
> > No functional change.
> > 
> > Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> > ---
> > I would like to find a slightly nicer way of conditional parts, but nothing
> > comes to mind.
> 
> Well, one way I can think of is having a new variable which can carry
> the rootfs part associated with a particular test, then that variable
> can be updated at the time we configure for that test. Something like:
> 
> # init
> declare -a append_rootfs_part
> # or append_rootfs_part=() is probably fine too.
> 
> case $test in
>   argo)
>     append_rootfs_part+=(argo.cpio.gz)
>     # ... other test configuration
>     ;;
> esac
> 
> # Dom0 rootfs
> parts=(
>     rootfs.cpio.gz
>     xen-tools.cpio.gz
>     "${append_rootfs_part[@]}"
> )
> 
> And that should works fine, even if there isn't any extra rootfs part.

That would work for compressed parts, but not for uncompressed - which
need to come before all compressed. But maybe there could be two arrays
- one for uncompressed and another for compressed? Then, each could be
extended anywhere, without messing the order.

> 
> > diff --git a/automation/scripts/qubes-x86-64.sh b/automation/scripts/qubes-x86-64.sh
> > index 10af274a0ba7..1dd3f48b3d29 100755
> > --- a/automation/scripts/qubes-x86-64.sh
> > +++ b/automation/scripts/qubes-x86-64.sh
> > @@ -187,10 +187,14 @@ 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 concatenation
> 
> Same typo in the other comment.
> 
> Beside the typo, patch looks fine:
> Reviewed-by: Anthony PERARD <anthony.perard@vates.tech>
> 
> Thanks,
> 
> -- 
> Anthony PERARD

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

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

  reply	other threads:[~2025-05-27 15:19 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-22 17:36 [PATCH 0/3] CI: Improve domU handling Andrew Cooper
2025-05-22 17:36 ` [PATCH 1/3] CI/qubes: Deduplicate the handling of ${dom0_check} Andrew Cooper
2025-05-27 13:41   ` Anthony PERARD
2025-05-28  0:18     ` Stefano Stabellini
2025-05-22 17:36 ` [PATCH 2/3] CI: Use bash arrays to simplfy dom0 rootfs construction Andrew Cooper
2025-05-27 14:01   ` Anthony PERARD
2025-05-27 15:19     ` Marek Marczykowski-Górecki [this message]
2025-05-27 15:24       ` Andrew Cooper
2025-05-28  9:45         ` Anthony PERARD
2025-05-28 12:12           ` Andrew Cooper
2025-05-28  0:19     ` Stefano Stabellini
2025-05-22 17:36 ` [PATCH 3/3] CI: Adjust how domU is packaged in dom0 Andrew Cooper
2025-05-27 13:55   ` Marek Marczykowski-Górecki
2025-05-27 15:57     ` Andrew Cooper
2025-05-28  0:30   ` Stefano Stabellini
2025-05-28  0:38     ` Andrew Cooper
2025-05-28  0:59       ` Stefano Stabellini

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=aDXX-PagUgzu54u4@mail-itl \
    --to=marmarek@invisiblethingslab.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=anthony@xenproject.org \
    --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.