diff options
author | Akihiko Odaki <akihiko.odaki@daynix.com> | 2023-02-23 19:50:56 +0900 |
---|---|---|
committer | Jason Wang <jasowang@redhat.com> | 2023-03-10 17:26:47 +0800 |
commit | f9757020bf58092d684e44be34194acf227ac906 (patch) | |
tree | c98eca764b47d416beae24459eceb4e706915b00 /tests | |
parent | 45cb69bbd6cb51d856a6d845b717b513f556ba82 (diff) |
tests/avocado: Add igb test
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>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/avocado/igb.py | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/tests/avocado/igb.py b/tests/avocado/igb.py new file mode 100644 index 0000000000..abf5dfa07f --- /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') |