Re: [PATCH] KVM test: virtio_console test v2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I set up autotest and could run the test that's committed, seems to work
well so far :-)

Just one note for the console case.  I haven't explored the tests in
detail yet, but this is what suddenly stood out:

On (Wed) Sep 01 2010 [23:58:56], Lucas Meneghel Rodrigues wrote:
> +def get_port_status():
> +    """
> +    Get info about ports from kernel debugfs.
> +
> +    @return: ports dictionary of port properties
> +    """
> +    ports = {}
> +
> +    not_present_msg = "FAIL: There's no virtio-ports dir in debugfs"
> +    if not os.path.ismount(DEBUGPATH):
> +        os.system('mount -t debugfs none %s' % DEBUGPATH)
> +    try:
> +        if not os.path.isdir('%s/virtio-ports' % DEBUGPATH):
> +            print not_present_msg
> +    except:
> +        print not_present_msg
> +    else:
> +        viop_names = os.listdir('%s/virtio-ports' % DEBUGPATH)
> +        for name in viop_names:
> +            f = open("%s/virtio-ports/%s" % (DEBUGPATH, name), 'r')
> +            port = {}
> +            for line in iter(f):
> +                m = re.match("(\S+): (\S+)",line)
> +                port[m.group(1)] = m.group(2)
> +
> +            if (port['is_console'] == "yes"):
> +                port["path"] = "/dev/hvc%s" % port["console_vtermno"]
> +                # Console works like a serialport

No, it doesn't :-)

The 'console' ports hook up with hvc and you can then tie a tty with the
hvc console.  So you can do something like 'agetty /dev/hvc0 9600 vt100'
and get a login shell on the host chardev.

So the interesting tests for console ports are to spawn two of them,
and in two threads which run at the same time, do 'find /' in one and
'while true; do dmesg; done' in the other so that both threads are doing
something.  The 'find /' test had found an smp bug earlier and doing
this in two different threads will help in finding any other locking
issues in virtio_console or hvc or tty code.

		Amit
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux