From: Wei Liu <wei.liu2@citrix.com>
To: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
Wei Liu <wei.liu2@citrix.com>,
Xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [XTF PATCH] xtf-runner: fix two synchronisation issues
Date: Fri, 29 Jul 2016 17:41:49 +0100 [thread overview]
Message-ID: <20160729164149.GK22419@citrix.com> (raw)
In-Reply-To: <22427.33218.150221.762754@mariner.uk.xensource.com>
Thanks for writing this up.
The whole email described accurately what we discussed.
On Fri, Jul 29, 2016 at 05:18:10PM +0100, Ian Jackson wrote:
> The three of us had an IRL conversation. Here is what I think we
> agreed:
>
> * We intend to make the XTF runner capable of reading
> xenconsoled-created logfiles. Both XenRT and osstest configure
> xenconsoled appropriately.
>
> The xtf runner will need to
>
> - on each test, wait for the test domain to shutdown, and then
>
> - look backwards through the xenconsoled logfile for the
> indication that the domain started (eg, a banner printed by the
> domain, or message from xenconsoled), and parse the relevant
> output there. (This is needed because starting the same-named
> domain multiple times results in concatenations of the console
> output in the xenconsoled guest output logfile.)
>
> - arrange for the guest to be preserved on crash (at least)
> so that if the domain crashed, we don't risk parsing the
> output from a previous run. Instead we can see it having
> crashed and report that as a failure.
>
> * We intend to make `xl create -c' work to find all of the output,
> by (i) starting the domain paused (ii) spawning xenconsoled
> (iii) awaiting a new startup indication from xenconsoled
> (iv) unpausing the domain. This will be done in xen-unstable.
>
> I propose the following startup protocol: xl runs
> xenconsole --startup-notify-fd=FD
> where FD is the writing end of a pipe. xl waits for xenconsole to
> write the byte 0x00 to the FD. If xenconsoled crashes, xl can tell
> by the EOF on the pipe. (This approach saves xl from having to try
> to wait for either SIGCHLD or fd readability.)
>
> (The systemd startup notification protocol is too complex to
> reimplement and would therefore introduce a dependency on
> libsystemd's sd_notify, which would be awkward. There is also the
> upstart SIGSTOP protocol but it could interact badly with an
> interactive user who uses ^Z.)
>
> The xtf runner would also be able to use `xl create -c' and simply
> expect to see all the console output.
>
> (We also discussed making xenconsole print something to its stdout
> or stderr when it has successfully connected, and when it
> disconnects. While we're editing xenconsole it would probably be
> nice to do this, but with our plans it's not needed for XTF.)
>
FTR, s/xenconsoled/xenconsole/ in this part.
I'm going to ditch this patch and look into implementing this. With this
I can ditch all the crazy gross hack in this patch.
> As a result, the xtf runner can be used with a default install of
> xen-unstable. For older versions of Xen it will be necessary to
> reconfigure xenconsoled, if the user wants to get reliable pass/fail
> reports from the xtf runner.
>
> * We discussed changing xenconsoled to not tear down the guest console
> until the guest is destroyed, rather than already tearing it down
> when the guest is shut down. This is not now needed for the above,
> but I still think it would be nice. However it is done, it should
> arrange that `xl console' doesn't hang waiting for further output
> from a crashed or shutdown domain (but perhaps should wait for
> output from a rebooting domain?). It would probably be a good idea
> to put this work item in a bucket with `overhaul the console stuff'.
>
> Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-07-29 16:41 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-29 12:07 [XTF PATCH] xtf-runner: fix two synchronisation issues Wei Liu
2016-07-29 12:43 ` Andrew Cooper
2016-07-29 12:58 ` Wei Liu
2016-07-29 13:06 ` Andrew Cooper
2016-07-29 13:12 ` Wei Liu
2016-07-29 13:23 ` Andrew Cooper
2016-07-29 13:26 ` Wei Liu
2016-07-29 14:31 ` Ian Jackson
2016-07-29 14:55 ` Wei Liu
2016-07-29 16:18 ` Ian Jackson
2016-07-29 16:35 ` Andrew Cooper
2016-07-29 16:41 ` Wei Liu [this message]
2016-07-29 15:05 ` Andrew Cooper
2016-08-01 13:16 ` [RFC PATCH 0/8] Fix console " Wei Liu
2016-08-01 13:16 ` [RFC PATCH 1/8] tools/console: fix help string in client Wei Liu
2016-08-05 15:40 ` Ian Jackson
2016-08-01 13:16 ` [RFC PATCH 2/8] tools/console: introduce --start-notify-fd option for console client Wei Liu
2016-08-05 15:43 ` Ian Jackson
2016-08-01 13:16 ` [RFC PATCH 3/8] libxl: factor out libxl__console_tty_path Wei Liu
2016-08-05 15:44 ` Ian Jackson
2016-08-01 13:16 ` [RFC PATCH 4/8] libxl: wait up to 5s in libxl_console_exec for xenconsoled Wei Liu
2016-08-05 15:48 ` Ian Jackson
2016-08-01 13:16 ` [RFC PATCH 5/8] libxl: libxl_{primary_, }console_exec now take notify_fd argument Wei Liu
2016-08-05 15:49 ` Ian Jackson
2016-08-05 15:50 ` Ian Jackson
2016-08-01 13:16 ` [RFC PATCH 6/8] docs: document xenconsole startup protocol Wei Liu
2016-08-05 15:52 ` Ian Jackson
2016-08-01 13:16 ` [RFC PATCH 7/8] xl: use " Wei Liu
2016-08-05 15:55 ` Ian Jackson
2016-08-01 13:16 ` [RFC PATCH 8/8] tools/console: remove 5s bodge in console client Wei Liu
2016-08-05 15:57 ` Ian Jackson
2016-08-05 16:16 ` Wei Liu
2016-08-05 16:18 ` Ian Jackson
2016-08-05 16:28 ` Wei Liu
2016-08-05 16:32 ` Ian Jackson
2016-08-05 16:36 ` Wei Liu
2016-08-05 17:23 ` Wei Liu
2016-08-08 10:07 ` Ian Jackson
2016-08-01 14:04 ` [XTF PATCH] xtf-runner: use xl create -Fc directly Wei Liu
2016-07-29 13:27 ` [XTF PATCH] xtf-runner: fix two synchronisation issues Andrew Cooper
2016-07-29 14:21 ` Ian Jackson
2016-07-29 14:25 ` Wei Liu
2016-07-29 14:35 ` Ian Jackson
2016-07-29 14:46 ` Wei Liu
2016-07-29 14:26 ` Andrew Cooper
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=20160729164149.GK22419@citrix.com \
--to=wei.liu2@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=xen-devel@lists.xenproject.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).