13
0

Re-enable lib/ardour/test/session_test.

This test seems to be compiling and passing just fine (when run in
isolation), so turning it back on seems like a good idea. To make it
pass when run as part of the full ardour test suite, this does remove
the WebSockets control surface from the control surfaces test though, as
that control surface messes up the event loop of the main thread, which
would otherwise cause use-after-free crashes in the session test.
This commit is contained in:
Marijn Kruisselbrink 2022-12-29 19:50:03 -08:00 committed by Robin Gareus
parent 208aedaeaa
commit bf7f6386d5
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
3 changed files with 14 additions and 2 deletions

View File

@ -45,6 +45,13 @@ ControlSurfacesTest::instantiateAndTeardownTest ()
continue;
}
#endif
// The WebSockets control surface replaces the global event loop, causing
// crashes in later tests once it is deactivates. Until that is fixed, skip
// it.
if ((*i)->name == "WebSockets Server (Experimental)") {
continue;
}
std::cout << "ControlSurfacesTest: " << (*i)->name << "\n";
if ((*i)->protocol && (*i)->protocol->active()) {
/* may already be active because of user preferences */

View File

@ -585,7 +585,7 @@ def build(bld):
create_ardour_test_program(bld, obj.includes, 'unit-test-control_surface', 'test_control_surfaces', ['test/control_surfaces_test.cc'])
create_ardour_test_program(bld, obj.includes, 'unit-test-mtdm', 'test_mtdm', ['test/mtdm_test.cc'])
create_ardour_test_program(bld, obj.includes, 'unit-test-sha1', 'test_sha1', ['test/sha1_test.cc'])
#create_ardour_test_program(bld, obj.includes, 'unit-test-session', 'test_session', ['test/session_test.cc'])
create_ardour_test_program(bld, obj.includes, 'unit-test-session', 'test_session', ['test/session_test.cc'])
create_ardour_test_program(bld, obj.includes, 'unit-test-dsp_load_calculator', 'test_dsp_load_calculator', ['test/dsp_load_calculator_test.cc'])
test_sources = [
@ -607,7 +607,7 @@ def build(bld):
'test/control_surfaces_test.cc',
'test/mtdm_test.cc',
'test/sha1_test.cc',
#'test/session_test.cc',
'test/session_test.cc',
]
# Tests that don't work

View File

@ -102,6 +102,11 @@ struct PluginParamValueObserver {
FeedbackHelperUI::FeedbackHelperUI()
: AbstractUI<BaseUI::BaseRequestObject> ("WS_FeedbackHelperUI")
{
// This renames and changes the event loop for the main thread, presumably
// this is not the actually desired behavior. If this is intentional, at
// least the event loop should be set back when this FeedbackHelperUI is
// destroyed, as otherwise future access to the event loop is likely going
// to crash.
char name[64];
snprintf (name, 64, "WS-%p", (void*)DEBUG_THREAD_SELF);
pthread_set_name (name);