Commit Graph

14 Commits

Author SHA1 Message Date
Frediano Ziglio
a225ebe921 test-leaks: Load DH parameters to test this part of code
Just loding the file is enough to test code in reds.cpp.

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
2022-08-03 19:03:08 +01:00
Simon Chopin
3d32295f9e test-leaks: fix the test with OpenSSL3
In OpenSSL3, the SSL_accept call now emits proper errors, which we dump
*before* emitting the expected "SSL_accept failed" error message. The
g_test_expect_message framework doesn't really allow us to discard
messages AFAICT, so instead we add a new expectation with fairly loose
criteria.

Fixes #63

Signed-off-by: Simon Chopin <simon.chopin@canonical.com>
Acked-by: Frediano Ziglio <freddy77@gmail.com>
2021-11-11 09:23:51 +00:00
Frediano Ziglio
5ab0667eff test-leaks: Use socket compatibility layer
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2019-05-07 10:14:18 +01:00
Frediano Ziglio
96160ae50c test-leaks: Avoid clashing with test-display-base ports
Is possible that port 5913 is already in use as tests that uses
test_new will attempt to use ports from 5912 to 5921 so use a port
not in that range.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
2018-11-16 16:37:27 +00:00
Frediano Ziglio
d61fce91ee inputs-channels: Remove leak using tablet device
Current code does not free allocated tablet resources.
When a tablet is added some resources are allocated.
Resources should be released either removing the tablet or
freeing spice server object.
Added a test to check these conditions.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2017-11-22 16:44:09 +00:00
Frediano Ziglio
e16d7788db tests: Check leaks registering migration interface
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2017-10-13 17:10:59 +01:00
Frediano Ziglio
8856d518ee tests: Check leaks in spice_server_add_ssl_client
Currently is possible to trigger a leak by passing an invalid
connection.
This can happen if the client opens a connection and then closes it
without writing or reading any data.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2017-09-12 11:58:01 +01:00
Michal Privoznik
7254169f7f tests: Initialize all members of SpiceBaseInterface struct
When compiling, -Werror=missing-field-initializers is enabled.
However, some gcc versions (like Gentoo 4.9.4 one) fail to see
that all the members of the SpiceBaseInterface struct are
initialized:

test-display-base.c:844:5: error: missing initializer for field
'description' of 'SpiceBaseInterface'
[-Werror=missing-field-initializers] .base.description   = "test
spice virtual channel char device",

The solution is to initialize .base member as a structure at once
instead of multiple times per each member.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2017-06-23 10:09:50 +01:00
Frediano Ziglio
3c78882884 test-leaks: Document test program
This test needs some additional setup to do its job.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
2017-03-24 11:58:16 +00:00
Frediano Ziglio
312c0aadf0 test-leaks: Checks some leaks using TLS
Verify stuff are freed correctly (like TLS context).
The different PKI file required are generated with
base values (localhost and rsa 1024).

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2017-03-08 12:21:15 +00:00
Frediano Ziglio
df48918dd0 test-leaks: Test that creating and destroying spicevmc does not leak
Add and remove some vmc device to check for leaking.
These combination assure that currently implemented type
of devices (webdav, usb and generic) are checked.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2017-03-08 12:21:09 +00:00
Frediano Ziglio
73f8a65d06 tests: Move some specific GLib compatibility to compatibility file
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2017-03-03 16:49:41 +00:00
Frediano Ziglio
cdd1e69b28 main-dispatcher: Remove watch leak
Watch was added but never removed.
The added basic_event_loop_destroy() addition allows to see that
this leak is gone).

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2017-03-02 11:15:28 +00:00
Frediano Ziglio
f66b7bffc7 tests: Add basic spice_server_init()/spice_server_destroy()
This can be used for very basic leak checks.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2017-03-01 16:06:57 +00:00