X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/85bd77ce2235a846db6202fec0dc396d07d6fead..ff021a73f0cd26b2f27ca729783aa486393f9b3a:/testsuite/xbt/multidict_crash.c diff --git a/testsuite/xbt/multidict_crash.c b/testsuite/xbt/multidict_crash.c new file mode 100644 index 0000000000..0f7e5f0d11 --- /dev/null +++ b/testsuite/xbt/multidict_crash.c @@ -0,0 +1,97 @@ +/* $Id$ */ + +/* multidict_crash - A crash test for multi-level dictionnaries */ + +/* Authors: Martin Quinson */ +/* Copyright (C) 2003 the OURAGAN project. */ + +/* This program is free software; you can redistribute it and/or modify it + under the terms of the license (GNU LGPL) which comes with this package. */ + +#include +#include + +#include + +#define NB_ELM 10/*00*/ +#define MULTICACHE_DEPTH 5 +#define KEY_SIZE 12 /*512*/ +#define NB_TEST 20 +int verbose=0; + +static gras_error_t test1(); + +static gras_error_t test1() { + gras_error_t errcode; + gras_dict_t *head=NULL; + int i,j,k,l; + char **key = NULL; + char **val = NULL; + void *data; + + printf("\nGeneric multicache: CRASH test:\n"); + printf(" Fill the struct and frees it %d times, using %d elements, depth of multicache=%d\n",NB_TEST,NB_ELM,MULTICACHE_DEPTH); + printf(" with %d chars long randomized keys. (a point is a test)\n",KEY_SIZE); + + for (i=0;i