From: David Barrett <dbarrett@quinthar.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] Tips for adding "sendkeys"
Date: Thu, 28 Feb 2008 13:39:20 -0800 [thread overview]
Message-ID: <47C72A08.5090209@quinthar.com> (raw)
Hi there, can you give me any tips for where to get started adding a new
function "sendkeys" to the monitor that is essentially like "sendkey"
except for multiple keystrokes?
I'm using Qemu for some automated testing (in conjunction with AutoIt on
the guest XP image) and it's working great. Essentially, I've set up:
1) A stock XP guest image with all windows closed except for a big
command prompt that has keyboard focus.
2) A script on the Linux host that launches the guest with "-loadvm" and
"-monitor stdio" that uses "sendkey" to start an AutoIt script inside
the guest.
The AutoIt script does all the heavy lifting of actually running the
automated test. However, I need "sendkey" in order to download the
latest test script into the guest OS, and then to run it.
This works fine today, but I'm finding my Linux host scripts full of
long strings of:
sendkey ret
sendkey a
sendkey kp_decimal
sendkey a
sendkey u
sendkey 3
sendkey ret
I'd much rather do something like:
sendkeys wget http://10.0.2.2/script.au3\ret
sendkeys script.au3\ret
I'm guessing this is a very straightforward addition to the monitor
code. However, the Qemu source is rather imposing and I'm not sure
where to start.
Can someone give me some file and function names to start looking
around? Something along the lines of:
"Oh, that should be simple. Open up foo.c and look for function bar();
it lists all the monitor commands. Add "sendkeys" to the list, and
implement it in foo_impl.c. I recommend just calling "foo_sendkey()" as
you loop across the string. Also, be sure to increment "numcommands" in
"foo_func.h" else it'll destroy the universe."
Any tips you have would be appreciated. Thanks!
-david
next reply other threads:[~2008-02-28 21:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-28 21:39 David Barrett [this message]
2008-02-28 23:50 ` [Qemu-devel] Tips for adding "sendkeys" Alexander Graf
2008-02-29 0:19 ` David Barrett
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=47C72A08.5090209@quinthar.com \
--to=dbarrett@quinthar.com \
--cc=qemu-devel@nongnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.