mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 17:34:18 +03:00
qemuxml2argvmock: Drop virNuma* mocks
Since qemuxml2argvtest is now using virnumamock, there's no need for qemuxml2argvmock to offer reimplementation of virNuma*() functions. Also, the comment about CLang and FreeBSD (introduced in v4.3.0-40-g77ac204d14) is no longer true. Looks like noinline attribute was the missing culprit. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Kristina Hanicova <khanicov@redhat.com> Reviewed-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
parent
c4c90063a5
commit
95ae91fdd4
@ -32,7 +32,7 @@ int virNumaSetupMemoryPolicy(virDomainNumatuneMemMode mode,
|
||||
virBitmap *nodeset);
|
||||
|
||||
virBitmap *virNumaGetHostMemoryNodeset(void);
|
||||
bool virNumaNodesetIsAvailable(virBitmap *nodeset) G_NO_INLINE;
|
||||
bool virNumaNodesetIsAvailable(virBitmap *nodeset);
|
||||
bool virNumaIsAvailable(void) G_NO_INLINE;
|
||||
int virNumaGetMaxNode(void) G_NO_INLINE;
|
||||
bool virNumaNodeIsAvailable(int node) G_NO_INLINE;
|
||||
|
@ -1 +1 @@
|
||||
internal error: Mock: no numa node set is available at bit 999
|
||||
unsupported configuration: NUMA node 999 is unavailable
|
||||
|
@ -1 +1 @@
|
||||
internal error: Mock: no numa node set is available at bit 999
|
||||
unsupported configuration: NUMA node 999 is unavailable
|
||||
|
@ -1 +1 @@
|
||||
internal error: Mock: no numa node set is available at bit 8
|
||||
unsupported configuration: NUMA node 4 is unavailable
|
||||
|
@ -30,7 +30,6 @@
|
||||
#include "virnetdevip.h"
|
||||
#include "virnetdevtap.h"
|
||||
#include "virnetdevopenvswitch.h"
|
||||
#include "virnuma.h"
|
||||
#include "virscsivhost.h"
|
||||
#include "virtpm.h"
|
||||
#include "virutil.h"
|
||||
@ -56,47 +55,6 @@ GDateTime *g_date_time_new_now_local(void)
|
||||
return g_date_time_new_from_unix_local(1234567890);
|
||||
}
|
||||
|
||||
bool
|
||||
virNumaIsAvailable(void)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
int
|
||||
virNumaGetMaxNode(void)
|
||||
{
|
||||
return 7;
|
||||
}
|
||||
|
||||
/* We shouldn't need to mock virNumaNodeIsAvailable() and *definitely* not
|
||||
* virNumaNodesetIsAvailable(), but it seems to be the only way to get
|
||||
* mocking to work with Clang on FreeBSD, so keep these duplicates around
|
||||
* until we figure out a cleaner solution */
|
||||
bool
|
||||
virNumaNodeIsAvailable(int node)
|
||||
{
|
||||
return node >= 0 && node <= virNumaGetMaxNode();
|
||||
}
|
||||
|
||||
bool
|
||||
virNumaNodesetIsAvailable(virBitmap *nodeset)
|
||||
{
|
||||
ssize_t bit = -1;
|
||||
|
||||
if (!nodeset)
|
||||
return true;
|
||||
|
||||
while ((bit = virBitmapNextSetBit(nodeset, bit)) >= 0) {
|
||||
if (virNumaNodeIsAvailable(bit))
|
||||
continue;
|
||||
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
"Mock: no numa node set is available at bit %zd", bit);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
char *
|
||||
virTPMCreateCancelPath(const char *devpath)
|
||||
|
Loading…
Reference in New Issue
Block a user