aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unbind.py
blob: 8da135de45de0264a956f23c4dc634023388c909 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#
# 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):
        """
        :avocado: tags=bochs
        """
        vga = "VGA"
        self.run_unbind_test(vga)

    def test_cirrus(self):
        """
        :avocado: tags=cirrus
        """
        vga = "cirrus-vga"
        self.run_unbind_test(vga)

    def test_qxl_vga(self):
        """
        :avocado: tags=qxl
        """
        vga = "qxl-vga"
        self.run_unbind_test(vga)

    def test_virtio_vga(self):
        """
        :avocado: tags=virtio
        """
        vga = "virtio-vga"
        self.run_unbind_test(vga)