- 27 3月, 2017 40 次提交
-
-
由 Eric Blake 提交于
We keep forgetting that older setups don't like 'index': CC util/libvirt_util_la-virsysinfo.lo cc1: warnings being treated as errors util/virstoragefile.c: In function 'virStorageSourceFindByNodeName': util/virstoragefile.c:3804: error: declaration of 'index' shadows a global declaration [-Wshadow] /usr/include/string.h:489: error: shadowed declaration is here [-Wshadow] Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Martin Kletzander 提交于
Instead of generating all of the capabilities, let's test more of our code by probing sysfs data. This test needs quite some mocking for now, but it paves the road for more future enhancements (hugepages probing, for example). Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
All mocked functions are related to numactl/virNuma and rely only on virsysfs, so the paths they touch can be nicely controlled. And because it is so nicely self-contained NUMA mock, it is named numamock (instead of naming it after the test that will use it first). We need top level API mock because some APIs might call libnuma directly, e.g. virNumaIsAvailable(), virNumaGetMaxNode(). Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Bit more test data, this time with complete info copied, mainly with cache information, so we can easily add tests for it. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
We'll stop generating the data on the fly, but rather test more of our APIs. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
This way more drivers can utilize the functionality without copying the code. And we can therefore test it in one place for all of them. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
That file has only two exported files and each one of them has different naming. virNode is what all the other files use, so let's use it. It wasn't used before because the clash with public API naming, so let's fix that by shortening the name (there is no other private variant of it anyway). Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
There is no "node driver" as there was before, drivers have to do their own ACL checking anyway, so they all specify their functions and nodeinfo is basically just extending conf/capablities. Hence moving the code to src/conf/ is the right way to go. Also that way we can de-duplicate some code that is in virsysfs and/or virhostcpu that got duplicated during the virhostcpu.c split. And Some cleanup is done throughout the changes, like adding the vir* prefix etc. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
There is no reason for it not to be in the utils, all global symbols under that file already have prefix vir* and there is no reason for it to be part of DRIVER_SOURCES because that is just a leftover from older days (pre-driver modules era, I believe). Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
While on that, drop support for kernels from RHEL-5 era (missing cpu/present file). Also add some useful functions and export them. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
By using this we are able to easily switch the sysfs path being used (fake it). This will not only help tests in the future but can be also used from files where the code is duplicated currently. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
The functionality these tests partially relied on (scanning the cpu directory for cpu[0-9]+ subdirectories) is going to be removed, so we need additional files that are present on all non-medieval systems. Removing all these tests would be an option but we would lose the ability to test the topologies. Even though we just extract number of sockets/cores/threads from all these directory trees. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
These helpers are doing just a read and covert the value, but they properly size the read limit, handle additional whitespace characters, and unify error reporting. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
We are not using them at all and the directories are missing bunch of files already. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
There is particular function for this, there is no need to build whole nodeinfo for it. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Commits eaf18f4c and 86dd9fac separated util/host{cpu,mem} stuff from nodeinfo, but did not adjust the syms file. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
It is everywhere else. I even remember one of our scripts failing if the newline is missing, but it doesn't happen currently. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Don't leak guest if adding it to virCapabilities fails. Also return NULL and not pointer to free'd object with zero references in such case. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Guests are handled in callers, but if something goes wrong (when it cannot be added to virCapabilities, for example), there's no way for them to free it properly. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Both QEMU and bhyve are using the same function for setting up the CPU in virCapabilities, so de-duplicate it, save code and time, and help other drivers adopt it. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
STREQ_NULLABLE returns true if both parameters are NULL. And that's not what we want here. We just want to skop comparing source nodes that don't have that info set. The function wouldn't make much sense with nodeName == NULL, so we don't need to check that. Moreover, the function's declaration uses ATTRIBUDE_NONNULL for nodeName, which not only means that function expects the parameter not to be NULL, but actually tells the compiler that it can optimize out the NULL checks. That way it could end up calling strcmp on NULL (either nodeformat or nodebacking). GCC figures this out if libvirt is compiled with lv_cv_static_analysis=yes, unfortunately not everyone uses that. Caused by cbc6d535. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Peter Krempa 提交于
Management tools may want to check whether the threshold is still set if they missed an event. Add the data to the bulk stats API where they can also query the current backing size at the same time.
-
由 Peter Krempa 提交于
To allow updating stats based on the node name, add a helper function that will fetch the required data from 'query-named-block-nodes' and return it in hash table for easy lookup.
-
由 Peter Krempa 提交于
Move the helper that frees JSON entries put into hash tables into the JSON module so that it does not have to be reimplemented.
-
由 Peter Krempa 提交于
Detect the node names when setting block threshold and when reconnecting or when they are cleared when a block job finishes. This operation will become a no-op once we fully support node names.
-
由 Peter Krempa 提交于
To allow matching the node names gathered via 'query-named-block-nodes' we need to query and then use the top level nodes from 'query-block'. Add the data to the structure returned by qemuMonitorGetBlockInfo.
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
oVirt uses relative names with directories in them. Test such configuration. Also tests a snapshot done with _REUSE_EXTERNAL and a relative backing file pre-specified in the qcow2 metadata.
-
由 Peter Krempa 提交于
Since we have to match the images by filename a common backing image will break the detection process. Add a test case to see that the code correctly did not continue the detection process.
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
The code is rather magic so a test case will help making sure that everything works well. The first case is a simple backing chain.
-
由 Peter Krempa 提交于
qemu for some time already sets node names automatically for the block nodes. This patch adds code that attempts a best-effort detection of the node names for the backing chain from the output of 'query-named-block-nodes'. The only drawback is that the data provided by qemu needs to be matched by the filename as seen by qemu and thus if two disks share a single backing store file the detection won't work. This will allow us to use qemu commands such as 'block-set-write-threshold' which only accepts node names. In this patch only the detection code is added, it will be used later.
-
由 Peter Krempa 提交于
Add monitor tooling for calling query-named-block-nodes. The monitor returns the data as the raw JSON array that is returned from the monitor. Unfortunately the logic to extract the node names for a complete backing chain will be so complex that I won't be able to extract any meaningful subset of the data in the monitor code.
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
Add code to call the appropriate monitor command and code to lookup the given disk backing chain member.
-
由 Peter Krempa 提交于
-