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


Reply via email to