diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2020-08-17 16:04:57 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2020-08-17 16:04:57 +0200 |
commit | 71cc594ef5f9b4f457c6556fc7570ee1e54c84c2 (patch) | |
tree | 5aec7de7a8090f246a9e78bb2ef57c7e5a210c65 | |
parent | 76465d1b29cefc9cacc38394087a0644f9895fa8 (diff) | |
download | drminfo-71cc594ef5f9b4f457c6556fc7570ee1e54c84c2.tar.gz |
tests: virtio-vga swiotlb
-rw-r--r-- | tests/swiotlb.py | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/tests/swiotlb.py b/tests/swiotlb.py new file mode 100644 index 0000000..c9af3fd --- /dev/null +++ b/tests/swiotlb.py @@ -0,0 +1,53 @@ +# +# swiotlb tests +# + +# stdlib +import os +import time +from shutil import copyfile + +# avocado +import avocado + +# my bits +from drminfo import TestDRM + +class swiotlb(TestDRM): + """ + swiotlb test + + :avocado: tags=x86_64 + """ + + timeout = 60 + + def run_swiotlb_test(self, vga): + + self.boot_gfx_vm(vga, iommu = True, append = "swiotlb=force"); + self.console_prepare(); + + self.console_run('drmtest -a -s 10') + self.console_wait('---ok---', '---root---', 'swiotlb') + self.screen_dump(vga, 'swiotlb', None) + self.console_wait('---root---') + + @avocado.skipUnless(os.path.exists('/usr/bin/dracut'), "no dracut") + def setUp(self): + TestDRM.setUp(self); + if not os.path.isfile(self.initrd): + self.prepare_kernel_initrd() + + def test_virtio_vga(self): + """ + :avocado: tags=virtio + """ + vga = 'virtio-vga' + self.run_swiotlb_test(vga) + + def test_virtio_gpu(self): + """ + :avocado: tags=virtio + """ + vga = 'virtio-gpu-pci' + self.run_swiotlb_test(vga) |