public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Amit Shah <amit.shah@redhat.com>
To: Lucas Meneghel Rodrigues <lmr@redhat.com>
Cc: autotest@test.kernel.org, kvm@vger.kernel.org,
	"Lukáš Doktor" <ldoktor@redhat.com>,
	"Jiri Zupka" <jzupka@redhat.com>
Subject: Re: [PATCH] KVM test: virtio_console test v2
Date: Thu, 9 Sep 2010 17:43:38 +0530	[thread overview]
Message-ID: <20100909121338.GL9793@amit-laptop.redhat.com> (raw)
In-Reply-To: <1283396336-3970-1-git-send-email-lmr@redhat.com>

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

      parent reply	other threads:[~2010-09-09 12:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-02  2:58 [PATCH] KVM test: virtio_console test v2 Lucas Meneghel Rodrigues
2010-09-02  8:16 ` Lukáš Doktor
2010-09-07 19:48   ` Lucas Meneghel Rodrigues
2010-09-09 12:13 ` Amit Shah [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100909121338.GL9793@amit-laptop.redhat.com \
    --to=amit.shah@redhat.com \
    --cc=autotest@test.kernel.org \
    --cc=jzupka@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=ldoktor@redhat.com \
    --cc=lmr@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox