From: "Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: xen-devel@lists.xenproject.org, Henry Wang <Henry.Wang@arm.com>,
Doug Goldstein <cardoe@cardoe.com>,
Stefano Stabellini <sstabellini@kernel.org>
Subject: Re: [PATCH 4/5] automation: improve checking for MSI/MSI-X in PCI passthrough tests
Date: Thu, 19 Oct 2023 02:16:12 +0200 [thread overview]
Message-ID: <ZTB1TV7LX+tUGAKd@mail-itl> (raw)
In-Reply-To: <33c1d5b2-8652-43b7-be7a-699db144e911@citrix.com>
[-- Attachment #1: Type: text/plain, Size: 1709 bytes --]
On Thu, Oct 19, 2023 at 12:30:22AM +0100, Andrew Cooper wrote:
> On 06/10/2023 3:05 am, Marek Marczykowski-Górecki wrote:
> > diff --git a/automation/scripts/qubes-x86-64.sh b/automation/scripts/qubes-x86-64.sh
> > index 5464d10fc343..842e6fae7204 100755
> > --- a/automation/scripts/qubes-x86-64.sh
> > +++ b/automation/scripts/qubes-x86-64.sh
> > @@ -90,23 +90,18 @@ on_reboot = "destroy"
> >
> > domU_check="
> > set -x -e
> > -ip link set eth0 up
> > -timeout 30s udhcpc -i eth0
> > +interface=eth0
> > +ip link set \"\$interface\" up
> > +timeout 30s udhcpc -i \"\$interface\"
> > pingip=\$(ip -o -4 r show default|cut -f 3 -d ' ')
> > ping -c 10 \"\$pingip\"
> > echo domU started
> > -cat /proc/interrupts
> > +pcidevice=\$(basename \$(readlink /sys/class/net/\$interface/device))
> > +lspci -vs \$pcidevice
>
> Actually, I know I said I had no more comments, and maybe this is one
> for further cleanup rather than for now, but wouldn't we be much better
> using a heredoc?
>
> read -r -d '' domU_check <<"EOF"
>
> lorem ipsum, no \ escaping " or $
>
> EOF
>
> If nothing else it would make the innards of the more readable as a
> script fragment, and less likely go to wrong with variable expansion in
> the wrong context.
Some of those snippets have intentionally unescaped $ (as in - have it
expanded in place), and IMO having different method depending whether
you want to expand variables inside or not will be more error-prone.
Syntax highlighting in an editor makes it rather easy to spot unescaped
$ or such (and then decide whether it was intentional or not).
--
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2023-10-19 0:16 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-06 2:05 [PATCH 0/5] automation: cleanup hardware based tests Marek Marczykowski-Górecki
2023-10-06 2:05 ` [PATCH 1/5] automation: include real-time view of the domU console log too Marek Marczykowski-Górecki
2023-10-06 2:05 ` [PATCH 2/5] automation: hide timeout countdown in log Marek Marczykowski-Górecki
2023-10-18 17:45 ` Andrew Cooper
2023-10-18 22:16 ` Marek Marczykowski-Górecki
2023-10-06 2:05 ` [PATCH 3/5] automation: cleanup test alpine install Marek Marczykowski-Górecki
2023-10-06 2:05 ` [PATCH 4/5] automation: improve checking for MSI/MSI-X in PCI passthrough tests Marek Marczykowski-Górecki
2023-10-18 23:30 ` Andrew Cooper
2023-10-19 0:16 ` Marek Marczykowski-Górecki [this message]
2023-10-06 2:05 ` [PATCH 5/5] automation: extract QEMU log in relevant hardware tests Marek Marczykowski-Górecki
2023-10-18 17:46 ` [PATCH for-4.18 0/5] automation: cleanup hardware based tests Andrew Cooper
2023-10-18 22:32 ` Stefano Stabellini
2023-10-19 0:31 ` Henry Wang
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=ZTB1TV7LX+tUGAKd@mail-itl \
--to=marmarek@invisiblethingslab.com \
--cc=Henry.Wang@arm.com \
--cc=andrew.cooper3@citrix.com \
--cc=cardoe@cardoe.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.