From: Marcelo Manzo <marcelomanzo@gmail.com>
To: qemu-devel@nongnu.org
Cc: qemu-arm@nongnu.org, peter.maydell@linaro.org,
philmd@oss.qualcomm.com, Marcelo Manzo <marcelomanzo@gmail.com>
Subject: [PATCH v6 17/17] tests/functional/aarch64: add raspi4b GENET networking test
Date: Tue, 27 Oct 2026 10:30:36 -0400 [thread overview]
Message-ID: <20261027143036.44973-18-marcelomanzo@gmail.com> (raw)
In-Reply-To: <20261027143036.44973-1-marcelomanzo@gmail.com>
Add test_arm_raspi4_genet, exercising the raspi4b GENET controller
end to end: boot with a -nic bcm2838-genet device attached, confirm
the guest driver probes it ("GENET 5.0 EPHY" in the kernel log),
reach a shell, and confirm the link actually comes up
("ip link show eth0" reports LOWER_UP) rather than just that the
device exists.
Verified locally against this series with the exact kernel/initrd
assets this file already pins (raspberrypi-kernel_1.20230106-1 /
groeck linux-build-test rootfs). The link only comes up because the
MDIO patch handles the PHY autonegotiation-restart request (BMCR
ANRESTART) correctly; without that the link never comes up and this
test would hang at the "ip link show eth0" step, so it also serves
as a regression test for it.
Signed-off-by: Marcelo Manzo <marcelomanzo@gmail.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
---
tests/functional/aarch64/test_raspi4.py | 31 +++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/tests/functional/aarch64/test_raspi4.py b/tests/functional/aarch64/test_raspi4.py
index bacecbbe9c..748837d818 100755
--- a/tests/functional/aarch64/test_raspi4.py
+++ b/tests/functional/aarch64/test_raspi4.py
@@ -109,5 +109,36 @@ def test_arm_raspi4_initrd(self):
#self.vm.wait()
+ def test_arm_raspi4_genet(self):
+ self.require_netdev('user')
+ kernel_path = self.archive_extract(self.ASSET_KERNEL_20190215,
+ member='boot/kernel8.img')
+ dtb_path = self.archive_extract(self.ASSET_KERNEL_20190215,
+ member='boot/bcm2711-rpi-4-b.dtb')
+ initrd_path = self.uncompress(self.ASSET_INITRD)
+
+ self.set_machine('raspi4b')
+ self.vm.set_console()
+ kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
+ 'earlycon=pl011,mmio32,0xfe201000 ' +
+ 'console=ttyAMA0,115200 ' +
+ 'panic=-1 noreboot ' +
+ 'dwc_otg.fiq_fsm_enable=0')
+ self.vm.add_args('-kernel', kernel_path,
+ '-dtb', dtb_path,
+ '-initrd', initrd_path,
+ '-append', kernel_command_line,
+ '-no-reboot',
+ '-nic', 'user,model=bcm2838-genet')
+ self.vm.launch()
+ self.wait_for_console_pattern(
+ 'bcmgenet fd580000.ethernet: GENET 5.0 EPHY')
+ self.wait_for_console_pattern('Boot successful.')
+
+ exec_command_and_wait_for_pattern(self, 'ip link show eth0',
+ 'LOWER_UP')
+ exec_command_and_wait_for_pattern(self, 'halt', 'reboot: System halted')
+
+
if __name__ == '__main__':
LinuxKernelTest.main()
--
2.55.0
next prev parent reply other threads:[~2026-10-27 14:32 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-27 14:30 [PATCH v6 00/17] hw/arm/raspi4b: working PCIe and GENET (real networking) Marcelo Manzo
2026-10-27 14:30 ` [PATCH v6 01/17] hw/arm/bcm2838_pcie: add BCM2838 PCIe Root Complex Marcelo Manzo
2026-10-27 14:30 ` [PATCH v6 02/17] hw/arm/bcm2838_pcie: add BCM2838 PCIe host Marcelo Manzo
2026-10-27 14:30 ` [PATCH v6 03/17] hw/arm/bcm2838: enable BCM2838 PCIe host bridge Marcelo Manzo
2026-10-27 14:30 ` [PATCH v6 04/17] hw/net/bcm2838_genet: add GENET stub device Marcelo Manzo
2026-10-27 14:30 ` [PATCH v6 05/17] hw/net/bcm2838_genet: add GENET register structs, part 1/4 Marcelo Manzo
2026-10-27 14:30 ` [PATCH v6 06/17] hw/net/bcm2838_genet: add GENET register structs, part 2/4 Marcelo Manzo
2026-10-27 14:30 ` [PATCH v6 07/17] hw/net/bcm2838_genet: add GENET register structs, part 3/4 Marcelo Manzo
2026-10-27 14:30 ` [PATCH v6 08/17] hw/net/bcm2838_genet: add GENET register structs, part 4/4 Marcelo Manzo
2026-10-27 14:30 ` [PATCH v6 09/17] hw/net/bcm2838_genet: add GENET register access macros Marcelo Manzo
2026-10-27 14:30 ` [PATCH v6 10/17] hw/net/bcm2838_genet: implement GENET register ops Marcelo Manzo
2026-10-27 14:30 ` [PATCH v6 11/17] hw/net/bcm2838_genet: implement GENET MDIO Marcelo Manzo
2026-10-27 14:30 ` [PATCH v6 12/17] hw/net/bcm2838_genet: implement GENET TX path Marcelo Manzo
2026-10-27 14:30 ` [PATCH v6 13/17] hw/net/bcm2838_genet: implement GENET RX path Marcelo Manzo
2026-10-27 14:30 ` [PATCH v6 14/17] hw/net/bcm2838_genet: add migration state Marcelo Manzo
2026-10-27 14:30 ` [PATCH v6 15/17] hw/arm/bcm2838: enable BCM2838 GENET controller Marcelo Manzo
2026-10-27 14:30 ` [PATCH v6 16/17] docs/system/arm/raspi: move PCIe/GENET from missing to implemented Marcelo Manzo
2026-10-27 14:30 ` Marcelo Manzo [this message]
2026-10-29 13:09 ` [PATCH v6 00/17] hw/arm/raspi4b: working PCIe and GENET (real networking) Peter Maydell
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=20261027143036.44973-18-marcelomanzo@gmail.com \
--to=marcelomanzo@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@oss.qualcomm.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 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.