tests: call bt_current_thread_clear_error() when handling an error
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 4 Jul 2019 06:16:33 +0000 (02:16 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Sat, 6 Jul 2019 03:47:50 +0000 (23:47 -0400)
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I5e0774fc50936e74320d27313738ce673f5d3c44
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1615
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Reviewed-by: Simon Marchi <simon.marchi@efficios.com>
tests/lib/plugin.c
tests/lib/test_graph_topo.c

index 1f0d783a2d7b5f724cdee6e6daec40fb59e1d23e..9c58fd99a720bd69ee91981a73d8866d85f6ac48 100644 (file)
@@ -225,6 +225,7 @@ static void test_create_all_from_dir(const char *plugin_dir)
                BT_FALSE, &plugin_set);
        ok(status == BT_PLUGIN_FIND_ALL_FROM_DIR_STATUS_ERROR,
                "bt_plugin_find_all_from_dir() fails with an invalid path");
+       bt_current_thread_clear_error();
 
        plugin_set = NULL;
        status = bt_plugin_find_all_from_dir(plugin_dir, BT_FALSE, BT_FALSE,
index b4ea1cb0ad642255b3dd2eb66be88f7e6b00b33f..5efffde951a5254091072e451b3ef5b2cbfcd027 100644 (file)
@@ -699,6 +699,7 @@ void test_src_port_connected_error(void)
                sink_def_port, &conn);
        ok(status != BT_GRAPH_CONNECT_PORTS_STATUS_OK,
                "bt_graph_connect_ports() returns an error");
+       bt_current_thread_clear_error();
        ok(!conn, "returned connection is still NULL");
        gsrc = bt_component_source_as_component_const(src);
        gsink = bt_component_sink_as_component_const(sink);
@@ -764,6 +765,7 @@ void test_sink_port_connected_error(void)
                sink_def_port, &conn);
        ok(status != BT_GRAPH_CONNECT_PORTS_STATUS_OK,
                "bt_graph_connect_ports() returns an error");
+       bt_current_thread_clear_error();
        ok(!conn, "returned connection is still NULL");
        gsrc = bt_component_source_as_component_const(src);
        gsink = bt_component_sink_as_component_const(sink);
This page took 0.025699 seconds and 4 git commands to generate.