From: Thomas Huth <thuth@redhat.com>
To: eric.auger@redhat.com, qemu-devel@nongnu.org
Cc: qemu-arm@nongnu.org
Subject: Re: [PATCH for-10.1] tests/functional: Convert the SMMU test to the functional framework
Date: Tue, 11 Mar 2025 16:24:43 +0100 [thread overview]
Message-ID: <39ad1fef-f5cc-44f6-be4d-84a597b3f9f6@redhat.com> (raw)
In-Reply-To: <4b7d75f1-12df-44ab-9435-df517beff716@redhat.com>
On 11/03/2025 15.00, Eric Auger wrote:
> Hi Thomas,
>
>
> On 3/11/25 11:49 AM, Thomas Huth wrote:
>> This test was using cloudinit and a "dnf install" command in the guest
>> to exercise the NIC with SMMU enabled. Since we don't have the cloudinit
>> stuff in the functional framework and we should not rely on having access
>> to external networks (once our ASSETs have been cached), we rather boot
>> into the initrd first, manually mount the root disk and then use the
>> check_http_download() function from the functional framework here instead
>> for testing whether the network works as expected.
>>
>> Unfortunately, there seems to be a small race when using the files
>> from Fedora 33: To enter the initrd shell, we have to send a "return"
>> once. But it does not seem to work if we send it too early. Using a
>> sleep(0.2) makes it work reliably for me, but to make it even more
>> unlikely to trigger this situation, let's better limit the Fedora 33
>> tests to only run with KVM.
>>
>> Finally, while we're at it, we also add some lines for testing writes
>> to the hard disk, as we already do it in the test_intel_iommu test.
>
> for your info it does not apply anymore on mainline after latest appied
> functional test additions.
...
>> + ASSET_KERNEL_F31 = Asset(
>> + ('https://archives.fedoraproject.org/pub/archive/fedora/linux/'
>> + 'releases/31/Server/aarch64/os/images/pxeboot/vmlinuz'),
>> + '413c7f95e7f40cfa3e73290ffae855c88fae54cccc46123a4b4ed2db7d5c2120')
> the hash seems wrong for the vmlinuz. I get
> Exception: Hash of
> https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/31/Server/aarch64/os/images/pxeboot/vmlinuz
> does not match
> 413c7f95e7f40cfa3e73290ffae855c88fae54cccc46123a4b4ed2db7d5c2120
D'oh, I got tricked by "wget". I used wget to download the asset to manually
calculate the sha256sum, then manually copied the asset into my cache to
avoid a second download.
But wget apparently unzips the kernel:
$ wget
https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/31/Server/aarch64/os/images/pxeboot/vmlinuz
$ sha256sum vmlinuz
413c7f95e7f40cfa3e73290ffae855c88fae54cccc46123a4b4ed2db7d5c2120 vmlinuz
$ ls -l vmlinuz
-rw-r--r--. 1 thuth thuth 25885184 Oct 21 2019 vmlinuz
While curl gives the correct results:
$ curl -O
https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/31/Server/aarch64/os/images/pxeboot/vmlinuz
$ sha256sum vmlinuz
3ae07fcafbfc8e4abeb693035a74fe10698faae15e9ccd48882a9167800c1527 vmlinuz
$ ls -l vmlinuz
-rw-r--r--. 1 thuth thuth 9027813 Mar 11 16:13 vmlinuz
This should fix the issue:
diff --git a/tests/functional/test_aarch64_smmu.py
b/tests/functional/test_aarch64_smmu.py
index bba8599401c..4f0492ca50d 100755
--- a/tests/functional/test_aarch64_smmu.py
+++ b/tests/functional/test_aarch64_smmu.py
@@ -123,7 +123,7 @@ def run_and_check(self, filename, hashsum):
ASSET_KERNEL_F31 = Asset(
('https://archives.fedoraproject.org/pub/archive/fedora/linux/'
'releases/31/Server/aarch64/os/images/pxeboot/vmlinuz'),
- '413c7f95e7f40cfa3e73290ffae855c88fae54cccc46123a4b4ed2db7d5c2120')
+ '3ae07fcafbfc8e4abeb693035a74fe10698faae15e9ccd48882a9167800c1527')
ASSET_INITRD_F31 = Asset(
('https://archives.fedoraproject.org/pub/archive/fedora/linux/'
@@ -165,7 +165,7 @@ def test_smmu_noril_nostrict(self):
ASSET_KERNEL_F33 = Asset(
('https://archives.fedoraproject.org/pub/archive/fedora/linux/'
'releases/33/Server/aarch64/os/images/pxeboot/vmlinuz'),
- '0ef9e34f80b49fa2ac098899b27075e95c11d5b646f6ca4df2e89237a40f9e4f')
+ 'd8b1e6f7241f339d8e7609c456cf0461ffa4583ed07e0b55c7d1d8a0c154aa89')
ASSET_INITRD_F33 = Asset(
('https://archives.fedoraproject.org/pub/archive/fedora/linux/'
Sorry for the confusion.
Thomas
next prev parent reply other threads:[~2025-03-11 15:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-11 10:49 [PATCH for-10.1] tests/functional: Convert the SMMU test to the functional framework Thomas Huth
2025-03-11 14:00 ` Eric Auger
2025-03-11 15:24 ` Thomas Huth [this message]
2025-03-11 16:30 ` Eric Auger
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=39ad1fef-f5cc-44f6-be4d-84a597b3f9f6@redhat.com \
--to=thuth@redhat.com \
--cc=eric.auger@redhat.com \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.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 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 NNTP newsgroup(s).