aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYong-iL Joh <yong-il.joh@windriver.com>2017-06-08 18:44:27 +0900
committerYong-iL Joh <yong-il.joh@windriver.com>2017-07-07 23:42:56 +0900
commitdeedd67bd07c9a060a3fdc182fe9116cf5bd44fd (patch)
tree96e08f36c2a659d06f6ceed34f26caca8cd931b1
parenteed8c735ecc59e267e5783a146ce1755fb727379 (diff)
downloadmeta-ivi-deedd67bd07c9a060a3fdc182fe9116cf5bd44fd.tar.gz
meta-ivi-deedd67bd07c9a060a3fdc182fe9116cf5bd44fd.tar.bz2
meta-ivi-deedd67bd07c9a060a3fdc182fe9116cf5bd44fd.zip
node-health-monitor: fix glib warnings while running NHM test applications
- http://docs.projects.genivi.org/bugs/show_bug.cgi?id=436 - thanks to Thangam_Ramasamy@mentor.com Signed-off-by: Yong-iL Joh <yong-il.joh@windriver.com>
-rw-r--r--meta-ivi/recipes-extended/node-health-monitor/node-health-monitor/0001-node-health-monitor-set-valid-format-message-for-g_s.patch139
-rw-r--r--meta-ivi/recipes-extended/node-health-monitor/node-health-monitor_1.3.5.bb7
2 files changed, 143 insertions, 3 deletions
diff --git a/meta-ivi/recipes-extended/node-health-monitor/node-health-monitor/0001-node-health-monitor-set-valid-format-message-for-g_s.patch b/meta-ivi/recipes-extended/node-health-monitor/node-health-monitor/0001-node-health-monitor-set-valid-format-message-for-g_s.patch
new file mode 100644
index 0000000..352d58e
--- /dev/null
+++ b/meta-ivi/recipes-extended/node-health-monitor/node-health-monitor/0001-node-health-monitor-set-valid-format-message-for-g_s.patch
@@ -0,0 +1,139 @@
+From 7c17996273746d55cd3990ede7d9e736ddbbfab8 Mon Sep 17 00:00:00 2001
+From: Thangam Ramasamy <Thangam_Ramasamy@mentor.com>
+Date: Wed, 11 May 2016 15:56:48 +0530
+Subject: [PATCH] node-health-monitor: set valid format message for
+ g_set_error() calls
+
+Set valid format message to the last parameter of g_set_error() function
+instead of sending "NULL". This is needed to fix the gdbus warning message
+from glib-2.44.1. Moreover as per the comment in g_error_new_valist()
+function passing "NULL" to "format" parameter of g_set_error() function
+would be treated as errors. Due to this reason, set a valid format message
+to all the g_set_error() function calls.
+
+Signed-off-by: Thangam Ramasamy <Thangam_Ramasamy@mentor.com>
+---
+ tst/stubs/gen/nsm-dbus-consumer-stub.c | 4 ++--
+ tst/stubs/gen/nsm-dbus-lc-consumer-stub.c | 2 +-
+ tst/stubs/gen/nsm-dbus-lc-control-stub.c | 6 +++---
+ tst/stubs/gio/gio-stub.c | 10 +++++-----
+ 4 files changed, 11 insertions(+), 11 deletions(-)
+
+diff --git a/tst/stubs/gen/nsm-dbus-consumer-stub.c b/tst/stubs/gen/nsm-dbus-consumer-stub.c
+index 03a24a2..bfce582 100644
+--- a/tst/stubs/gen/nsm-dbus-consumer-stub.c
++++ b/tst/stubs/gen/nsm-dbus-consumer-stub.c
+@@ -60,7 +60,7 @@ nsm_dbus_consumer_proxy_new_sync_stub(GDBusConnection *connection,
+ else
+ {
+ retval = NULL;
+- g_set_error(error, G_DBUS_ERROR, G_DBUS_ERROR_DISCONNECTED, NULL);
++ g_set_error(error, G_DBUS_ERROR, G_DBUS_ERROR_DISCONNECTED, "dbus connection associated with NSM is disconnected");
+ }
+
+ return retval;
+@@ -91,7 +91,7 @@ nsm_dbus_consumer_call_register_shutdown_client_sync_stub(NsmDbusConsumer *prox
+ else
+ {
+ retval = FALSE;
+- g_set_error(error, G_DBUS_ERROR, G_DBUS_ERROR_DISCONNECTED, NULL);
++ g_set_error(error, G_DBUS_ERROR, G_DBUS_ERROR_DISCONNECTED, "dbus connection associated with NSM is disconnected");
+ }
+
+ return retval;
+diff --git a/tst/stubs/gen/nsm-dbus-lc-consumer-stub.c b/tst/stubs/gen/nsm-dbus-lc-consumer-stub.c
+index 82b0195..caeb47f 100644
+--- a/tst/stubs/gen/nsm-dbus-lc-consumer-stub.c
++++ b/tst/stubs/gen/nsm-dbus-lc-consumer-stub.c
+@@ -58,7 +58,7 @@ nsm_dbus_lc_consumer_proxy_new_sync_stub(GDBusConnection *connection,
+ else
+ {
+ retval = NULL;
+- g_set_error(error, G_DBUS_ERROR, G_DBUS_ERROR_DISCONNECTED, NULL);
++ g_set_error(error, G_DBUS_ERROR, G_DBUS_ERROR_DISCONNECTED, "dbus connection associated with NSM is disconnected");
+ }
+
+ return retval;
+diff --git a/tst/stubs/gen/nsm-dbus-lc-control-stub.c b/tst/stubs/gen/nsm-dbus-lc-control-stub.c
+index 14e3096..3ea40a3 100644
+--- a/tst/stubs/gen/nsm-dbus-lc-control-stub.c
++++ b/tst/stubs/gen/nsm-dbus-lc-control-stub.c
+@@ -60,7 +60,7 @@ nsm_dbus_lc_control_proxy_new_sync_stub(GDBusConnection *connection,
+ else
+ {
+ retval = NULL;
+- g_set_error(error, G_DBUS_ERROR, G_DBUS_ERROR_DISCONNECTED, NULL);
++ g_set_error(error, G_DBUS_ERROR, G_DBUS_ERROR_DISCONNECTED, "dbus connection associated with NSM is disconnected");
+ }
+
+ return retval;
+@@ -88,7 +88,7 @@ nsm_dbus_lc_control_call_set_app_health_status_sync_stub(NsmDbusLcControl *proxy
+ else
+ {
+ retval = FALSE;
+- g_set_error(error, G_DBUS_ERROR, G_DBUS_ERROR_DISCONNECTED, NULL);
++ g_set_error(error, G_DBUS_ERROR, G_DBUS_ERROR_DISCONNECTED, "dbus connection associated with NSM is disconnected");
+ }
+
+ return retval;
+@@ -116,7 +116,7 @@ nsm_dbus_lc_control_call_request_node_restart_sync_stub(NsmDbusLcControl *proxy,
+ else
+ {
+ retval = FALSE;
+- g_set_error(error, G_DBUS_ERROR, G_DBUS_ERROR_DISCONNECTED, NULL);
++ g_set_error(error, G_DBUS_ERROR, G_DBUS_ERROR_DISCONNECTED, "dbus connection associated with NSM is disconnected");
+ }
+
+ return retval;
+diff --git a/tst/stubs/gio/gio-stub.c b/tst/stubs/gio/gio-stub.c
+index 6cf8fb1..e273ac2 100644
+--- a/tst/stubs/gio/gio-stub.c
++++ b/tst/stubs/gio/gio-stub.c
+@@ -156,7 +156,7 @@ g_bus_get_sync_stub(GBusType bus_type,
+ else
+ {
+ retval = NULL;
+- g_set_error(error, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, NULL);
++ g_set_error(error, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, "Could not connect to message bus of bus type '%d'", bus_type);
+ }
+
+ return retval;
+@@ -211,7 +211,7 @@ g_dbus_interface_skeleton_export_stub(GDBusInterfaceSkeleton *interface_,
+ else
+ {
+ retval = FALSE;
+- g_set_error(error, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, NULL);
++ g_set_error(error, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, "Could not export dbus interface");
+ }
+
+ return retval;
+@@ -239,7 +239,7 @@ g_dbus_connection_new_for_address_sync_stub(const gchar *address,
+ else
+ {
+ retval = NULL;
+- g_set_error(error, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, NULL);
++ g_set_error(error, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, "Could not setup dbus client connection with address '%s'", address);
+ }
+
+ return retval;
+@@ -286,7 +286,7 @@ g_dbus_connection_call_sync_stub(GDBusConnection *connection,
+
+ if((rval == NULL) && (error != NULL))
+ {
+- g_set_error(error, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, NULL);
++ g_set_error(error, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, "Could not invoke the dbus method '%s'", method_name);
+ }
+ }
+
+@@ -415,7 +415,7 @@ g_spawn_sync_stub(const gchar *working_directory,
+ else
+ {
+ retval = FALSE;
+- g_set_error(error, G_SPAWN_ERROR, G_SPAWN_ERROR_FAILED, NULL);
++ g_set_error(error, G_SPAWN_ERROR, G_SPAWN_ERROR_FAILED, "Could not execute the child process '%s'", argv[0]);
+ }
+
+ return retval;
+--
+1.9.1
+
diff --git a/meta-ivi/recipes-extended/node-health-monitor/node-health-monitor_1.3.5.bb b/meta-ivi/recipes-extended/node-health-monitor/node-health-monitor_1.3.5.bb
index 1d0583d..bc525b6 100644
--- a/meta-ivi/recipes-extended/node-health-monitor/node-health-monitor_1.3.5.bb
+++ b/meta-ivi/recipes-extended/node-health-monitor/node-health-monitor_1.3.5.bb
@@ -7,9 +7,10 @@ PR = "r3"
SRCREV="6aa24c04080c3cd0389934841fae5ac502b8e13a"
SRC_URI = "git://github.com/GENIVI/${BPN}.git;protocol=https \
- file://fix-no-libsystemd-daemon.patch \
- file://0001-change-service-name.patch \
- "
+ file://fix-no-libsystemd-daemon.patch \
+ file://0001-change-service-name.patch \
+ file://0001-node-health-monitor-set-valid-format-message-for-g_s.patch \
+ "
S = "${WORKDIR}/git"
DEPENDS = "dlt-daemon glib-2.0 glib-2.0-native \