diff --git a/attributes/maestro-schema.c b/attributes/maestro-schema.c index 5952aece3b38f03665653b3358499d81833ad4f2..40c74a8e90ceba52ec40818a6f155d9dd137c6a8 100644 --- a/attributes/maestro-schema.c +++ b/attributes/maestro-schema.c @@ -498,6 +498,7 @@ mstro_status mstro_schema_validate_and_instantiate(mstro_schema schema) { mstro_status s; + char * tmpname=NULL; if(schema==NULL) return MSTRO_INVARG; DEBUG("validating and instantiating schema %s (V%zu)\n", @@ -571,7 +572,7 @@ mstro_schema_validate_and_instantiate(mstro_schema schema) /* intern all symbols */ /* we use a scratch buffer that is pre-populated with the namespace */ - char *tmpname = malloc(max_symbol_len); + tmpname = malloc(max_symbol_len); strcpy(tmpname, schema->schema_namespace); size_t tmpname_offset = namespace_len; /* namespace -- if nonempty -- already has trailing '.' (checked by validation) */ diff --git a/include/maestro/i_cdo.h b/include/maestro/i_cdo.h index ed80bc9d9586da31ed83df53de813b2e5a076fae..9977f0b0274d807217fba6ccdc2c498ee149ee4e 100644 --- a/include/maestro/i_cdo.h +++ b/include/maestro/i_cdo.h @@ -129,7 +129,7 @@ typedef uint32_t mstro_cdo_state; #define MSTRO_CDO_ID_STR_LEN (36+1) /** The NIL UUID */ -#define MSTRO_CDO_ID_INVALID {{0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0 }} +#define MSTRO_CDO_ID_INVALID { .id = {0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0 } } /** return a string describing the CDO state @ref s */ const char * diff --git a/maestro/cdo.c b/maestro/cdo.c index 74282a9a0401c6e0dd7cdf74a58df3087a4a2c9e..ae3490938df91381c0b64d13c26896a55b060994 100644 --- a/maestro/cdo.c +++ b/maestro/cdo.c @@ -120,8 +120,7 @@ wait_for_cdo_state_change(mstro_cdo cdo, mstro_cdo_state old_state) pthread_cond_wait(&g_cdo_state_change_cvar, &g_cdo_state_change_lock); pthread_mutex_unlock(&g_cdo_state_change_lock); return atomic_load(&cdo->state); -}; - +} /* FIXME: CDO memory management should use a pool and recycling instead of individual alloc/free */ static inline @@ -902,8 +901,7 @@ mstro_cdo_dispose(mstro_cdo cdo) mstro_status status = mstro_cdo__free(&cdo); if(status!=MSTRO_OK) { - ERR("Failed to deallocate CDO `%s' (id %s)\n", - cdo->name, idstr); + ERR("Failed to deallocate CDO (id %s)\n", idstr); return status; } else { return MSTRO_OK; @@ -1140,7 +1138,7 @@ mstro_cdo_transfer_complete(mstro_cdo cdo) status = MSTRO_FAIL; } - + goto BAILOUT; BAILOUT: return status; } diff --git a/maestro/logging.c b/maestro/logging.c index e75cba61e9b0a1db02dd34791694e24a68e609bf..b99cb24a9ed88fa21f69465560c5680b0a1174b6 100644 --- a/maestro/logging.c +++ b/maestro/logging.c @@ -105,25 +105,27 @@ struct ansi_color { }; +/* \x1b is ESC ; \e is not C11 (a GNU extension we avoid) */ + static const struct ansi_color ansi_colors[MSTRO_COLOR__MAX] = { { .sym = MSTRO_COLOR_DEFAULT, .name = "default", .start = "", .end = "" }, - { .sym = MSTRO_COLOR_RED, .name = "red" , .start = "\e[0;31m", .end = "\e[0m" }, - { .sym = MSTRO_COLOR_YELLOW, .name = "yellow" , .start = "\e[0;33m", .end = "\e[0m" }, - { .sym = MSTRO_COLOR_GREEN, .name = "green" , .start = "\e[0;32m", .end = "\e[0m" }, - { .sym = MSTRO_COLOR_BLUE, .name = "blue" , .start = "\e[0;34m", .end = "\e[0m" }, - { .sym = MSTRO_COLOR_MAGENTA, .name = "magenta", .start = "\e[0;35m", .end = "\e[0m" }, - { .sym = MSTRO_COLOR_CYAN, .name = "cyan" , .start = "\e[0;36m", .end = "\e[0m" }, - { .sym = MSTRO_COLOR_WHITE, .name = "white" , .start = "\e[0;37m", .end = "\e[0m" }, + { .sym = MSTRO_COLOR_RED, .name = "red" , .start = "\x1b[0;31m", .end = "\x1b[0m" }, + { .sym = MSTRO_COLOR_YELLOW, .name = "yellow" , .start = "\x1b[0;33m", .end = "\x1b[0m" }, + { .sym = MSTRO_COLOR_GREEN, .name = "green" , .start = "\x1b[0;32m", .end = "\x1b[0m" }, + { .sym = MSTRO_COLOR_BLUE, .name = "blue" , .start = "\x1b[0;34m", .end = "\x1b[0m" }, + { .sym = MSTRO_COLOR_MAGENTA, .name = "magenta", .start = "\x1b[0;35m", .end = "\x1b[0m" }, + { .sym = MSTRO_COLOR_CYAN, .name = "cyan" , .start = "\x1b[0;36m", .end = "\x1b[0m" }, + { .sym = MSTRO_COLOR_WHITE, .name = "white" , .start = "\x1b[0;37m", .end = "\x1b[0m" }, /* often, but not always available */ - { .sym = MSTRO_COLOR_BRIGHTRED, .name = "brightred" , .start = "\e[1;31m", .end = "\e[0m" }, - { .sym = MSTRO_COLOR_BRIGHTGREEN, .name = "brightgreen" , .start = "\e[1;32m", .end = "\e[0m" }, - { .sym = MSTRO_COLOR_BRIGHTYELLOW, .name = "brightyellow" , .start = "\e[1;33m", .end = "\e[0m" }, - { .sym = MSTRO_COLOR_BRIGHTBLUE, .name = "brightblue" , .start = "\e[1;34m", .end = "\e[0m" }, - { .sym = MSTRO_COLOR_BRIGHTMAGENTA, .name = "brightmagenta", .start = "\e[1;35m", .end = "\e[0m" }, - { .sym = MSTRO_COLOR_BRIGHTCYAN, .name = "brightcyan" , .start = "\e[1;36m", .end = "\e[0m" }, - { .sym = MSTRO_COLOR_BRIGHTWHITE, .name = "brightwhite" , .start = "\e[1;37m", .end = "\e[0m" }, + { .sym = MSTRO_COLOR_BRIGHTRED, .name = "brightred" , .start = "\x1b[1;31m", .end = "\x1b[0m" }, + { .sym = MSTRO_COLOR_BRIGHTGREEN, .name = "brightgreen" , .start = "\x1b[1;32m", .end = "\x1b[0m" }, + { .sym = MSTRO_COLOR_BRIGHTYELLOW, .name = "brightyellow" , .start = "\x1b[1;33m", .end = "\x1b[0m" }, + { .sym = MSTRO_COLOR_BRIGHTBLUE, .name = "brightblue" , .start = "\x1b[1;34m", .end = "\x1b[0m" }, + { .sym = MSTRO_COLOR_BRIGHTMAGENTA, .name = "brightmagenta", .start = "\x1b[1;35m", .end = "\x1b[0m" }, + { .sym = MSTRO_COLOR_BRIGHTCYAN, .name = "brightcyan" , .start = "\x1b[1;36m", .end = "\x1b[0m" }, + { .sym = MSTRO_COLOR_BRIGHTWHITE, .name = "brightwhite" , .start = "\x1b[1;37m", .end = "\x1b[0m" }, }; @@ -174,7 +176,7 @@ static char *g_instance_identifier = NULL; /** The process ID to be include in logging */ static long g_pid = 0; -static int g_rank = -1; +//static int g_rank = -1; /* max length of hostname in log output */ #define MAX_HOSTNAME 256 @@ -334,8 +336,6 @@ mstro_location_aware_log(int level, * messaging/transport/other thread letter? */ char header[1024] = ""; - char color_str_begin[8]; - char color_str_end[8]; enum ansi_color_symbol color = g_log_color; if(g_color_errors) { if (level == MSTRO_LOG_ERR) { diff --git a/maestro/ofi.c b/maestro/ofi.c index 7cc8f9bc838bc559206d836b4dcf156d19148785..fbf289293861c4f3251d1437ce2bb759537067e7 100644 --- a/maestro/ofi.c +++ b/maestro/ofi.c @@ -423,7 +423,7 @@ mstro_ep_desc_serialize(char **result_p, * for details */ tpl_node *tn; - mstro_endpoint_descriptor tmp, elt; + mstro_endpoint_descriptor elt; struct serialized_endpoint_element serialized_element; assert(MSTRO_EP__MAX<=INT_MAX); @@ -453,7 +453,7 @@ mstro_ep_desc_serialize(char **result_p, || elt->type == MSTRO_EP_OFI_MLX) { /* uint64_t based endpoints */ tpl_node *tns; - uint64_t val; + // uint64_t val; /* abusing C union properties we can refer to all entries by the * gni slots; we end up always transporting 6 uint64, but who cares */ tns = tpl_map("UUUUUU", @@ -461,7 +461,7 @@ mstro_ep_desc_serialize(char **result_p, & elt->gni[2], & elt->gni[3], & elt->gni[4], & elt->gni[5]); tpl_pack(tns, 0); - void *buf; + void *buf=NULL; size_t buflen; if(-1==tpl_dump(tns,TPL_MEM, &buf, &buflen)) { ERR("Not enough space to pack fabric endpoint\n"); @@ -474,7 +474,7 @@ mstro_ep_desc_serialize(char **result_p, if(needed>MSTRO_EP_STRING_MAX) { ERR("Cannot b64 encode fabric endpoint data, need %d\n", needed); stat=MSTRO_FAIL; - goto BAILOUT; + return stat; } if(encoded!=NULL) { strcpy(strval, (char*)encoded); @@ -541,9 +541,10 @@ mstro_ep_desc_serialize(char **result_p, tpl_pack(tn,1); free(serialized_element.strval); } + /* now write all to a string */ size_t len; - void *buf; + void *buf=NULL; tpl_dump(tn,TPL_MEM, &buf, &len); if(len>MSTRO_EP_STRING_MAX) { ERR("EP serialization took %zu bytes, but only %zu are supported\n", @@ -575,7 +576,8 @@ mstro_ep_desc_serialize(char **result_p, } #endif BAILOUT: - free(buf); + if(buf) + free(buf); return stat; } @@ -637,7 +639,7 @@ mstro_ofi_pm_info(char **result_p) & d->gni[2], & d->gni[3], & d->gni[4], & d->gni[5]); tpl_pack(tns, 0); - void *buf; + void *buf=NULL; size_t buflen; if(-1==tpl_dump(tns,TPL_MEM, &buf, &buflen)) { ERR("Not enough space to pack fabric endpoint\n"); @@ -650,7 +652,7 @@ mstro_ofi_pm_info(char **result_p) if(needed>MSTRO_EP_STRING_MAX) { ERR("Cannot b64 encode fabric endpoint data, need %d\n", needed); stat=MSTRO_FAIL; - goto BAILOUT; + return stat; } if(encoded!=NULL) { strcpy(strval, (char*)encoded); @@ -1521,7 +1523,7 @@ mstro_ofi_init(void) /* fix pointer into invalid last entry */ g_endpoints->eps[g_endpoints->size-1].next = NULL; - if(g_endpoints>0) { + if(g_endpoints!=NULL) { INFO("%zu usable endpoints\n", g_endpoints->size); retstat = MSTRO_OK; } else { @@ -2021,7 +2023,7 @@ mstro_pc__handle_initiate_transfer(const Mstro__Pool__InitiateTransfer* init) return MSTRO_INVMSG; } - INFO(" \e[1;34m Initiating a transfer to endpoint %s \e[0m\n",init->dst_serialized_endpoint); + DEBUG("Initiating a transfer to endpoint %s\n",init->dst_serialized_endpoint); struct mstro_cdo_id cdoid = { .qw[0] = init->cdoid->qw0, @@ -2031,7 +2033,7 @@ mstro_pc__handle_initiate_transfer(const Mstro__Pool__InitiateTransfer* init) idstr);); if (!(MSTRO_OK == mstro_pool__find_source_cdo(&cdoid, &src_cdo))) { WITH_CDO_ID_STR(idstr, &cdoid, - ERR(" \e[1;34m Cannot transfer CDO gid %s because not in local pool \e[0m\n", + ERR("Cannot transfer CDO gid %s because not in local pool\n", idstr);); return MSTRO_FAIL; } @@ -2041,9 +2043,9 @@ mstro_pc__handle_initiate_transfer(const Mstro__Pool__InitiateTransfer* init) // TODO rm, transport layer checks that if (src_cdo->raw_ptr == NULL) - INFO ("\e[1;34m No rawptr dirty for CDO %s\e[0m\n", src_cdo->name); + INFO ("No rawptr dirty for CDO %s\n", src_cdo->name); else - INFO ("\e[1;34m Rawptr dirty %p for CDO %s\e[0m\n", src_cdo->raw_ptr, src_cdo->name); + INFO ("Rawptr dirty %p for CDO %s\n", src_cdo->raw_ptr, src_cdo->name); /* ensure we know how to talk to the recipient */ struct mstro_pm_app_registry_entry *e; @@ -2186,7 +2188,7 @@ INFO("TICKET CASE GFS\n"); /* status = mstro_transport_ticket_issue(src_cdo, &ticket); if (MSTRO_OK != status) { - ERR("\e[1;34m Cannot issue a ticket for CDO %s \e[0m\n", src_cdo->name); + ERR("Cannot issue a ticket for CDO %s\n", src_cdo->name); return MSTRO_FAIL; } */ @@ -2196,15 +2198,15 @@ INFO("TICKET CASE GFS\n"); /* Execute transport (non-blocking) */ status = mstro_transport_execute(src_cdo, &ticket); if(MSTRO_OK != status) { - ERR("\e[1;34m Failure in transport execute for CDO %s \e[0m\n", + ERR("Failure in transport execute for CDO %s\n", src_cdo->name); return MSTRO_FAIL; } - INFO("\e[1;34m Issued a ticket for CDO %s \e[0m\n", src_cdo->name); + INFO("Issued a ticket for CDO %s\n", src_cdo->name); -//INFO("TransferTicket using path %s\n", ticket.gfs->path); -INFO("TransferTicket cdo size %zu\n", ticket.data_size); + //INFO("TransferTicket using path %s\n", ticket.gfs->path); + INFO("TransferTicket cdo size %zu\n", ticket.data_size); /* do some clean-up if applicable */ @@ -2228,7 +2230,7 @@ INFO("TransferTicket cdo size %zu\n", ticket.data_size); status = mstro_pmp_send_nowait(init->dst_appid->id, &msg); if(status!=MSTRO_OK) { - ERR("\e[1;34m Cannot send ticket to %zu: %d (%s) \e[0m\n", + ERR("Cannot send ticket to %zu: %d (%s)\n", init->dst_appid->id, status, mstro_status_description(status)); return MSTRO_FAIL; } @@ -2260,18 +2262,18 @@ mstro_pc__handle_transfer_ticket(Mstro__Pool__TransferTicket* ticket) status = mstro_pool__find_sink_cdo(&cdoid, &src_cdo); if(MSTRO_OK != status) { WITH_CDO_ID_STR(idstr, &cdoid, - ERR(" \e[1;34m Cannot transfer CDO gid %s because not in local pool \e[0m\n", + ERR("Cannot transfer CDO gid %s because not in local pool\n", idstr);); return MSTRO_FAIL; } - DEBUG("\e[1;34m Initiating transfer to dst app %zu (me) of CDO %s \e[0m\n", + DEBUG("Initiating transfer to dst app %zu (me) of CDO %s\n", g_pool_app_id, src_cdo->name); /* Execute transport (non-blocking) */ status = mstro_transport_execute(src_cdo, ticket); if(MSTRO_OK != status) { - ERR("\e[1;34m Failure in transport execute for CDO %s \e[0m\n", + ERR("Failure in transport execute for CDO %s\n", src_cdo->name); return MSTRO_FAIL; } @@ -2293,7 +2295,7 @@ mstro_pc__handle_transfer_ticket(Mstro__Pool__TransferTicket* ticket) status = mstro_pmp_send_nowait(MSTRO_APP_ID_MANAGER, &msg); if(status!=MSTRO_OK) { - ERR("\e[1;34m Cannot send completion to pool manager: %d (%s) \e[0m\n", + ERR("Cannot send completion to pool manager: %d (%s)\n", status, mstro_status_description(status)); return MSTRO_FAIL; } @@ -2304,7 +2306,7 @@ mstro_pc__handle_transfer_ticket(Mstro__Pool__TransferTicket* ticket) /* FIXME: register sender as peer app */ status = mstro_pmp_send_nowait(ticket->src_appid->id, &msg); if(status!=MSTRO_OK) { - ERR("\e[1;34m Cannot send completion to source %d: %d (%s) \e[0m\n", + ERR("Cannot send completion to source %d: %d (%s)\n", ticket->src_appid->id, mstro_status_description(status)); return MSTRO_FAIL; } @@ -2395,12 +2397,12 @@ mstro_pc__handle_msg(const struct mstro_msg_envelope *envelope, break; case MSTRO__POOL__MSTRO_MSG__MSG_INITIATE_TRANSFER: - INFO ("\e[1;34m PC handling InitiateTransfer msg\e[0m\n"); + INFO ("PC handling InitiateTransfer msg\n"); status = mstro_pc__handle_initiate_transfer(msg->initiate_transfer); break; case MSTRO__POOL__MSTRO_MSG__MSG_TRANSFER_TICKET: - INFO ("\e[1;34m PC handling TransferTicket msg\e[0m\n"); + INFO ("PC handling TransferTicket msg\n"); status = mstro_pc__handle_transfer_ticket(msg->transfer_ticket); break; diff --git a/maestro/pool_manager_ofi.c b/maestro/pool_manager_ofi.c index 1a7236c77620540ea6f01666194e07ab27380394..db3b70c6b8888252a71d46220f38af5b8bc03528 100644 --- a/maestro/pool_manager_ofi.c +++ b/maestro/pool_manager_ofi.c @@ -200,7 +200,7 @@ mstro_pm_detach(void) mstro_status s=MSTRO_UNIMPL; WARN("Not detaching from pool manager yet\n"); - + goto BAILOUT; BAILOUT: return s; } diff --git a/maestro/pool_manager_registry.c b/maestro/pool_manager_registry.c index 291c1279d47c5ebc6b26ba265b2596c5868dd484..290ed7b48bbb090cebd168b698a559db9dc08b39 100644 --- a/maestro/pool_manager_registry.c +++ b/maestro/pool_manager_registry.c @@ -444,7 +444,7 @@ mstro_pm__handle_demands(struct mstro_pm_demand_queue_entry *q) Mstro__Pool__Appid dst_appid = MSTRO__POOL__APPID__INIT; dst_appid.id = e->requestor; - INFO(" \e[1;34m Initiating a transfer for requestor %zu \e[0m\n", + INFO("Initiating a transfer for requestor %zu\n", e->requestor); Mstro__Pool__InitiateTransfer it @@ -460,7 +460,7 @@ mstro_pm__handle_demands(struct mstro_pm_demand_queue_entry *q) ERR("Target %zu not in app table\n", e->requestor); return MSTRO_FAIL; } - INFO("\e[1;34m InitiateTransfer msg packed with serialized ep desc %s \e[0m\n", + INFO("InitiateTransfer msg packed with serialized ep desc %s\n", app_entry->serialized_desc); it.dst_serialized_endpoint = app_entry->serialized_desc; INFO("entry has req methods %p\n", e->req_methods); diff --git a/tests/cheat.h b/tests/cheat.h index bb708799bd24c3ab96362798b0e008c19ef85d25..05424c5476c1b13de9b2cfd84caca06530f65cb5 100644 --- a/tests/cheat.h +++ b/tests/cheat.h @@ -2981,7 +2981,7 @@ static int CHEAT_WRAP(vfprintf)(FILE* const stream, size_t length; char* buffer; - int result; + int result=-1; length = cheat_printed_length(format, list); diff --git a/tests/check_pool_local_multi.c b/tests/check_pool_local_multi.c index 8268c717c750d895b65519cfc103bdaeb98e0d2d..2a33968fec7922c28f4bd877c74346f96ee1757e 100644 --- a/tests/check_pool_local_multi.c +++ b/tests/check_pool_local_multi.c @@ -44,6 +44,8 @@ #include <pthread.h> +#define CDO_NAME_MAX 32 + CHEAT_DECLARE( /* everyone will OR in their value; need to do atomic access */ pthread_mutex_t global_result_mtx = PTHREAD_MUTEX_INITIALIZER; @@ -55,13 +57,12 @@ CHEAT_DECLARE( size_t num_max_declares_per_cdo; }; -#define CDO_NAME_MAX 32 void create_name(char *dst, size_t idx) { snprintf(dst, CDO_NAME_MAX, "Test CDO %zu\n", idx); - }; + } /* intended to be run in a thread */ void* @@ -101,10 +102,10 @@ CHEAT_DECLARE( return NULL; } - -#define MAX_THREADS 9 /* power-of-two + 1 and >1 */ ) +#define MAX_THREADS 9 /* power-of-two + 1 and >1 */ + CHEAT_TEST(cdo_local_pool_works, /* save print time: */ putenv("MSTRO_LOG_LEVEL=0"); diff --git a/tests/check_pool_local_putget.c b/tests/check_pool_local_putget.c index 8f5cffc10e0feaee653a4649449cbf0dcf3ea6e9..4364acacd7f09ddf36fe7f758f175c706dd24a97 100644 --- a/tests/check_pool_local_putget.c +++ b/tests/check_pool_local_putget.c @@ -63,6 +63,10 @@ #include <pthread.h> #include <inttypes.h> +#define CDO_NAME_MAX 64 +#define CONSUMER_READY_STRING "Consumer ready" +#define WORK_ITEM_STRING "Work item" + CHEAT_DECLARE( /* everyone will OR in their value; need to do atomic access */ pthread_mutex_t global_result_mtx = PTHREAD_MUTEX_INITIALIZER; @@ -77,15 +81,12 @@ CHEAT_DECLARE( size_t num_different_cdos; }; -#define CDO_NAME_MAX 64 -#define CONSUMER_READY_STRING "Consumer ready" -#define WORK_ITEM_STRING "Work item" void create_name(char *dst, const char *base, size_t idx) { snprintf(dst, CDO_NAME_MAX, "%s %zu", base, idx); - }; + } /* intended to be run in a thread */ void* @@ -242,9 +243,11 @@ CHEAT_DECLARE( return NULL; } + ) + #define MAX_PROD_THREADS 1 #define MAX_CONS_THREADS 1 - ) + CHEAT_TEST(cdo_pool_ops_work, /* save print time: */ diff --git a/tests/check_schema_parse.c b/tests/check_schema_parse.c index 9ff3b258acf556f9d62887b93cbd24f6b447a564..c3ed74372cd1521ee606f88330130b76bf622a37 100644 --- a/tests/check_schema_parse.c +++ b/tests/check_schema_parse.c @@ -84,9 +84,6 @@ CHEAT_TEST(core_schema_parse, cheat_assert(MSTRO_OK==s); cheat_yield(); - /* cheat_assert(MSTRO_OK==mstro_schema_merge(s1, s2)); */ - /* cheat_yield(); */ - s=mstro_schema_parse_from_file(ECMWF_YAML, &s3); if(MSTRO_OK!=s) { /* clean up successful ones so that valgrind is happy @@ -96,7 +93,9 @@ CHEAT_TEST(core_schema_parse, } cheat_assert(MSTRO_OK==s); cheat_yield(); - + + /* cheat_assert(MSTRO_OK==mstro_schema_merge(s1, s2)); */ + /* cheat_yield(); */ /* now use the merged schema to parse some sample defs */ cheat_assert(MSTRO_OK==mstro_attributes_parse(s1, @@ -105,10 +104,9 @@ CHEAT_TEST(core_schema_parse, cheat_yield(); - - /* cheat_assert(MSTRO_OK==mstro_schema_add_from_file(CORE_YAML)); */ - /* cheat_assert(MSTRO_OK==mstro_schema_add_from_file(USER_YAML)); */ + /* s1 is the merged one, and freeing it will recurse */ + cheat_assert(MSTRO_OK==mstro_schema_free(s1)); ) diff --git a/tests/demo_mvp_d3_2.c b/tests/demo_mvp_d3_2.c index 3a167da6e29969100e49a9ad551fe37607e0ca99..31605efe4f9725d4ff4427933df535e24233e363 100644 --- a/tests/demo_mvp_d3_2.c +++ b/tests/demo_mvp_d3_2.c @@ -382,7 +382,6 @@ void wait_archiver_ready(size_t index) { char name[READY_NAME_MAX]; - mstro_cdo ready_cdo; size_t s = snprintf(name, READY_NAME_MAX, ARCHIVER_READY_NAME_TEMPLATE, index); if(s>=READY_NAME_MAX) { @@ -409,7 +408,6 @@ void wait_consumer_ready(size_t index) { char name[READY_NAME_MAX]; - mstro_cdo ready_cdo; size_t s = snprintf(name, READY_NAME_MAX, CONSUMER_READY_NAME_TEMPLATE, index); if(s>=READY_NAME_MAX) { @@ -503,7 +501,6 @@ archiver_flush_to_disk(const char *name, mmbArray *a) void* archiver_thread_fun(void *closure) { - mstro_cdo announcement_cdo; mstro_status s; size_t my_idx = * (size_t*)closure; INFO("Archiver %zu starting\n", my_idx); @@ -623,7 +620,6 @@ void buf_fill_rand(const char* name, char* b, int size) void* producer_thread_fun(void *closure) { - mstro_cdo announcement_cdo; mstro_status s; size_t my_idx = * (size_t*)closure; INFO("Producer %zu starting\n", my_idx); @@ -760,7 +756,6 @@ consumer_flush_to_disk(const char *name, void *a, uint64_t size) void * consumer_thread_fun(void *closure) { - mstro_cdo announcement_cdo; mstro_status s; size_t my_idx = * (size_t*)closure; INFO("Consumer %zu starting\n", my_idx); @@ -786,14 +781,14 @@ consumer_thread_fun(void *closure) MSTRO_ATTR_DEFAULT, &incoming[i]); if(s!=MSTRO_OK) { - ERR("Failed to declare CDO %s for archiving\n", + ERR("Failed to declare CDO %s for consumption\n", announcement->cdo_names[i]); abort(); } /* add allocation */ incoming_buffers[i] = malloc(announcement->cdo_size); if(incoming_buffers[i]==NULL) { - ERR("Cannot allocate CDO buffer for archiving\n"); + ERR("Cannot allocate CDO buffer for comsumption\n"); abort(); } s = mstro_cdo_attribute_set(incoming[i], @@ -805,7 +800,7 @@ consumer_thread_fun(void *closure) &size); if(s!=MSTRO_OK) { - ERR("Failed to add buffer to CDO %s for archiving\n", + ERR("Failed to add buffer to CDO %s for consumption\n", announcement->cdo_names[i]); abort(); } diff --git a/tests/simple_interlock_client.c b/tests/simple_interlock_client.c index 852e73f93bbde0aade60783daf07ac464906321b..f451806bc4f3c8b546861cfec4b1a0059520d1bf 100644 --- a/tests/simple_interlock_client.c +++ b/tests/simple_interlock_client.c @@ -56,10 +56,11 @@ #endif - -CHEAT_DECLARE( #define XSTRINGIFY(s) #s #define STRINGIFY(s) XSTRINGIFY(s) + + +CHEAT_DECLARE( char *g_client_args= STRINGIFY(CLIENT_ARGS);