[libvirt] [PATCH 0/3] Perform some minor rather cosmetic adjustments to tests

When I was adding new admin related tests, I noticed that we have some test data leftovers in the repo, as well as having a test that isn't enabled, although it should be and that we still have some JSON test data using tabs for indentation...my bad, I got through the log history only to see that when I merged a patch to fix this, I failed to do it properly. Erik Skultety (3): tests: remove virnetservertest data leftovers tests: virnetdaemon: Replace tabs with spaces tests: virnetdaemontest: Enable testing for no-keepalive-required .../input-data-admin-server-names.json | 204 +++++++++---------- .../output-data-no-keepalive-required.json | 224 ++++++++++----------- tests/virnetdaemontest.c | 1 + .../input-data-initial-nomdns.json | 61 ------ .../output-data-initial-nomdns.json | 62 ------ 5 files changed, 215 insertions(+), 337 deletions(-) delete mode 100644 tests/virnetserverdata/input-data-initial-nomdns.json delete mode 100644 tests/virnetserverdata/output-data-initial-nomdns.json -- 2.4.11

Commit a4746114 renamed virnetservertest to virnetdaemontest to reflect some refactor changes to virNetServer code (which moved daemon-related parts to virNetDaemon module). Moving test data from virnetserverdata to virnetdaemondata was also part of the commit, but the commit failed to clean half of the files that were copied (rather than moved). Signed-off-by: Erik Skultety <eskultet@redhat.com> --- .../input-data-initial-nomdns.json | 61 --------------------- .../output-data-initial-nomdns.json | 62 ---------------------- 2 files changed, 123 deletions(-) delete mode 100644 tests/virnetserverdata/input-data-initial-nomdns.json delete mode 100644 tests/virnetserverdata/output-data-initial-nomdns.json diff --git a/tests/virnetserverdata/input-data-initial-nomdns.json b/tests/virnetserverdata/input-data-initial-nomdns.json deleted file mode 100644 index 02bb427..0000000 --- a/tests/virnetserverdata/input-data-initial-nomdns.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "min_workers": 10, - "max_workers": 50, - "priority_workers": 5, - "max_clients": 100, - "keepaliveInterval": 120, - "keepaliveCount": 5, - "keepaliveRequired": true, - "services": [ - { - "auth": 0, - "readonly": true, - "nrequests_client_max": 2, - "socks": [ - { - "fd": 100, - "errfd": -1, - "pid": 0, - "isClient": false - } - ] - }, - { - "auth": 2, - "readonly": false, - "nrequests_client_max": 5, - "socks": [ - { - "fd": 101, - "errfd": -1, - "pid": 0, - "isClient": false - } - ] - } - ], - "clients": [ - { - "auth": 1, - "readonly": true, - "nrequests_max": 15, - "sock": { - "fd": 102, - "errfd": -1, - "pid": -1, - "isClient": true - } - }, - { - "auth": 2, - "readonly": true, - "nrequests_max": 66, - "sock": { - "fd": 103, - "errfd": -1, - "pid": -1, - "isClient": true - } - } - ] -} diff --git a/tests/virnetserverdata/output-data-initial-nomdns.json b/tests/virnetserverdata/output-data-initial-nomdns.json deleted file mode 100644 index 8d38297..0000000 --- a/tests/virnetserverdata/output-data-initial-nomdns.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "min_workers": 10, - "max_workers": 50, - "priority_workers": 5, - "max_clients": 100, - "max_anonymous_clients": 100, - "keepaliveInterval": 120, - "keepaliveCount": 5, - "keepaliveRequired": true, - "services": [ - { - "auth": 0, - "readonly": true, - "nrequests_client_max": 2, - "socks": [ - { - "fd": 100, - "errfd": -1, - "pid": 0, - "isClient": false - } - ] - }, - { - "auth": 2, - "readonly": false, - "nrequests_client_max": 5, - "socks": [ - { - "fd": 101, - "errfd": -1, - "pid": 0, - "isClient": false - } - ] - } - ], - "clients": [ - { - "auth": 1, - "readonly": true, - "nrequests_max": 15, - "sock": { - "fd": 102, - "errfd": -1, - "pid": -1, - "isClient": true - } - }, - { - "auth": 2, - "readonly": true, - "nrequests_max": 66, - "sock": { - "fd": 103, - "errfd": -1, - "pid": -1, - "isClient": true - } - } - ] -} -- 2.4.11

