qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: qemu-devel@nongnu.org, peter.maydell@linaro.org
Cc: "Akihiko Odaki" <akihiko.odaki@daynix.com>,
	"Cédric Le Goater" <clg@redhat.com>,
	"Jason Wang" <jasowang@redhat.com>
Subject: [PULL V2 42/44] tests/avocado: Add igb test
Date: Fri, 10 Mar 2023 17:35:24 +0800	[thread overview]
Message-ID: <20230310093526.30828-43-jasowang@redhat.com> (raw)
In-Reply-To: <20230310093526.30828-1-jasowang@redhat.com>

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 501dbb2..4a6c22b 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2253,6 +2253,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



  parent reply	other threads:[~2023-03-10  9:40 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-10  9:34 [PULL V2 00/44] Net patches Jason Wang
2023-03-10  9:34 ` [PULL V2 01/44] e1000e: Fix the code style Jason Wang
2023-03-10  9:34 ` [PULL V2 02/44] hw/net: Add more MII definitions Jason Wang
2023-03-10  9:34 ` [PULL V2 03/44] fsl_etsec: Use hw/net/mii.h Jason Wang
2023-03-10  9:34 ` [PULL V2 04/44] e1000: " Jason Wang
2023-03-10  9:34 ` [PULL V2 05/44] e1000: Mask registers when writing Jason Wang
2023-03-10  9:34 ` [PULL V2 06/44] e1000e: Introduce E1000E_LOW_BITS_SET_FUNC Jason Wang
2023-03-10  9:34 ` [PULL V2 07/44] e1000e: Mask registers when writing Jason Wang
2023-03-10  9:34 ` [PULL V2 08/44] e1000: Use more constant definitions Jason Wang
2023-03-10  9:34 ` [PULL V2 09/44] e1000e: " Jason Wang
2023-03-10  9:34 ` [PULL V2 10/44] e1000: Use memcpy to intialize registers Jason Wang
2023-03-10  9:34 ` [PULL V2 11/44] e1000e: " Jason Wang
2023-03-10  9:34 ` [PULL V2 12/44] e1000e: Remove pending interrupt flags Jason Wang
2023-03-10  9:34 ` [PULL V2 13/44] e1000e: Improve software reset Jason Wang
2023-03-10  9:34 ` [PULL V2 14/44] e1000: Configure ResettableClass Jason Wang
2023-03-10  9:34 ` [PULL V2 15/44] e1000e: " Jason Wang
2023-03-10  9:34 ` [PULL V2 16/44] e1000e: Introduce e1000_rx_desc_union Jason Wang
2023-03-10  9:34 ` [PULL V2 17/44] e1000e: Set MII_ANER_NWAY Jason Wang
2023-03-10  9:35 ` [PULL V2 18/44] e1000e: Remove extra pointer indirection Jason Wang
2023-03-10  9:35 ` [PULL V2 19/44] net: Check L4 header size Jason Wang
2023-03-10  9:35 ` [PULL V2 20/44] e1000x: Alter the signature of e1000x_is_vlan_packet Jason Wang
2023-03-10  9:35 ` [PULL V2 21/44] net: Strip virtio-net header when dumping Jason Wang
2023-03-10  9:35 ` [PULL V2 22/44] hw/net/net_tx_pkt: Automatically determine if virtio-net header is used Jason Wang
2023-03-10  9:35 ` [PULL V2 23/44] hw/net/net_rx_pkt: Remove net_rx_pkt_has_virt_hdr Jason Wang
2023-03-10  9:35 ` [PULL V2 24/44] e1000e: Perform software segmentation for loopback Jason Wang
2023-03-10  9:35 ` [PULL V2 25/44] hw/net/net_tx_pkt: Implement TCP segmentation Jason Wang
2023-03-10  9:35 ` [PULL V2 26/44] hw/net/net_tx_pkt: Check the payload length Jason Wang
2023-03-10  9:35 ` [PULL V2 27/44] e1000e: Do not assert when MSI-X is disabled later Jason Wang
2023-03-10  9:35 ` [PULL V2 28/44] MAINTAINERS: Add Akihiko Odaki as a e1000e reviewer Jason Wang
2023-03-10  9:35 ` [PULL V2 29/44] MAINTAINERS: Add e1000e test files Jason Wang
2023-03-10  9:35 ` [PULL V2 30/44] e1000e: Combine rx traces Jason Wang
2023-03-10  9:35 ` [PULL V2 31/44] e1000: Count CRC in Tx statistics Jason Wang
2023-03-10  9:35 ` [PULL V2 32/44] e1000e: " Jason Wang
2023-03-10  9:35 ` [PULL V2 33/44] net/eth: Report if headers are actually present Jason Wang
2023-03-10  9:35 ` [PULL V2 34/44] e1000e: Implement system clock Jason Wang
2023-03-10  9:35 ` [PULL V2 35/44] net/eth: Introduce EthL4HdrProto Jason Wang
2023-03-10  9:35 ` [PULL V2 36/44] pcie: Introduce pcie_sriov_num_vfs Jason Wang
2023-03-10  9:35 ` [PULL V2 37/44] e1000: Split header files Jason Wang
2023-03-10  9:35 ` [PULL V2 38/44] Intrdocue igb device emulation Jason Wang
2023-03-10  9:35 ` [PULL V2 39/44] tests/qtest/e1000e-test: Fabricate ethernet header Jason Wang
2023-03-10  9:35 ` [PULL V2 40/44] tests/qtest/libqos/e1000e: Export macreg functions Jason Wang
2023-03-10  9:35 ` [PULL V2 41/44] igb: Introduce qtest for igb device Jason Wang
2023-03-10  9:35 ` Jason Wang [this message]
2023-03-10  9:35 ` [PULL V2 43/44] docs/system/devices/igb: Add igb documentation Jason Wang
2023-03-10  9:35 ` [PULL V2 44/44] ebpf: fix compatibility with libbpf 1.0+ Jason Wang
2023-03-12 10:56 ` [PULL V2 00/44] Net patches 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=20230310093526.30828-43-jasowang@redhat.com \
    --to=jasowang@redhat.com \
    --cc=akihiko.odaki@daynix.com \
    --cc=clg@redhat.com \
    --cc=peter.maydell@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).