public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
* [PATCH] test: Avoid hitting guestfish command length limits
@ 2023-11-29  2:13 David Gibson
  0 siblings, 0 replies; only message in thread
From: David Gibson @ 2023-11-29  2:13 UTC (permalink / raw)
  To: Stefano Brivio, passt-dev; +Cc: David Gibson

In test/prepare-distro-img.sh we use guestfish to tweak our distro guest
images to be suitable.  Part of this is using a 'copy-in' directive to copy
in the source files for passt itself.  Currently we copy in all the files
with a single 'copy-in', since it allows listing multiple files.  However
it turns out that the number of arguments it can accept is fairly limited
and our current list of files is already very close to that limit.

Instead, expand our list of files to one copy-in per file, avoiding that
limitation.  This isn't much slower, because all the commands still run in
a single invocation of guestfish itself.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
 test/prepare-distro-img.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/prepare-distro-img.sh b/test/prepare-distro-img.sh
index 46bc126..0d967c9 100755
--- a/test/prepare-distro-img.sh
+++ b/test/prepare-distro-img.sh
@@ -14,5 +14,5 @@ rm-f /etc/init.d/cloud-config
 rm-f /etc/init.d/cloud-final
 rm-f /etc/init.d/cloud-init
 rm-f /etc/init.d/cloud-init-local
-copy-in $PASST_FILES /root/
+$(for f in $PASST_FILES; do echo copy-in $f /root; done)
 EOF
-- 
@@ -14,5 +14,5 @@ rm-f /etc/init.d/cloud-config
 rm-f /etc/init.d/cloud-final
 rm-f /etc/init.d/cloud-init
 rm-f /etc/init.d/cloud-init-local
-copy-in $PASST_FILES /root/
+$(for f in $PASST_FILES; do echo copy-in $f /root; done)
 EOF
-- 
2.43.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2023-11-29  2:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-29  2:13 [PATCH] test: Avoid hitting guestfish command length limits David Gibson

Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).