]> git.proxmox.com Git - mirror_qemu.git/commit - tests/qtest/libqtest.c
tests: add qtest_add_data_func_full
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Tue, 19 Jul 2016 11:42:01 +0000 (15:42 +0400)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Thu, 8 Sep 2016 14:05:22 +0000 (18:05 +0400)
commit822e36ca358c20406c34b7cb585d1ce2456027d5
treea1a07139315e61116844b230b41dda0652fa15df
parentf73480c36f49562556b80bb5bf8acc45e20dcca1
tests: add qtest_add_data_func_full

Allows one to specify a destroy function for the test data.

Add a fallback using glib g_test_add_vtable() internal function, whose
signature changed over time. Tested with glib 2.22, 2.26 and 2.48, which
according to git log should be enough to cover all variations.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
tests/libqtest.c
tests/libqtest.h