We already did this once, but somehow commit 252610f7 managed to bring the tabs back again. Signed-off-by: Erik Skultety <eskultet@redhat.com> --- .../input-data-admin-server-names.json | 204 +++++++++---------- .../output-data-no-keepalive-required.json | 224 ++++++++++----------- 2 files changed, 214 insertions(+), 214 deletions(-) diff --git a/tests/virnetdaemondata/input-data-admin-server-names.json b/tests/virnetdaemondata/input-data-admin-server-names.json index 94fba61..3afe16f 100644 --- a/tests/virnetdaemondata/input-data-admin-server-names.json +++ b/tests/virnetdaemondata/input-data-admin-server-names.json @@ -1,8 +1,8 @@ { "servers": { - "testServer0": - { + "testServer0": + { "min_workers": 10, "max_workers": 50, "priority_workers": 5, @@ -11,60 +11,60 @@ "keepaliveCount": 5, "keepaliveRequired": true, "services": [ - { - "auth": 0, - "readonly": true, - "nrequests_client_max": 2, - "socks": [ - { - "fd": 100, - "errfd": -1, - "pid": 0, - "isClient": false - } - ] - }, - { - "auth": 2, - "readonly": false, - "nrequests_client_max": 5, - "socks": [ - { - "fd": 101, - "errfd": -1, - "pid": 0, - "isClient": false - } - ] - } + { + "auth": 0, + "readonly": true, + "nrequests_client_max": 2, + "socks": [ + { + "fd": 100, + "errfd": -1, + "pid": 0, + "isClient": false + } + ] + }, + { + "auth": 2, + "readonly": false, + "nrequests_client_max": 5, + "socks": [ + { + "fd": 101, + "errfd": -1, + "pid": 0, + "isClient": false + } + ] + } ], "clients": [ - { - "auth": 1, - "readonly": true, - "nrequests_max": 15, - "sock": { - "fd": 102, - "errfd": -1, - "pid": -1, - "isClient": true - } - }, - { - "auth": 2, - "readonly": true, - "nrequests_max": 66, - "sock": { - "fd": 103, - "errfd": -1, - "pid": -1, - "isClient": true - } - } + { + "auth": 1, + "readonly": true, + "nrequests_max": 15, + "sock": { + "fd": 102, + "errfd": -1, + "pid": -1, + "isClient": true + } + }, + { + "auth": 2, + "readonly": true, + "nrequests_max": 66, + "sock": { + "fd": 103, + "errfd": -1, + "pid": -1, + "isClient": true + } + } ] - }, - "testServer1": - { + }, + "testServer1": + { "min_workers": 2, "max_workers": 50, "priority_workers": 5, @@ -73,57 +73,57 @@ "keepaliveCount": 5, "keepaliveRequired": true, "services": [ - { - "auth": 0, - "readonly": true, - "nrequests_client_max": 2, - "socks": [ - { - "fd": 100, - "errfd": -1, - "pid": 0, - "isClient": false - } - ] - }, - { - "auth": 2, - "readonly": false, - "nrequests_client_max": 5, - "socks": [ - { - "fd": 101, - "errfd": -1, - "pid": 0, - "isClient": false - } - ] - } + { + "auth": 0, + "readonly": true, + "nrequests_client_max": 2, + "socks": [ + { + "fd": 100, + "errfd": -1, + "pid": 0, + "isClient": false + } + ] + }, + { + "auth": 2, + "readonly": false, + "nrequests_client_max": 5, + "socks": [ + { + "fd": 101, + "errfd": -1, + "pid": 0, + "isClient": false + } + ] + } ], "clients": [ - { - "auth": 1, - "readonly": true, - "nrequests_max": 15, - "sock": { - "fd": 102, - "errfd": -1, - "pid": -1, - "isClient": true - } - }, - { - "auth": 2, - "readonly": true, - "nrequests_max": 66, - "sock": { - "fd": 103, - "errfd": -1, - "pid": -1, - "isClient": true - } - } + { + "auth": 1, + "readonly": true, + "nrequests_max": 15, + "sock": { + "fd": 102, + "errfd": -1, + "pid": -1, + "isClient": true + } + }, + { + "auth": 2, + "readonly": true, + "nrequests_max": 66, + "sock": { + "fd": 103, + "errfd": -1, + "pid": -1, + "isClient": true + } + } ] - } + } } } diff --git a/tests/virnetdaemondata/output-data-no-keepalive-required.json b/tests/virnetdaemondata/output-data-no-keepalive-required.json index a8ba828..4c28a4c 100644 --- a/tests/virnetdaemondata/output-data-no-keepalive-required.json +++ b/tests/virnetdaemondata/output-data-no-keepalive-required.json @@ -1,6 +1,6 @@ { "servers": { - "testServer0": { + "testServer0": { "min_workers": 10, "max_workers": 50, "priority_workers": 5, @@ -8,119 +8,119 @@ "keepaliveInterval": 120, "keepaliveCount": 5, "services": [ - { - "auth": 0, - "readonly": true, - "nrequests_client_max": 2, - "socks": [ - { - "fd": 100, - "errfd": -1, - "pid": 0, - "isClient": false - } - ] - }, - { - "auth": 2, - "readonly": false, - "nrequests_client_max": 5, - "socks": [ - { - "fd": 101, - "errfd": -1, - "pid": 0, - "isClient": false - } - ] - } + { + "auth": 0, + "readonly": true, + "nrequests_client_max": 2, + "socks": [ + { + "fd": 100, + "errfd": -1, + "pid": 0, + "isClient": false + } + ] + }, + { + "auth": 2, + "readonly": false, + "nrequests_client_max": 5, + "socks": [ + { + "fd": 101, + "errfd": -1, + "pid": 0, + "isClient": false + } + ] + } ], "clients": [ - { - "auth": 1, - "readonly": true, - "nrequests_max": 15, - "sock": { - "fd": 102, - "errfd": -1, - "pid": -1, - "isClient": true - } - }, - { - "auth": 2, - "readonly": true, - "nrequests_max": 66, - "sock": { - "fd": 103, - "errfd": -1, - "pid": -1, - "isClient": true - } - } + { + "auth": 1, + "readonly": true, + "nrequests_max": 15, + "sock": { + "fd": 102, + "errfd": -1, + "pid": -1, + "isClient": true + } + }, + { + "auth": 2, + "readonly": true, + "nrequests_max": 66, + "sock": { + "fd": 103, + "errfd": -1, + "pid": -1, + "isClient": true + } + } + ] + }, + "testServer1": { + { + "min_workers": 2, + "max_workers": 50, + "priority_workers": 5, + "max_clients": 100, + "keepaliveInterval": 120, + "keepaliveCount": 5, + "services": [ + { + "auth": 0, + "readonly": true, + "nrequests_client_max": 2, + "socks": [ + { + "fd": 100, + "errfd": -1, + "pid": 0, + "isClient": false + } ] - }, - "testServer1": { - { - "min_workers": 2, - "max_workers": 50, - "priority_workers": 5, - "max_clients": 100, - "keepaliveInterval": 120, - "keepaliveCount": 5, - "services": [ - { - "auth": 0, - "readonly": true, - "nrequests_client_max": 2, - "socks": [ - { - "fd": 100, - "errfd": -1, - "pid": 0, - "isClient": false - } - ] - }, - { - "auth": 2, - "readonly": false, - "nrequests_client_max": 5, - "socks": [ - { - "fd": 101, - "errfd": -1, - "pid": 0, - "isClient": false - } - ] - } - ], - "clients": [ - { - "auth": 1, - "readonly": true, - "nrequests_max": 15, - "sock": { - "fd": 102, - "errfd": -1, - "pid": -1, - "isClient": true - } - }, - { - "auth": 2, - "readonly": true, - "nrequests_max": 66, - "sock": { - "fd": 103, - "errfd": -1, - "pid": -1, - "isClient": true - } - } - ] - } - } + }, + { + "auth": 2, + "readonly": false, + "nrequests_client_max": 5, + "socks": [ + { + "fd": 101, + "errfd": -1, + "pid": 0, + "isClient": false + } + ] + } + ], + "clients": [ + { + "auth": 1, + "readonly": true, + "nrequests_max": 15, + "sock": { + "fd": 102, + "errfd": -1, + "pid": -1, + "isClient": true + } + }, + { + "auth": 2, + "readonly": true, + "nrequests_max": 66, + "sock": { + "fd": 103, + "errfd": -1, + "pid": -1, + "isClient": true + } + } + ] + } + } } } -- 2.4.11

