qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 5/9] tests/acceptance: Use image_expand() in test_arm_orangepi_ub


From: Philippe Mathieu-Daudé
Subject: [PATCH 5/9] tests/acceptance: Use image_expand() in test_arm_orangepi_uboot_netbsd9
Date: Wed, 23 Jun 2021 20:00:17 +0200

The NetBSD OrangePi image must be at least 2GiB, not less.
Expand the SD card image to this size before using it.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 tests/acceptance/boot_linux_console.py | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/tests/acceptance/boot_linux_console.py 
b/tests/acceptance/boot_linux_console.py
index 61069f0064f..b10f7257503 100644
--- a/tests/acceptance/boot_linux_console.py
+++ b/tests/acceptance/boot_linux_console.py
@@ -868,7 +868,12 @@ def test_arm_orangepi_uboot_netbsd9(self):
         :avocado: tags=device:sd
         :avocado: tags=os:netbsd
         """
-        # This test download a 304MB compressed image and expand it to 2GB
+        # This test download a 304MB compressed image and expand it to 2GB,
+        # which is the minimum card size required by the NetBSD installer:
+        # https://wiki.netbsd.org/ports/evbarm/raspberry_pi/#index7h2
+        # "A 2 GB card is the smallest workable size that the installation
+        # image will fit on."
+        NETBSD_SDCARD_MINSIZE = 2 * 1024 * 1024 * 1024
         deb_url = ('http://snapshot.debian.org/archive/debian/'
                    '20200108T145233Z/pool/main/u/u-boot/'
                    'u-boot-sunxi_2020.01%2Bdfsg-1_armhf.deb')
@@ -886,7 +891,7 @@ def test_arm_orangepi_uboot_netbsd9(self):
         image_path_gz = self.fetch_asset(image_url, asset_hash=image_hash)
         image_path = os.path.join(self.workdir, 'armv7.img')
         archive.gzip_uncompress(image_path_gz, image_path)
-        image_pow2ceil_expand(image_path)
+        image_expand(image_path, NETBSD_SDCARD_MINSIZE)
         image_drive_args = 'if=sd,format=raw,snapshot=on,file=' + image_path
 
         # dd if=u-boot-sunxi-with-spl.bin of=armv7.img bs=1K seek=8 
conv=notrunc
-- 
2.31.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]