From: Joshua Daley <jdaley@linux.ibm.com>
To: Matthew Rosato <mjrosato@linux.ibm.com>, qemu-s390x@nongnu.org
Cc: qemu-devel@nongnu.org, jrossi@linux.ibm.com, zycai@linux.ibm.com,
borntraeger@linux.ibm.com, jjherne@linux.ibm.com,
pasic@linux.ibm.com, farman@linux.ibm.com,
richard.henderson@linaro.org, iii@linux.ibm.com,
david@kernel.org, cohuck@redhat.com
Subject: Re: [PATCH v2 3/3] tests/functional/s390x/test_secure_ipl: Add virtio-blk-pci boot dev case
Date: Wed, 2 Sep 2026 10:27:12 -0400 [thread overview]
Message-ID: <0eb91d88-dcf6-45a2-b18b-ca79b09e3748@linux.ibm.com> (raw)
In-Reply-To: <4012f184-e3d8-4b48-abf2-66b694076f97@linux.ibm.com>
On 9/1/2026 4:36 PM, Matthew Rosato wrote:
> On 8/26/26 10:57 AM, Joshua Daley wrote:
>> Split test_s390x_secure_ipl() into two subtests. Each tests with a
>> different boot device: virtio-blk-ccw or virtio-blk-pci. Use class-level
>> variables and a temporary shared workdir such that the time-consuming
>> setup is not run multiple times.
>>
>> Signed-off-by: Joshua Daley <jdaley@linux.ibm.com>
>
> Thanks, I verified that the setup is not run twice (and indeed, you can
> tell that while the first test takes quite a while, the second test
> finishes much faster)
>
> One other thought below...
>
> [...]
>
>> @@ -109,39 +125,42 @@ def setup_s390x_secure_ipl(self):
>> temp_vm.set_machine('s390-ccw-virtio')
>>
>> asset_path = self.ASSET_F40_QCOW2.fetch()
>> - self.qcow2_path = self.scratch_file('f40.qcow2')
>> + qcow2_path = os.path.join(S390xSecureIpl._shared_workdir, 'f40.qcow2')
>> qemu_img = get_qemu_img(self)
>> check_call([qemu_img, 'create', '-f', 'qcow2', '-b', asset_path,
>> - '-F', 'qcow2', self.qcow2_path], stdout=DEVNULL, stderr=DEVNULL)
>> + '-F', 'qcow2', qcow2_path], stdout=DEVNULL, stderr=DEVNULL)
>> + S390xSecureIpl._qcow2_path = qcow2_path
>>
>> temp_vm.set_console()
>> temp_vm.add_args('-nographic',
>> '-accel', 'kvm',
>> '-m', '1024',
>> '-drive',
>> - f'id=drive0,if=none,format=qcow2,file={self.qcow2_path}',
>> + f'id=drive0,if=none,format=qcow2,file={qcow2_path}',
>> '-device', 'virtio-blk-ccw,drive=drive0,bootindex=1')
>> temp_vm.launch()
>>
>> self._require_host_secure_ipl_support(temp_vm)
>
> If we find this fails the first time, then we are going to fail setup
> and therefore the 2nd test will also enter here, create the qcow2 again,
> and then fail again for the same reason.
> Couldn't we also save the time spent creating the qcow2 and launching a
> VM the second time if we know it didn't work the first time? It's
> checking the same host facilities.
>
> Basically I'm wondering if we should just create another flag in
> S390xSecureIpl that defaults to false and gets set to true in
> _require_host_secure_ipl_support() if the support is missing. And check
> that flag in each test before checking _setup_done and skip right away
> if it's true (with the same message as the one in
> _require_host_secure_ipl_support().
>
>
I think that's a good idea. I'll add it. Thanks for reviewing.
prev parent reply other threads:[~2026-09-02 14:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-26 14:57 [PATCH v2 0/3] Extend secure IPL support to virtio-blk-pci boot devices Joshua Daley
2026-08-26 14:57 ` [PATCH v2 1/3] hw/s390x/ipl: Add secure boot support to PCI dev IPLB builder Joshua Daley
2026-08-26 14:57 ` [PATCH v2 2/3] tests/functional/s390x/test_secure_ipl: Skip test if SIPL not supported by hypervisor Joshua Daley
2026-08-26 14:57 ` [PATCH v2 3/3] tests/functional/s390x/test_secure_ipl: Add virtio-blk-pci boot dev case Joshua Daley
2026-09-01 20:36 ` Matthew Rosato
2026-09-02 14:27 ` Joshua Daley [this message]
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=0eb91d88-dcf6-45a2-b18b-ca79b09e3748@linux.ibm.com \
--to=jdaley@linux.ibm.com \
--cc=borntraeger@linux.ibm.com \
--cc=cohuck@redhat.com \
--cc=david@kernel.org \
--cc=farman@linux.ibm.com \
--cc=iii@linux.ibm.com \
--cc=jjherne@linux.ibm.com \
--cc=jrossi@linux.ibm.com \
--cc=mjrosato@linux.ibm.com \
--cc=pasic@linux.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=zycai@linux.ibm.com \
/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.