aboutsummaryrefslogtreecommitdiff
path: root/tests/avocado/boot_linux_console.py
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2024-12-06 11:23:52 +0100
committerThomas Huth <thuth@redhat.com>2024-12-11 09:18:39 +0100
commitbade2d51fb3a0ad73ffa0d369bdf56ced698074d (patch)
tree59b62672978b1eeaa4f778c1762417742f84d639 /tests/avocado/boot_linux_console.py
parent490d25e6c52b0c32f78b5176d64cf20a53fde51a (diff)
downloadqemu-bade2d51fb3a0ad73ffa0d369bdf56ced698074d.zip
qemu-bade2d51fb3a0ad73ffa0d369bdf56ced698074d.tar.gz
qemu-bade2d51fb3a0ad73ffa0d369bdf56ced698074d.tar.bz2
tests/functional: Convert the emcraft_sf2 avocado test
A pretty straight-forward conversion of the emcraft_sf2 boot test to the functional framework. This was the last test that used file_truncate() in boot_linux_console.py, so we can remove that function from that file now, too. Message-ID: <20241206102358.1186644-3-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'tests/avocado/boot_linux_console.py')
-rw-r--r--tests/avocado/boot_linux_console.py44
1 files changed, 0 insertions, 44 deletions
diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux_console.py
index 44ee50c..5d5795e 100644
--- a/tests/avocado/boot_linux_console.py
+++ b/tests/avocado/boot_linux_console.py
@@ -30,11 +30,6 @@ Round up to next power of 2
def pow2ceil(x):
return 1 if x == 0 else 2**(x - 1).bit_length()
-def file_truncate(path, size):
- if size != os.path.getsize(path):
- with open(path, 'ab+') as fd:
- fd.truncate(size)
-
"""
Expand file size to next power of 2
"""
@@ -137,45 +132,6 @@ class BootLinuxConsole(LinuxKernelTest):
console_pattern = 'Kernel command line: %s' % kernel_command_line
self.wait_for_console_pattern(console_pattern)
- def test_arm_emcraft_sf2(self):
- """
- :avocado: tags=arch:arm
- :avocado: tags=machine:emcraft-sf2
- :avocado: tags=endian:little
- :avocado: tags=u-boot
- :avocado: tags=accel:tcg
- """
- self.require_netdev('user')
-
- uboot_url = ('https://raw.githubusercontent.com/'
- 'Subbaraya-Sundeep/qemu-test-binaries/'
- 'fe371d32e50ca682391e1e70ab98c2942aeffb01/u-boot')
- uboot_hash = 'cbb8cbab970f594bf6523b9855be209c08374ae2'
- uboot_path = self.fetch_asset(uboot_url, asset_hash=uboot_hash)
- spi_url = ('https://raw.githubusercontent.com/'
- 'Subbaraya-Sundeep/qemu-test-binaries/'
- 'fe371d32e50ca682391e1e70ab98c2942aeffb01/spi.bin')
- spi_hash = '65523a1835949b6f4553be96dec1b6a38fb05501'
- spi_path = self.fetch_asset(spi_url, asset_hash=spi_hash)
- spi_path_rw = os.path.join(self.workdir, os.path.basename(spi_path))
- shutil.copy(spi_path, spi_path_rw)
-
- file_truncate(spi_path_rw, 16 << 20) # Spansion S25FL128SDPBHICO is 16 MiB
-
- self.vm.set_console()
- kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE
- self.vm.add_args('-kernel', uboot_path,
- '-append', kernel_command_line,
- '-drive', 'file=' + spi_path_rw + ',if=mtd,format=raw',
- '-no-reboot')
- self.vm.launch()
- self.wait_for_console_pattern('Enter \'help\' for a list')
-
- exec_command_and_wait_for_pattern(self, 'ifconfig eth0 10.0.2.15',
- 'eth0: link becomes ready')
- exec_command_and_wait_for_pattern(self, 'ping -c 3 10.0.2.2',
- '3 packets transmitted, 3 packets received, 0% packet loss')
-
def test_arm_exynos4210_initrd(self):
"""
:avocado: tags=arch:arm