mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
Move the FIPS detection from capabilities
We are not detecting the presence of FIPS from QEMU, but from procfs and
that means it's not QEMU capability. It was decided that we will pass
this flag to QEMU even if it's not supported by old QEMU binaries.
This patch also reverts changes done by commit a21cfb0f to
qemucapabilitestest and implements a new test case in qemuxml2argvtest.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1135431
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
@@ -31,7 +31,6 @@ typedef testQemuData *testQemuDataPtr;
|
||||
struct _testQemuData {
|
||||
virDomainXMLOptionPtr xmlopt;
|
||||
const char *base;
|
||||
bool fips;
|
||||
};
|
||||
|
||||
static qemuMonitorTestPtr
|
||||
@@ -143,12 +142,6 @@ testQemuCaps(const void *opaque)
|
||||
qemuMonitorTestGetMonitor(mon)) < 0)
|
||||
goto cleanup;
|
||||
|
||||
/* So that our test does not depend on the contents of /proc, we
|
||||
* hoisted the setting of ENABLE_FIPS to virQEMUCapsInitQMP. But
|
||||
* we do want to test the effect of that flag. */
|
||||
if (data->fips)
|
||||
virQEMUCapsSet(capsComputed, QEMU_CAPS_ENABLE_FIPS);
|
||||
|
||||
if (testQemuCapsCompare(capsProvided, capsComputed) < 0)
|
||||
goto cleanup;
|
||||
|
||||
@@ -183,19 +176,18 @@ mymain(void)
|
||||
|
||||
data.xmlopt = xmlopt;
|
||||
|
||||
#define DO_TEST_FULL(name, use_fips) \
|
||||
data.base = name; \
|
||||
data.fips = use_fips; \
|
||||
if (virtTestRun(name, testQemuCaps, &data) < 0) \
|
||||
ret = -1
|
||||
#define DO_TEST(name) \
|
||||
do { \
|
||||
data.base = name; \
|
||||
if (virtTestRun(name, testQemuCaps, &data) < 0) \
|
||||
ret = -1; \
|
||||
} while (0)
|
||||
|
||||
#define DO_TEST(name) DO_TEST_FULL(name, false)
|
||||
|
||||
DO_TEST_FULL("caps_1.2.2-1", true);
|
||||
DO_TEST("caps_1.2.2-1");
|
||||
DO_TEST("caps_1.3.1-1");
|
||||
DO_TEST("caps_1.4.2-1");
|
||||
DO_TEST("caps_1.5.3-1");
|
||||
DO_TEST_FULL("caps_1.6.0-1", true);
|
||||
DO_TEST("caps_1.6.0-1");
|
||||
DO_TEST("caps_1.6.50-1");
|
||||
|
||||
virObjectUnref(xmlopt);
|
||||
|
||||
Reference in New Issue
Block a user