Re: [PATCH 1/3] Add test log messages to corosync when we HAVE_TEST_AGENTS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Couldn't this just be a debug level, and set the debug appropriately in
the config file?  Problem with this approach is it requires two separate
binaries out of the build system (one for test running one without).  We
end up not testing the built binary in that case.



On 01/22/2012 06:33 PM, Angus Salkeld wrote:
> Signed-off-by: Angus Salkeld <asalkeld@xxxxxxxxxx>
> ---
>  cts/agents/cpg_test_agent.c |    4 ----
>  exec/main.c                 |    8 ++++++++
>  2 files changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/cts/agents/cpg_test_agent.c b/cts/agents/cpg_test_agent.c
> index befeeea..0a2e166 100644
> --- a/cts/agents/cpg_test_agent.c
> +++ b/cts/agents/cpg_test_agent.c
> @@ -203,8 +203,6 @@ static void config_change_callback (
>  	/* group_name,ip,pid,join|leave */
>  
>  	for (i = 0; i < left_list_entries; i++) {
> -		qb_log(LOG_INFO, "Member left: %s", left_list[i].nodeid);
> -
>  		if (record_config_events_g > 0) {
>  			log_pt = malloc (sizeof(log_entry_t));
>  			list_init (&log_pt->list);
> @@ -214,8 +212,6 @@ static void config_change_callback (
>  		}
>  	}
>  	for (i = 0; i < joined_list_entries; i++) {
> -		qb_log(LOG_INFO, "Member joined: %s", joined_list[i].nodeid);
> -
>  		if (record_config_events_g > 0) {
>  			log_pt = malloc (sizeof(log_entry_t));
>  			list_init (&log_pt->list);
> diff --git a/exec/main.c b/exec/main.c
> index 52af1ae..9ea9c9d 100644
> --- a/exec/main.c
> +++ b/exec/main.c
> @@ -350,6 +350,10 @@ static void member_object_joined (unsigned int nodeid)
>  		icmap_set_uint32(member_join_count, 1);
>  		icmap_set_string(member_status, "joined");
>  	}
> +#ifdef HAVE_TESTAGENTS
> +	log_printf (LOGSYS_LEVEL_INFO,
> +		"Member joined: %s", api->totem_ifaces_print (nodeid));
> +#endif /* HAVE_TESTAGENTS */
>  }
>  
>  static void member_object_left (unsigned int nodeid)
> @@ -358,6 +362,10 @@ static void member_object_left (unsigned int nodeid)
>  
>  	snprintf(member_status, ICMAP_KEYNAME_MAXLEN, "runtime.totem.pg.mrp.srp.members.%u.status", nodeid);
>  	icmap_set_string(member_status, "left");
> +#ifdef HAVE_TESTAGENTS
> +	log_printf (LOGSYS_LEVEL_INFO,
> +		"Member left: %s", api->totem_ifaces_print (nodeid));
> +#endif /* HAVE_TESTAGENTS */
>  }
>  
>  static void confchg_fn (

_______________________________________________
discuss mailing list
discuss@xxxxxxxxxxxx
http://lists.corosync.org/mailman/listinfo/discuss


[Index of Archives]     [Linux Clusters]     [Corosync Project]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Linux Kernel]     [Linux SCSI]     [X.Org]

  Powered by Linux