X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/603e3e0717f9170f6844b293d04ad0c2ebdbaa84..6511b78ff810ead55a110d42b01a08255a55b56d:/testsuite/xbt/dict_crash.c diff --git a/testsuite/xbt/dict_crash.c b/testsuite/xbt/dict_crash.c index 75fdb101ee..0139085c44 100644 --- a/testsuite/xbt/dict_crash.c +++ b/testsuite/xbt/dict_crash.c @@ -48,14 +48,14 @@ static gras_error_t countelems(gras_dict_t *head,int*count) { return no_error; } -int main() { +int main(int argc,char **argv) { gras_error_t errcode; gras_dict_t *head=NULL; int i,j,k, nb; char *key; void *data; - TRY(gras_log_control_set("root.thresh=info")); + gras_init_defaultlog(argc,argv,"dict.thresh=verbose"); srand((unsigned int)time(NULL)); printf("Dictionnary: CRASH test:\n"); @@ -77,7 +77,7 @@ int main() { key[k]=rand() % ('z' - 'a') + 'a'; key[k]='\0'; // printf("[%d %s]\n",j,key); - TRYFAIL(gras_dict_insert(head,strdup(key),key,&free)); + TRYFAIL(gras_dict_insert(head,key,key,&free)); } nb=0; // gras_dict_dump(head,(void (*)(void*))&printf); @@ -95,7 +95,10 @@ int main() { printf("\n Fill 200 000 elements, with keys being the number of element\n"); printf(" (a point is 10 000 elements)\n"); for (j=0;j