Re: [PATCH 0/2] disk hotplug support for test hypervisor

2024-11-12 Thread John Levon
On Tue, Nov 12, 2024 at 09:14:22AM +0100, Michal Prívozník wrote: > On 11/1/24 23:31, John Levon wrote: > > John Levon (2): > > test_driver: provide basic disk hotplug support > > test_driver: provide basic disk hotunplug support > > > &

[PATCH 2/2] test_driver: provide basic disk hotunplug support

2024-11-01 Thread John Levon
Signed-off-by: John Levon --- src/test/test_driver.c | 114 - 1 file changed, 112 insertions(+), 2 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index b7e36e8451..789b1a 100644 --- a/src/test/test_driver.c +++ b/src/test

[PATCH 1/2] test_driver: provide basic disk hotplug support

2024-11-01 Thread John Levon
Add some basic plumbing, based on the qemu driver. Signed-off-by: John Levon --- src/test/test_driver.c | 162 - 1 file changed, 161 insertions(+), 1 deletion(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 03afe8af8d..b7e36e8451

[PATCH 0/2] disk hotplug support for test hypervisor

2024-11-01 Thread John Levon
John Levon (2): test_driver: provide basic disk hotplug support test_driver: provide basic disk hotunplug support src/test/test_driver.c | 276 - 1 file changed, 273 insertions(+), 3 deletions(-) -- 2.34.1

[PATCH 2/2] test_driver: provide basic disk hotunplug support

2024-10-03 Thread John Levon via Devel
Signed-off-by: John Levon --- src/test/test_driver.c | 114 - 1 file changed, 112 insertions(+), 2 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index b7e36e8451..789b1a 100644 --- a/src/test/test_driver.c +++ b/src/test

[PATCH 1/2] test_driver: provide basic disk hotplug support

2024-10-03 Thread John Levon via Devel
Add some basic plumbing, based on the qemu driver. Signed-off-by: John Levon --- src/test/test_driver.c | 162 - 1 file changed, 161 insertions(+), 1 deletion(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 03afe8af8d..b7e36e8451

[PATCH 0/2] add disk hotplug/unplug support to test hypervisor

2024-10-03 Thread John Levon via Devel
John Levon (2): test_driver: provide basic disk hotplug support test_driver: provide basic disk hotunplug support src/test/test_driver.c | 276 - 1 file changed, 273 insertions(+), 3 deletions(-) -- 2.34.1

Re: [PATCH 1/2] test_driver: provide basic NIC hotplug support

2024-10-02 Thread John Levon via Devel
On Wed, Oct 02, 2024 at 03:55:58PM +0200, Martin Kletzander wrote: > If you are fine with me removing the audit call, audit header include > and changing the "!ret" to "ret == 0", I'll fixup those changes and push > it as I'm fine with these patches given that modifications. Let me know. That'd

Re: [PATCH 1/2] test_driver: provide basic NIC hotplug support

2024-10-02 Thread John Levon via Devel
On Wed, Oct 02, 2024 at 01:00:33PM +0200, Martin Kletzander wrote: > > static int > > testDomainAttachHostDevice(testDriver *driver, > >virDomainObj *vm, > > @@ -10144,28 +10232,68 @@ testDomainAttachDeviceLive(virDomainObj *vm, > >testDriver

Re: [PATCH 0/2] add NIC hotplug support to test hypervisor

2024-08-14 Thread John Levon
On Thu, Aug 01, 2024 at 12:47:39PM +0100, John Levon wrote: > These two patches add basic support for NIC hot[un]plug to the test > hypervisor, > based on the qemu driver; only ethernet and bridge type VNICS are currently > supported. > > John Levon (2): > test_driv

[PATCH 2/2] test_driver: provide basic NIC hotunplug support

2024-08-01 Thread John Levon
Provide minimal support for hotunplugging ETHERNET or BRIDGE type NICs in the test driver. Signed-off-by: John Levon --- src/test/test_driver.c | 159 + 1 file changed, 146 insertions(+), 13 deletions(-) diff --git a/src/test/test_driver.c b/src/test

[PATCH 1/2] test_driver: provide basic NIC hotplug support

2024-08-01 Thread John Levon
Provide minimal support for hotplugging ETHERNET or BRIDGE type NICs in the test driver. Signed-off-by: John Levon --- src/test/test_driver.c | 146 ++--- 1 file changed, 137 insertions(+), 9 deletions(-) diff --git a/src/test/test_driver.c b/src/test

[PATCH 0/2] add NIC hotplug support to test hypervisor

2024-08-01 Thread John Levon
These two patches add basic support for NIC hot[un]plug to the test hypervisor, based on the qemu driver; only ethernet and bridge type VNICS are currently supported. John Levon (2): test_driver: provide basic NIC hotplug support test_driver: provide basic NIC hotunplug support src/test

[PATCH] meson: correct git detection

2024-07-24 Thread John Levon
The current "building from git" test uses "test -d .git"; however, that doesn't work when libvirt is used as a submodule, as in that case .git is a normal file. Use "test -e .git" instead. Signed-off-by: John Levon --- meson.build | 2 +- 1 file changed,

[PATCH] test_driver: support VIR_DOMAIN_AFFECT_LIVE in testUpdateDeviceFlags()

2024-07-04 Thread John Levon
fix this. Signed-off-by: John Levon --- src/test/test_driver.c | 54 +- 1 file changed, 37 insertions(+), 17 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 712bb20563..da682da9ad 100644 --- a/src/test/test_driver.c +++ b/

Re: [PATCH] test_driver: add testUpdateDeviceFlags implementation

2024-07-04 Thread John Levon
On Thu, Jul 04, 2024 at 08:24:30AM +0200, Michal Prívozník wrote: > The fact that domain XML is not stored on a disk doesn't necessarily > mean it can't have inactive XML. Those are two different things. I spent a bit of time playing, and the behaviour was more implemented than I thought for the

Re: [PATCH] test_driver: add testUpdateDeviceFlags implementation

2024-07-03 Thread John Levon
On Wed, Jul 03, 2024 at 09:44:47AM +0200, Michal Prívozník wrote: > >> LIVE is not supported and thus shouldn't be in list of supported flags. > > > > I was a bit unclear on the test hypervisor case - in a sense everything is > > both > > LIVE *and* CONFIG :) > > I see what you mean, but no. Th

Re: [PATCH] test_driver: add testUpdateDeviceFlags implementation

2024-07-02 Thread John Levon
On Tue, Jul 02, 2024 at 04:07:48PM +0200, Michal Prívozník wrote: > > +// TODO: support these here once tested. > > +case VIR_DOMAIN_DEVICE_GRAPHICS: > > +case VIR_DOMAIN_DEVICE_NET: > > +case VIR_DOMAIN_DEVICE_MEMORY: > > +virReportError(VIR_ERR_OPERATION_UNSUPPORTED, > >

[PATCH] test_driver: add testUpdateDeviceFlags implementation

2024-07-01 Thread John Levon
Add basic coverage of device update; for now, only support disk updates until other types are needed or tested. Signed-off-by: John Levon --- src/test/test_driver.c | 127 + 1 file changed, 127 insertions(+) diff --git a/src/test/test_driver.c b/src/test

Re: Public virErrorPreserveLast()/virErrorRestore()

2023-12-15 Thread John Levon
On Fri, Dec 15, 2023 at 11:20:10AM +, Daniel P. Berrangé wrote: > Libvirt is executing the error callback and work done in the error callback > is breaking our API guarantee. > > This broken API guarantee is not the app's fault, it is libvirt's fault for > not protecting itself against things

close callback and multiple threads

2023-12-15 Thread John Levon
On Fri, Dec 15, 2023 at 10:58:29AM +, Daniel P. Berrangé wrote: > If you use the virConnectRegisterCloseCallback() method, you should get > notified of the connection drop at precisely the right time, every time, > regardless of whether you happen to be making an API call at the time. That on

Re: Public virErrorPreserveLast()/virErrorRestore()

2023-12-15 Thread John Levon
On Fri, Dec 15, 2023 at 10:32:36AM +0100, Peter Krempa wrote: > > Although, it sounds like you know of a counter-example piece of code: is it > > something you could share? > > See above for the pointers to virsh. virsh is single threaded. regards joh n _

Re: Public virErrorPreserveLast()/virErrorRestore()

2023-12-14 Thread John Levon
On Thu, Dec 14, 2023 at 05:55:41PM +0100, Peter Krempa wrote: > If you need any form of more complex logic in your application for error > reporting (ab)using libvirt's thread local variable to store the error I'm a bit lost on the "abuse" claim here. Is this abuse in your eyes: ``` int saved_

Re: Public virErrorPreserveLast()/virErrorRestore()

2023-12-14 Thread John Levon
On Thu, Dec 14, 2023 at 12:18:27PM +0100, Peter Krempa wrote: > While I have no problems with virErrorPreserveLast() as that's just > syntax sugar on top of existing public functions, I don't think that > it's a good idea to expose virErrorRestore() as that gives the access to > previously unexpos

Public virErrorPreserveLast()/virErrorRestore()

2023-12-13 Thread John Levon
These two functions are currently private to libvirt, hence not available to consumers. Would it be possible to make them public? Without them, there's no way to do any libvirt call without stomping on an existing error that you may want to preserve. I have multiple threads sharing a remote conne

Re: [PATCH V3] support for hotplug/hotunplug in test hypervisor

2023-10-31 Thread John Levon
On Tue, Oct 31, 2023 at 10:49:31AM +0100, Michal Prívozník wrote: > > +VIR_APPEND_ELEMENT(vm->def->hostdevs, vm->def->nhostdevs, > > But anyway, I think we want more elaborate approach. The whole point of > the test driver is to mimic real guest(s) without resources needed. IOW, Michal, poin