Signed-off-by: Ján Tomko
---
tests/xlconfigtest.c | 48 ++--
tests/xmconfigtest.c | 37 +-
2 files changed, 34 insertions(+), 51 deletions(-)
diff --git a/tests/xlconfigtest.c b/tests/xlconfigtest.c
index
Signed-off-by: Ján Tomko
---
tests/vmx2xmltest.c | 19 +++
tests/xml2vmxtest.c | 15 +--
2 files changed, 12 insertions(+), 22 deletions(-)
diff --git a/tests/vmx2xmltest.c b/tests/vmx2xmltest.c
index b7f232eb77..0974168cb4 100644
--- a/tests/vmx2xmltest.c
+++
Signed-off-by: Ján Tomko
---
tests/fdstreamtest.c| 6 ++
tests/scsihosttest.c| 3 +--
tests/virfiletest.c | 6 ++
tests/virnettlshelpers.c| 4 +---
tests/virpcimock.c | 4 +---
tests/virrotatingfiletest.c | 4 +---
6 files changed, 8 insertions(+), 19
Signed-off-by: Ján Tomko
---
tests/securityselinuxlabeltest.c | 3 +--
tests/testutils.c| 5 +
tests/virhostcputest.c | 7 ++-
3 files changed, 4 insertions(+), 11 deletions(-)
diff --git a/tests/securityselinuxlabeltest.c b/tests/securityselinuxlabeltest.c
Signed-off-by: Ján Tomko
---
tests/qemumonitorjsontest.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c
index 542b35850e..b68351d9d8 100644
--- a/tests/qemumonitorjsontest.c
+++ b/tests/qemumonitorjsontest.c
@@
Signed-off-by: Ján Tomko
---
tests/libxlxml2domconfigtest.c | 15 +--
tests/xlconfigtest.c | 25 -
tests/xmconfigtest.c | 16 +---
3 files changed, 18 insertions(+), 38 deletions(-)
diff --git a/tests/libxlxml2domconfigtest.c
Signed-off-by: Ján Tomko
---
src/util/virmacmap.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/util/virmacmap.h b/src/util/virmacmap.h
index 582c4a8bdf..c0efa2b20f 100644
--- a/src/util/virmacmap.h
+++ b/src/util/virmacmap.h
@@ -21,8 +21,10 @@
#pragma once
#include "internal.h"
Signed-off-by: Ján Tomko
---
tests/vshtabletest.c | 71 +---
1 file changed, 28 insertions(+), 43 deletions(-)
diff --git a/tests/vshtabletest.c b/tests/vshtabletest.c
index 569d7a852f..716b11dbc0 100644
--- a/tests/vshtabletest.c
+++
Signed-off-by: Ján Tomko
---
tests/qemuagenttest.c| 28 ++--
tests/qemucapsprobemock.c| 3 +--
tests/qemucommandutiltest.c | 9 +++
tests/qemumonitorjsontest.c | 50 +++-
tests/qemumonitortestutils.c | 45
Signed-off-by: Ján Tomko
---
tests/nwfilterebiptablestest.c | 21 +++--
tests/nwfilterxml2firewalltest.c | 12
tests/nwfilterxml2xmltest.c | 10 +++---
3 files changed, 14 insertions(+), 29 deletions(-)
diff --git a/tests/nwfilterebiptablestest.c
Signed-off-by: Ján Tomko
---
tests/cputest.c | 42
tests/domaincapstest.c | 39 -
tests/domainconftest.c | 12 +++--
tests/fchosttest.c | 40 +++---
Signed-off-by: Ján Tomko
---
tests/nwfilterebiptablestest.c | 63 --
1 file changed, 21 insertions(+), 42 deletions(-)
diff --git a/tests/nwfilterebiptablestest.c b/tests/nwfilterebiptablestest.c
index 7b32e90d19..9307a10229 100644
---
Signed-off-by: Ján Tomko
---
tests/domainconftest.c | 3 +--
tests/libxlxml2domconfigtest.c | 3 +--
tests/lxcconf2xmltest.c | 3 +--
tests/openvzutilstest.c | 3 +--
tests/qemuagenttest.c| 3 +--
tests/securityselinuxlabeltest.c | 3 +--
Signed-off-by: Ján Tomko
---
tests/vshtabletest.c | 30 ++
1 file changed, 10 insertions(+), 20 deletions(-)
diff --git a/tests/vshtabletest.c b/tests/vshtabletest.c
index 804aaf4d9c..569d7a852f 100644
--- a/tests/vshtabletest.c
+++ b/tests/vshtabletest.c
@@ -55,7
Signed-off-by: Ján Tomko
---
tests/vmx2xmltest.c | 13 -
tests/xml2vmxtest.c | 14 --
2 files changed, 8 insertions(+), 19 deletions(-)
diff --git a/tests/vmx2xmltest.c b/tests/vmx2xmltest.c
index 33bf243717..cd44a84a07 100644
--- a/tests/vmx2xmltest.c
+++
Signed-off-by: Ján Tomko
---
tests/networkxml2conftest.c | 16 +---
tests/networkxml2firewalltest.c | 9 +++--
tests/networkxml2xmltest.c | 10 +++---
tests/networkxml2xmlupdatetest.c | 16 +---
4 files changed, 16 insertions(+), 35 deletions(-)
diff
Signed-off-by: Ján Tomko
---
tests/qemucapsprobemock.c | 6 ++---
tests/qemucommandutiltest.c | 3 +--
tests/qemumonitorjsontest.c | 48 +
tests/qemuxml2argvtest.c| 3 +--
4 files changed, 20 insertions(+), 40 deletions(-)
diff --git
Signed-off-by: Ján Tomko
---
tests/cputest.c | 9 +++--
tests/domaincapstest.c | 6 ++
tests/networkxml2conftest.c | 3 +--
tests/networkxml2xmltest.c | 3 +--
tests/vircapstest.c | 6 ++
tests/virmacmaptest.c | 6 ++
tests/virpcitest.c
Signed-off-by: Ján Tomko
---
tests/vircapstest.c | 14 +++--
tests/virconftest.c | 38 ++--
tests/vircryptotest.c | 23 +--
tests/virfiletest.c | 49 ---
tests/virhostcputest.c
Signed-off-by: Ján Tomko
---
tests/qemucapsprobemock.c | 3 +--
tests/qemucommandutiltest.c | 3 +--
tests/qemumonitorjsontest.c | 12
tests/virnetdaemontest.c| 3 +--
4 files changed, 7 insertions(+), 14 deletions(-)
diff --git a/tests/qemucapsprobemock.c
Signed-off-by: Ján Tomko
---
tests/domaincapstest.c | 15 +--
tests/domainconftest.c | 3 +--
tests/eventtest.c| 3 +--
tests/fchosttest.c | 30 ++
tests/fdstreamtest.c | 18 ++
Signed-off-by: Ján Tomko
---
tests/vircgrouptest.c | 3 +--
tests/virconftest.c | 6 ++
tests/vircryptotest.c | 12
tests/virfilecachetest.c | 3 +--
tests/virfilemock.c | 3 +--
Signed-off-by: Ján Tomko
---
src/conf/network_conf.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/conf/network_conf.h b/src/conf/network_conf.h
index 34007e1969..30958eff64 100644
--- a/src/conf/network_conf.h
+++ b/src/conf/network_conf.h
@@ -44,6 +44,7 @@ struct _virNetworkXMLOption
Signed-off-by: Ján Tomko
---
tests/virnetdaemontest.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tests/virnetdaemontest.c b/tests/virnetdaemontest.c
index ce0384f026..f764268c50 100644
--- a/tests/virnetdaemontest.c
+++ b/tests/virnetdaemontest.c
@@ -270,8 +270,10
Ján Tomko (24):
tests: virnetdaemontest: split variable declarations
conf: add cleanup func for virNetworkXMLOption
conf: add cleanup func for virMacMap
tests: use g_autoptr instead of virObjectUnref
tests: qemu: use g_autofree
tests: network: use g_autofree
tests: libxl: use
Use g_auto where possible and remove the pointless label.
Signed-off-by: Ján Tomko
---
tests/secretxml2xmltest.c | 18 ++
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/tests/secretxml2xmltest.c b/tests/secretxml2xmltest.c
index 48f48416b5..99aaa9db15 100644
---
Reduce variable scope, use g_auto and remove pointless labels.
Signed-off-by: Ján Tomko
---
tests/virnetsockettest.c | 26 +-
1 file changed, 9 insertions(+), 17 deletions(-)
diff --git a/tests/virnetsockettest.c b/tests/virnetsockettest.c
index 8059c6cbb0..1de3771ad4
Since its introduction in
commit 907a39e735d256b8428ed4c77009d1f713aea19b
Add a test suite for validating SELinux labelling
this function did not return NULL on OOM.
Since we abort on OOM now, switch testSELinuxMungePath to void,
return NULL explicitly on XML parsing failure and remove
the
Reduce variable scope to match their lifetime,
use g_auto and remove now pointless labels in favor
of direct returns.
Signed-off-by: Ján Tomko
---
tests/esxutilstest.c | 30 --
1 file changed, 8 insertions(+), 22 deletions(-)
diff --git a/tests/esxutilstest.c
Commit 345996c6208b281233074362a8d81295e2e711d4 disabled the
-Wunused-but-set-variable warning on CLang, beacuse it warned
on variables that were unread, but we relied on the side effects
of their destructors.
Reinstate the warning now that all the occurrences have been fixed.
Signed-off-by: Ján
Two users of virEventGLibAddSocketWatch care about the GSource
it returns.
The other three free it by assigning it to an autofreed variable.
Mark them with G_GNUC_UNUSED to make this obvious to the reader
and the compiler.
Signed-off-by: Ján Tomko
---
src/rpc/virnetclient.c | 6 +++---
1 file
Refer to flags by their identifier, not value.
Signed-off-by: Ján Tomko
---
tests/bhyveargv2xmltest.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tests/bhyveargv2xmltest.c b/tests/bhyveargv2xmltest.c
index 2c1ffc75f3..e86c9e3b10 100644
---
I found these lying around in a forgotten branch.
Ján Tomko (2):
tests: bhyve: remove magic constants
tests: bhyve: use bitwise shift when defining flags
tests/bhyveargv2xmltest.c | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
--
2.31.1
Personally, I feel like all the cases caught by new Clang's
-Wunused-but-set-variable
behavior were also unnecessarily difficult to read for humans, we should be
more obvious
when relying purely on side effects of g_auto and the warning is worth
keeping.
Even if not, the first two patches
And use g_auto.
Signed-off-by: Ján Tomko
---
tests/securityselinuxlabeltest.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/tests/securityselinuxlabeltest.c b/tests/securityselinuxlabeltest.c
index f7dd3c866a..3d886fd827 100644
--- a/tests/securityselinuxlabeltest.c
Also use g_auto.
Signed-off-by: Ján Tomko
---
tests/esxutilstest.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/tests/esxutilstest.c b/tests/esxutilstest.c
index d537da3011..db49dcd6e0 100644
--- a/tests/esxutilstest.c
+++ b/tests/esxutilstest.c
@@ -197,10 +197,9
Also use g_auto.
Signed-off-by: Ján Tomko
---
tests/esxutilstest.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/tests/esxutilstest.c b/tests/esxutilstest.c
index bfb35fa356..d537da3011 100644
--- a/tests/esxutilstest.c
+++ b/tests/esxutilstest.c
@@ -161,23 +161,19
Ján Tomko (6):
tests: esxutils: refactor testParseDatastorePath
tests: esxutils: reduce variable scope in testEscapeDatastoreItem
tests: esxutils: reduce variable scope in testConvertWindows1252ToUTF8
tests: reduce variable scope in testSELinuxCheckLabels
tests: refactor
In the unlikely case that we were unable to set the new
identity, we would unref the old one even though it still
could be in the thread-local storage.
Fixes: c6825d88137cb8e4debdf4310e45ee23cb5698c0
Signed-off-by: Ján Tomko
---
src/util/viridentity.c | 4 +++-
1 file changed, 3 insertions(+),
Although I'm sure we all know the powers of two by heart now,
this is the prevalent style for flag defition.
Signed-off-by: Ján Tomko
---
tests/bhyveargv2xmltest.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/bhyveargv2xmltest.c b/tests/bhyveargv2xmltest.c
Unused as of:
commit effeee5c2fcec19fcaad627690a6a0ba0025e35f
qemu: driver: Use 'qemuDomainSaveStatus' for saving status XML
This function extracts the config from the vm object, so the caller
no longer needs to do it.
Signed-off-by: Ján Tomko
---
src/qemu/qemu_driver.c | 9 -
41 matches
Mail list logo