[libvirt] [PATCHv1.5 02/27] test: Implement fake storage pool driver in qemuxml2argv test
Osier Yang
jyang at redhat.com
Thu Nov 28 08:13:53 UTC 2013
On 27/11/13 17:58, Peter Krempa wrote:
> On 11/27/13 08:47, Osier Yang wrote:
>> On 27/11/13 00:48, Peter Krempa wrote:
>>> To support testing of "volume" disk backing, we need to implement a few
>>> disk driver backend functions.
>>>
>>> The fake storage driver uses files in storagepoolxml2xmlout/POOLNAME.xml
>>> as XML files for pool definitions and volume names are in format
>>> "VOL_TYPE+VOL_PATH". By default type "block" is assumed (for iSCSI test
>>> compatibility).
>>>
>>> The choice of this approach along with implemented functions was made so
>>> that <disk type='volume'> can be tested in the xml2argv test.
>>> ---
>>> tests/qemuxml2argvtest.c | 162
>>> +++++++++++++++++++++++++++++++++++++++++++++++
>>> 1 file changed, 162 insertions(+)
>>>
>>> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
>>> index a290062..a4cef84 100644
>>> --- a/tests/qemuxml2argvtest.c
>>> +++ b/tests/qemuxml2argvtest.c
>>> @@ -18,6 +18,7 @@
>>> # include "qemu/qemu_command.h"
>>> # include "qemu/qemu_domain.h"
>>> # include "datatypes.h"
>>> +# include "conf/storage_conf.h"
>>> # include "cpu/cpu_map.h"
>>> # include "virstring.h"
>>>
>>> @@ -75,6 +76,161 @@ static virSecretDriver fakeSecretDriver = {
>>> .secretUndefine = NULL,
>>> };
>>>
>>> +
>>> +# define STORAGE_POOL_XML_PATH "storagepoolxml2xmlout/"
>> This will cause build failure when building with VPATH.
> Hmmm, I'll look into it.
>
FYI, You can use "abs_srcdir" directly to construct the path now, after
Eric's patch is pushed:
https://www.redhat.com/archives/libvir-list/2013-November/msg01265.html
Osier
More information about the libvir-list
mailing list