aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2019-12-20 11:39:38 +0100
committerGerd Hoffmann <kraxel@redhat.com>2019-12-20 11:39:38 +0100
commit0a2122434cc5fb1d569b8581ce8d80883280a510 (patch)
treeb1344bae9d4190ac981cd193bf2bf3d380df1a56 /tests
parent0164543ad5521d32c5b59c7605f1f358bce53252 (diff)
downloaddrminfo-0a2122434cc5fb1d569b8581ce8d80883280a510.tar.gz
add unbind tests
Diffstat (limited to 'tests')
-rw-r--r--tests/unbind.py51
1 files changed, 51 insertions, 0 deletions
diff --git a/tests/unbind.py b/tests/unbind.py
new file mode 100644
index 0000000..7456b6f
--- /dev/null
+++ b/tests/unbind.py
@@ -0,0 +1,51 @@
+#
+# driver unbind tests
+#
+
+# stdlib
+import os
+import time
+from shutil import copyfile
+
+# avocado
+import avocado
+
+# my bits
+from drminfo import TestDRM
+
+class unbind(TestDRM):
+ """
+ drm module unbind test
+
+ :avocado: tags=x86_64
+ """
+
+ timeout = 60
+
+ def run_unbind_test(self, vga):
+
+ self.boot_gfx_vm(vga);
+ self.console_prepare();
+
+ self.console_run('drmtest -a -s 10 --unbind')
+ self.console_wait('---ok---', '---root---', 'unbind')
+ self.screen_dump(vga, "unbind")
+ 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_stdvga(self):
+ vga = "VGA"
+ self.run_unbind_test(vga)
+
+ def test_cirrus(self):
+ vga = "cirrus-vga"
+ self.run_unbind_test(vga)
+
+ def test_virtio_vga(self):
+ vga = "virtio-vga"
+ self.run_unbind_test(vga)