[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 42/51] tests/avocado: Add igb test
From: |
Jason Wang |
Subject: |
[PULL 42/51] tests/avocado: Add igb test |
Date: |
Tue, 7 Mar 2023 15:08:07 +0800 |
From: Akihiko Odaki <akihiko.odaki@daynix.com>
This automates ethtool tests for igb registers, interrupts, etc.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
MAINTAINERS | 1 +
scripts/ci/org.centos/stream/8/x86_64/test-avocado | 1 +
tests/avocado/igb.py | 38 ++++++++++++++++++++++
3 files changed, 40 insertions(+)
create mode 100644 tests/avocado/igb.py
diff --git a/MAINTAINERS b/MAINTAINERS
index e5d5d9f..77f3dd3 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2236,6 +2236,7 @@ igb
M: Akihiko Odaki <akihiko.odaki@daynix.com>
S: Maintained
F: hw/net/igb*
+F: tests/avocado/igb.py
F: tests/qtest/igb-test.c
F: tests/qtest/libqos/igb.c
diff --git a/scripts/ci/org.centos/stream/8/x86_64/test-avocado
b/scripts/ci/org.centos/stream/8/x86_64/test-avocado
index f403e4e..d2c0e5f 100755
--- a/scripts/ci/org.centos/stream/8/x86_64/test-avocado
+++ b/scripts/ci/org.centos/stream/8/x86_64/test-avocado
@@ -30,6 +30,7 @@ make get-vm-images
tests/avocado/cpu_queries.py:QueryCPUModelExpansion.test \
tests/avocado/empty_cpu_model.py:EmptyCPUModel.test \
tests/avocado/hotplug_cpu.py:HotPlugCPU.test \
+ tests/avocado/igb.py:IGB.test \
tests/avocado/info_usernet.py:InfoUsernet.test_hostfwd \
tests/avocado/intel_iommu.py:IntelIOMMU.test_intel_iommu \
tests/avocado/intel_iommu.py:IntelIOMMU.test_intel_iommu_pt \
diff --git a/tests/avocado/igb.py b/tests/avocado/igb.py
new file mode 100644
index 0000000..abf5dfa
--- /dev/null
+++ b/tests/avocado/igb.py
@@ -0,0 +1,38 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+# ethtool tests for igb registers, interrupts, etc
+
+from avocado_qemu import LinuxTest
+
+class IGB(LinuxTest):
+ """
+ :avocado: tags=accel:kvm
+ :avocado: tags=arch:x86_64
+ :avocado: tags=distro:fedora
+ :avocado: tags=distro_version:31
+ :avocado: tags=machine:q35
+ """
+
+ timeout = 180
+
+ def test(self):
+ self.require_accelerator('kvm')
+ kernel_url = self.distro.pxeboot_url + 'vmlinuz'
+ kernel_hash = '5b6f6876e1b5bda314f93893271da0d5777b1f3c'
+ kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
+ initrd_url = self.distro.pxeboot_url + 'initrd.img'
+ initrd_hash = 'dd0340a1b39bd28f88532babd4581c67649ec5b1'
+ initrd_path = self.fetch_asset(initrd_url, asset_hash=initrd_hash)
+
+ # Ideally we want to test MSI as well, but it is blocked by a bug
+ # fixed with:
+ #
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=28e96556baca7056d11d9fb3cdd0aba4483e00d8
+ kernel_params = self.distro.default_kernel_params + ' pci=nomsi'
+
+ self.vm.add_args('-kernel', kernel_path,
+ '-initrd', initrd_path,
+ '-append', kernel_params,
+ '-accel', 'kvm',
+ '-device', 'igb')
+ self.launch_and_wait()
+ self.ssh_command('dnf -y install ethtool')
+ self.ssh_command('ethtool -t eth1 offline')
--
2.7.4
- [PULL 30/51] e1000e: Combine rx traces, (continued)
- [PULL 30/51] e1000e: Combine rx traces, Jason Wang, 2023/03/07
- [PULL 31/51] e1000: Count CRC in Tx statistics, Jason Wang, 2023/03/07
- [PULL 32/51] e1000e: Count CRC in Tx statistics, Jason Wang, 2023/03/07
- [PULL 37/51] e1000: Split header files, Jason Wang, 2023/03/07
- [PULL 34/51] e1000e: Implement system clock, Jason Wang, 2023/03/07
- [PULL 33/51] net/eth: Report if headers are actually present, Jason Wang, 2023/03/07
- [PULL 36/51] pcie: Introduce pcie_sriov_num_vfs, Jason Wang, 2023/03/07
- [PULL 39/51] tests/qtest/e1000e-test: Fabricate ethernet header, Jason Wang, 2023/03/07
- [PULL 35/51] net/eth: Introduce EthL4HdrProto, Jason Wang, 2023/03/07
- [PULL 38/51] Intrdocue igb device emulation, Jason Wang, 2023/03/07
- [PULL 42/51] tests/avocado: Add igb test,
Jason Wang <=
- [PULL 45/51] hw/net/eepro100: Abort if pci_add_capability() ever fail, Jason Wang, 2023/03/07
- [PULL 44/51] ebpf: fix compatibility with libbpf 1.0+, Jason Wang, 2023/03/07
- [PULL 48/51] hw/net/eepro100: Pass E100PCIDeviceInfo as class init data, Jason Wang, 2023/03/07
- [PULL 47/51] hw/net/eepro100: Convert reset handler to DeviceReset, Jason Wang, 2023/03/07
- [PULL 43/51] docs/system/devices/igb: Add igb documentation, Jason Wang, 2023/03/07
- [PULL 40/51] tests/qtest/libqos/e1000e: Export macreg functions, Jason Wang, 2023/03/07
- [PULL 50/51] hw/net/eepro100: Remove instance's EEPRO100State::device, Jason Wang, 2023/03/07
- [PULL 49/51] hw/net/eepro100: Remove instance EEPRO100State::has_extended_tcb_support, Jason Wang, 2023/03/07
- [PULL 41/51] igb: Introduce qtest for igb device, Jason Wang, 2023/03/07
- [PULL 46/51] hw/net/eepro100: Introduce TYPE_EEPRO100 QOM abstract parent, Jason Wang, 2023/03/07