From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH 0/5] Testing libvirt XML -> libxl_domain_config conversion Date: Mon, 2 Jun 2014 13:57:55 +0100 Message-ID: <1401713875.19553.9.camel@kazak.uk.xensource.com> References: <1401470645-19869-1-git-send-email-berrange@redhat.com> <1401712918.18029.19.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1401712918.18029.19.camel@kazak.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: "Daniel P. Berrange" Cc: libvir-list@redhat.com, Jim Fehlig , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org create ! title it libxl_ctx_alloc should have dummy mode which does not require a Xen host severity it wishlist thanks (just creating a bug for this issue) On Mon, 2014-06-02 at 13:41 +0100, Ian Campbell wrote: > On Fri, 2014-05-30 at 18:24 +0100, Daniel P. Berrange wrote: > > I hit a couple of small issues with libxl, which I worked around, when > > writing this test which I why I'm copying xen-devel > > > > - libxl_ctx_alloc() will call xs_daemon_open and xc_interface_open, > > and stat /var/run/xenstored.pid to see if Xen is actually running. > > This fails when run on non-Xen hosts (and also possibly if run > > unprivileged). > > > > I used an evil LD_PRELOAD hack to stub out xs_daemon_open and > > xc_interface_open to return (void*)0x1, and also turn > > xc_interface_close and xs_daemon_close to no-ops, and make > > stat() always return success for xenstored.pid. > > > > This works (evidenced by the fact that if something was needing > > these xs/xc handles they would have crashed referencing 0x1), > > but at the same time it might be an idea to have an officially > > supported "non live" mode for libxl_ctx_alloc() turned on by a > > flag of some sort. > > Yes, we absolutely should have this.