Commit a8743c39 removed keepalive_required attribute from daemon, added a test case for it, but forgot to enable the test itself in virnetdaemontest. Signed-off-by: Erik Skultety <eskultet@redhat.com> --- .../output-data-no-keepalive-required.json | 212 ++++++++++----------- tests/virnetdaemontest.c | 1 + 2 files changed, 107 insertions(+), 106 deletions(-) diff --git a/tests/virnetdaemondata/output-data-no-keepalive-required.json b/tests/virnetdaemondata/output-data-no-keepalive-required.json index 4c28a4c..8827c04 100644 --- a/tests/virnetdaemondata/output-data-no-keepalive-required.json +++ b/tests/virnetdaemondata/output-data-no-keepalive-required.json @@ -1,126 +1,126 @@ { "servers": { - "testServer0": { + "testServer0": { "min_workers": 10, "max_workers": 50, "priority_workers": 5, "max_clients": 100, + "max_anonymous_clients": 100, "keepaliveInterval": 120, "keepaliveCount": 5, "services": [ - { - "auth": 0, - "readonly": true, - "nrequests_client_max": 2, - "socks": [ - { - "fd": 100, - "errfd": -1, - "pid": 0, - "isClient": false - } - ] - }, - { - "auth": 2, - "readonly": false, - "nrequests_client_max": 5, - "socks": [ - { - "fd": 101, - "errfd": -1, - "pid": 0, - "isClient": false - } - ] - } + { + "auth": 0, + "readonly": true, + "nrequests_client_max": 2, + "socks": [ + { + "fd": 100, + "errfd": -1, + "pid": 0, + "isClient": false + } + ] + }, + { + "auth": 2, + "readonly": false, + "nrequests_client_max": 5, + "socks": [ + { + "fd": 101, + "errfd": -1, + "pid": 0, + "isClient": false + } + ] + } ], "clients": [ - { - "auth": 1, - "readonly": true, - "nrequests_max": 15, - "sock": { - "fd": 102, - "errfd": -1, - "pid": -1, - "isClient": true - } - }, - { - "auth": 2, - "readonly": true, - "nrequests_max": 66, - "sock": { - "fd": 103, - "errfd": -1, - "pid": -1, - "isClient": true - } - } - ] - }, - "testServer1": { - { - "min_workers": 2, - "max_workers": 50, - "priority_workers": 5, - "max_clients": 100, - "keepaliveInterval": 120, - "keepaliveCount": 5, - "services": [ - { - "auth": 0, - "readonly": true, - "nrequests_client_max": 2, - "socks": [ { - "fd": 100, - "errfd": -1, - "pid": 0, - "isClient": false + "auth": 1, + "readonly": true, + "nrequests_max": 15, + "sock": { + "fd": 102, + "errfd": -1, + "pid": -1, + "isClient": true + } + }, + { + "auth": 2, + "readonly": true, + "nrequests_max": 66, + "sock": { + "fd": 103, + "errfd": -1, + "pid": -1, + "isClient": true + } } ] - }, - { - "auth": 2, - "readonly": false, - "nrequests_client_max": 5, - "socks": [ + }, + "testServer1": { + "min_workers": 2, + "max_workers": 50, + "priority_workers": 5, + "max_clients": 100, + "max_anonymous_clients": 100, + "keepaliveInterval": 120, + "keepaliveCount": 5, + "services": [ + { + "auth": 0, + "readonly": true, + "nrequests_client_max": 2, + "socks": [ + { + "fd": 100, + "errfd": -1, + "pid": 0, + "isClient": false + } + ] + }, { - "fd": 101, - "errfd": -1, - "pid": 0, - "isClient": false + "auth": 2, + "readonly": false, + "nrequests_client_max": 5, + "socks": [ + { + "fd": 101, + "errfd": -1, + "pid": 0, + "isClient": false + } + ] + } + ], + "clients": [ + { + "auth": 1, + "readonly": true, + "nrequests_max": 15, + "sock": { + "fd": 102, + "errfd": -1, + "pid": -1, + "isClient": true + } + }, + { + "auth": 2, + "readonly": true, + "nrequests_max": 66, + "sock": { + "fd": 103, + "errfd": -1, + "pid": -1, + "isClient": true + } } ] - } - ], - "clients": [ - { - "auth": 1, - "readonly": true, - "nrequests_max": 15, - "sock": { - "fd": 102, - "errfd": -1, - "pid": -1, - "isClient": true - } - }, - { - "auth": 2, - "readonly": true, - "nrequests_max": 66, - "sock": { - "fd": 103, - "errfd": -1, - "pid": -1, - "isClient": true - } - } - ] } } - } } diff --git a/tests/virnetdaemontest.c b/tests/virnetdaemontest.c index 1608923..a20eee6 100644 --- a/tests/virnetdaemontest.c +++ b/tests/virnetdaemontest.c @@ -335,6 +335,7 @@ mymain(void) EXEC_RESTART_TEST("anon-clients", 1); EXEC_RESTART_TEST("admin-nomdns", 2); EXEC_RESTART_TEST("admin-server-names", 2); + EXEC_RESTART_TEST("no-keepalive-required", 2); EXEC_RESTART_TEST_FAIL("anon-clients", 2); return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE; -- 2.4.11

On Thu, Apr 21, 2016 at 12:41:20PM +0200, Erik Skultety wrote:
When I was adding new admin related tests, I noticed that we have some test data leftovers in the repo, as well as having a test that isn't enabled, although it should be and that we still have some JSON test data using tabs for indentation...my bad, I got through the log history only to see that when I merged a patch to fix this, I failed to do it properly.
Erik Skultety (3): tests: remove virnetservertest data leftovers tests: virnetdaemon: Replace tabs with spaces tests: virnetdaemontest: Enable testing for no-keepalive-required
ACK series Jan
.../input-data-admin-server-names.json | 204 +++++++++---------- .../output-data-no-keepalive-required.json | 224 ++++++++++----------- tests/virnetdaemontest.c | 1 + .../input-data-initial-nomdns.json | 61 ------ .../output-data-initial-nomdns.json | 62 ------ 5 files changed, 215 insertions(+), 337 deletions(-) delete mode 100644 tests/virnetserverdata/input-data-initial-nomdns.json delete mode 100644 tests/virnetserverdata/output-data-initial-nomdns.json
-- 2.4.11
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

On 21/04/16 12:51, Ján Tomko wrote:
On Thu, Apr 21, 2016 at 12:41:20PM +0200, Erik Skultety wrote:
When I was adding new admin related tests, I noticed that we have some test data leftovers in the repo, as well as having a test that isn't enabled, although it should be and that we still have some JSON test data using tabs for indentation...my bad, I got through the log history only to see that when I merged a patch to fix this, I failed to do it properly.
Erik Skultety (3): tests: remove virnetservertest data leftovers tests: virnetdaemon: Replace tabs with spaces tests: virnetdaemontest: Enable testing for no-keepalive-required
ACK series
Jan
Pushed, thanks. Erik
participants (2)
-
Erik Skultety
-
Ján Tomko