Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Version 0.5 (protocol not changed; ABI changed)
[simgrid.git] / testsuite / gras / datadesc_usage.c
index e25b677..45058ae 100644 (file)
@@ -19,7 +19,7 @@ GRAS_LOG_NEW_DEFAULT_CATEGORY(test);
 #define RW    2
 
 int r_arch;
-  
+const char *filename = "datadesc_usage.out";  
 
 gras_error_t
 write_read(gras_datadesc_type_t *type,void *src, void *dst, 
@@ -32,7 +32,7 @@ write_read(gras_datadesc_type_t *type,void *src, void *dst,
    
   /* write */
   if (direction == RW) 
-    TRY(gras_socket_client_from_file("datadesc_usage.out",&sock));
+    TRY(gras_socket_client_from_file(filename,&sock));
   if (direction == WRITE || direction == RW)
     TRY(gras_datadesc_send(sock, type, src));
   if (direction == RW) 
@@ -40,7 +40,7 @@ write_read(gras_datadesc_type_t *type,void *src, void *dst,
    
   /* read */
   if (direction == RW) 
-    TRY(gras_socket_server_from_file("datadesc_usage.out",&sock));
+    TRY(gras_socket_server_from_file(filename,&sock));
 
   if (direction == READ || direction == RW)
     TRY(gras_datadesc_recv(sock, type, r_arch, dst));
@@ -53,6 +53,7 @@ write_read(gras_datadesc_type_t *type,void *src, void *dst,
 
 gras_error_t test_int(gras_socket_t *sock, int direction);
 gras_error_t test_float(gras_socket_t *sock, int direction);
+gras_error_t test_double(gras_socket_t *sock, int direction);
 gras_error_t test_array(gras_socket_t *sock, int direction);
 gras_error_t test_intref(gras_socket_t *sock, int direction);
 gras_error_t test_string(gras_socket_t *sock, int direction);
@@ -63,11 +64,19 @@ gras_error_t test_nestedstruct(gras_socket_t *sock, int direction);
 gras_error_t test_chain_list(gras_socket_t *sock, int direction);
 gras_error_t test_graph(gras_socket_t *sock, int direction);
 
+gras_error_t test_pbio(gras_socket_t *sock, int direction);
+gras_error_t test_clause(gras_socket_t *sock, int direction);
+
+/* defined in datadesc_structures.c, which in perl generated */
+gras_error_t test_structures(gras_socket_t *sock, int direction); 
+
+
+
 gras_error_t test_int(gras_socket_t *sock, int direction) {
   gras_error_t errcode;
   int i=5,j;
   
-  INFO0("==== Test on integer ====");
+  INFO0("---- Test on integer ----");
   TRY(write_read(gras_datadesc_by_name("int"), &i,&j, sock,direction));
   if (direction == READ || direction == RW) {
     gras_assert(i == j);
@@ -78,10 +87,21 @@ gras_error_t test_float(gras_socket_t *sock, int direction) {
   gras_error_t errcode;
   float i=5.0,j;
   
-  INFO0("==== Test on float ====");
+  INFO0("---- Test on float ----");
   TRY(write_read(gras_datadesc_by_name("float"), &i,&j, sock,direction));
   if (direction == READ || direction == RW) {
-    gras_assert(i == j);
+    gras_assert2(i == j,"%f != %f",i,j);
+  }
+  return no_error;
+}
+gras_error_t test_double(gras_socket_t *sock, int direction) {
+  gras_error_t errcode;
+  double i=-3252355.1234,j;
+  
+  INFO0("---- Test on double ----");
+  TRY(write_read(gras_datadesc_by_name("double"), &i,&j, sock,direction));
+  if (direction == READ || direction == RW) {
+    gras_assert2(i == j,"%f != %f",i,j);
   }
   return no_error;
 }
@@ -92,23 +112,23 @@ gras_error_t test_array(gras_socket_t *sock, int direction) {
   gras_error_t errcode;
   gras_datadesc_type_t *my_type;
   
-  array i,j;
+  array i = { 35212,-6226,74337,11414,7733};
+  array j;
   int cpt;
 
-  INFO0("==== Test on fixed array ====");
-  for (cpt=0; cpt<SIZE; cpt++) {
-    i[cpt] = rand();
-  }
+  INFO0("---- Test on fixed array ----");
 
-  TRY(gras_datadesc_declare_array_fixed("fixed int array", 
-                                       gras_datadesc_by_name("int"),
-                                       SIZE, &my_type));
+  TRY(gras_datadesc_array_fixed("fixed int array", 
+                               gras_datadesc_by_name("int"),
+                               SIZE, &my_type));
 
   TRY(write_read(my_type, &i,&j, sock,direction));
   if (direction == READ || direction == RW) {
-    for (cpt=0; cpt<SIZE; cpt++)
+    for (cpt=0; cpt<SIZE; cpt++) {
+      DEBUG1("Test spot %d",cpt);
       gras_assert4(i[cpt] == j[cpt],"i[%d]=%d  !=  j[%d]=%d",
                   cpt,i[cpt],cpt,j[cpt]);
+    }
   }
   return no_error;
 }
@@ -121,9 +141,9 @@ gras_error_t test_intref(gras_socket_t *sock, int direction) {
     RAISE_MALLOC;
   *i=12345;
 
-  INFO1("==== Test on a reference to an integer (%p) ====",i);
+  INFO1("---- Test on a reference to an integer (%p) ----",i);
 
-  TRY(gras_datadesc_declare_ref("int*",gras_datadesc_by_name("int"),&my_type));
+  TRY(gras_datadesc_ref("int*",gras_datadesc_by_name("int"),&my_type));
 
   TRY(write_read(my_type, &i,&j, sock,direction));
   if (direction == READ || direction == RW) {
@@ -142,7 +162,7 @@ gras_error_t test_string(gras_socket_t *sock, int direction) {
   char *i=strdup("Some data"), *j=NULL;
   int cpt;
   
-  INFO0("==== Test on string (ref to dynamic array) ====");
+  INFO0("---- Test on string (ref to dynamic array) ----");
   TRY(write_read(gras_datadesc_by_name("string"), &i,&j,
                 sock,direction));
   if (direction == READ || direction == RW) {
@@ -168,26 +188,27 @@ gras_error_t test_homostruct(gras_socket_t *sock, int direction) {
   gras_datadesc_type_t *my_type;
   homostruct *i, *j; 
 
-  INFO0("==== Test on homogeneous structure ====");
+  INFO0("---- Test on homogeneous structure ----");
   /* create descriptor */
-  TRY(gras_datadesc_declare_struct("homostruct",&my_type));
-  TRY(gras_datadesc_declare_struct_append(my_type,"a",
-                                         gras_datadesc_by_name("signed int")));
-  TRY(gras_datadesc_declare_struct_append(my_type,"b",
-                                         gras_datadesc_by_name("int")));
-  TRY(gras_datadesc_declare_struct_append(my_type,"c",
-                                         gras_datadesc_by_name("int")));
-  TRY(gras_datadesc_declare_struct_append(my_type,"d",
-                                         gras_datadesc_by_name("int")));
-  TRY(gras_datadesc_declare_ref("homostruct*",
-                               gras_datadesc_by_name("homostruct"),
-                               &my_type));
+  TRY(gras_datadesc_struct("homostruct",&my_type));
+  TRY(gras_datadesc_struct_append(my_type,"a",
+                                 gras_datadesc_by_name("signed int")));
+  TRY(gras_datadesc_struct_append(my_type,"b",
+                                 gras_datadesc_by_name("int")));
+  TRY(gras_datadesc_struct_append(my_type,"c",
+                                 gras_datadesc_by_name("int")));
+  TRY(gras_datadesc_struct_append(my_type,"d",
+                                 gras_datadesc_by_name("int")));
+  gras_datadesc_struct_close(my_type);
+  TRY(gras_datadesc_ref("homostruct*",
+                       gras_datadesc_by_name("homostruct"),
+                       &my_type));
 
   /* init a value, exchange it and check its validity*/
   if (! (i=malloc(sizeof(homostruct))) )
     RAISE_MALLOC;
-  i->a = rand();  i->b = rand();
-  i->c = rand();  i->d = rand();
+  i->a = 2235;    i->b = 433425;
+  i->c = -23423;  i->d = -235235;
 
   TRY(write_read(my_type, &i,&j, sock,direction));
   if (direction == READ || direction == RW) {
@@ -215,20 +236,20 @@ gras_error_t test_hetestruct(gras_socket_t *sock, int direction) {
   gras_datadesc_type_t *my_type;
   hetestruct *i, *j; 
 
-  INFO0("==== Test on heterogeneous structure ====");
+  INFO0("---- Test on heterogeneous structure ----");
   /* create descriptor */
-  TRY(gras_datadesc_declare_struct("hetestruct",&my_type));
-  TRY(gras_datadesc_declare_struct_append(my_type,"c1",
-                                         gras_datadesc_by_name("unsigned char")));
-  TRY(gras_datadesc_declare_struct_append(my_type,"l1",
-                                         gras_datadesc_by_name("unsigned long int")));
-  TRY(gras_datadesc_declare_struct_append(my_type,"c2",
-                                         gras_datadesc_by_name("unsigned char")));
-  TRY(gras_datadesc_declare_struct_append(my_type,"l2",
-                                         gras_datadesc_by_name("unsigned long int")));
-  TRY(gras_datadesc_declare_ref("hetestruct*",
-                               gras_datadesc_by_name("hetestruct"),
-                               &my_type));
+  TRY(gras_datadesc_struct("hetestruct",&my_type));
+  TRY(gras_datadesc_struct_append(my_type,"c1",
+                                 gras_datadesc_by_name("unsigned char")));
+  TRY(gras_datadesc_struct_append(my_type,"l1",
+                                 gras_datadesc_by_name("unsigned long int")));
+  TRY(gras_datadesc_struct_append(my_type,"c2",
+                                 gras_datadesc_by_name("unsigned char")));
+  TRY(gras_datadesc_struct_append(my_type,"l2",
+                                 gras_datadesc_by_name("unsigned long int")));
+  gras_datadesc_struct_close(my_type);
+  TRY(gras_datadesc_ref("hetestruct*", gras_datadesc_by_name("hetestruct"),
+                       &my_type));
 
   /* init a value, exchange it and check its validity*/
   if (! (i=malloc(sizeof(hetestruct))) )
@@ -240,7 +261,7 @@ gras_error_t test_hetestruct(gras_socket_t *sock, int direction) {
   if (direction == READ || direction == RW) {
     gras_assert(i->c1 == j->c1);
     gras_assert(i->c2 == j->c2);
-    gras_assert(i->l1 == j->l1);
+    gras_assert2(i->l1 == j->l1,"i->l1(=%ld)  !=  j->l1(=%ld)",i->l1,j->l1);
     gras_assert(i->l2 == j->l2);
     free(j);
   }
@@ -260,23 +281,23 @@ gras_error_t test_nestedstruct(gras_socket_t *sock, int direction) {
   gras_datadesc_type_t *my_type;
   nestedstruct *i, *j; 
 
-  INFO0("==== Test on nested structures ====");
+  INFO0("---- Test on nested structures ----");
   /* create descriptor */
-  TRY(gras_datadesc_declare_struct("nestedstruct",&my_type));
+  TRY(gras_datadesc_struct("nestedstruct",&my_type));
 
-  TRY(gras_datadesc_declare_struct_append(my_type,"hete",
-                                         gras_datadesc_by_name("hetestruct")));
-  TRY(gras_datadesc_declare_struct_append(my_type,"homo",
-                                         gras_datadesc_by_name("homostruct")));
-  TRY(gras_datadesc_declare_ref("nestedstruct*",
-                               gras_datadesc_by_name("nestedstruct"),
-                               &my_type));
+  TRY(gras_datadesc_struct_append(my_type,"hete",
+                                 gras_datadesc_by_name("hetestruct")));
+  TRY(gras_datadesc_struct_append(my_type,"homo",
+                                 gras_datadesc_by_name("homostruct")));
+  gras_datadesc_struct_close(my_type);
+  TRY(gras_datadesc_ref("nestedstruct*", gras_datadesc_by_name("nestedstruct"),
+                       &my_type));
 
   /* init a value, exchange it and check its validity*/
   if (! (i=malloc(sizeof(nestedstruct))) )
     RAISE_MALLOC;
-  i->homo.a = rand();  i->homo.b = rand();
-  i->homo.c = rand();  i->homo.d = rand();
+  i->homo.a = 235231;  i->homo.b = -124151;
+  i->homo.c = 211551;  i->homo.d = -664222;
   i->hete.c1 = 's'; i->hete.l1 = 123455;
   i->hete.c2 = 'e'; i->hete.l2 = 774531;
 
@@ -313,12 +334,12 @@ gras_error_t declare_chained_list_type(void) {
   gras_error_t errcode;
   gras_datadesc_type_t *my_type,*ref_my_type;
 
-  TRY(gras_datadesc_declare_struct("chained_list_t",&my_type));
-  TRY(gras_datadesc_declare_ref("chained_list_t*",my_type,&ref_my_type));
+  TRY(gras_datadesc_struct("chained_list_t",&my_type));
+  TRY(gras_datadesc_ref("chained_list_t*",my_type,&ref_my_type));
 
-  TRY(gras_datadesc_declare_struct_append(my_type,"v",
-                                         gras_datadesc_by_name("int")));
-  TRY(gras_datadesc_declare_struct_append(my_type,"l",ref_my_type));
+  TRY(gras_datadesc_struct_append(my_type,"v", gras_datadesc_by_name("int")));
+  TRY(gras_datadesc_struct_append(my_type,"l", ref_my_type));
+  gras_datadesc_struct_close(my_type);
 
   return no_error;
 }
@@ -347,10 +368,10 @@ gras_error_t test_chain_list(gras_socket_t *sock, int direction) {
   gras_error_t errcode;
   chained_list_t *i, *j; 
 
-  INFO0("==== Test on chained list ====");
+  INFO0("---- Test on chained list ----");
 
   /* init a value, exchange it and check its validity*/
-  i = cons( rand(), cons( rand() , cons( rand(), NULL)));
+  i = cons( 12355, cons( 246264 , cons( 23263, NULL)));
   j = NULL;
 
   TRY(write_read(gras_datadesc_by_name("chained_list_t*"),
@@ -371,9 +392,9 @@ gras_error_t test_graph(gras_socket_t *sock, int direction) {
   gras_error_t errcode;
   chained_list_t *i, *j; 
 
-  INFO0("==== Test on graph (cyclique chained list) ====");
+  INFO0("---- Test on graph (cyclique chained list) ----");
   /* init a value, exchange it and check its validity*/
-  i = cons( rand(), cons( rand() , cons( rand(), NULL)));
+  i = cons( 1151515, cons( -232362 , cons( 222552, NULL)));
   i->l->l->l = i;
   j = NULL;
 
@@ -400,69 +421,218 @@ gras_error_t test_graph(gras_socket_t *sock, int direction) {
 
     list_free(j);
   }
-  i->l->l->l = NULL; /* do this even in READ mode */
+  i->l->l->l = NULL; /* do this even in WRITE mode */
   list_free(i);
   return no_error;
 }
 
 /**** PBIO *****/
-typedef struct { /* structure presented in the IEEE article */
+GRAS_DEFINE_TYPE(s_pbio,
+struct s_pbio{ /* structure presented in the IEEE article */
   int Cnstatv;
   double Cstatev[12];
   int Cnprops;
   double Cprops[110];
-  int Cndi[4], Cnshr, Cnpt;
-  double Cdtime, Ctime[2];
+  int Cndi[4];
+  int Cnshr;
+  int Cnpt;
+  double Cdtime;
+  double Ctime[2];
   int Cntens;
-  double Cdfgrd0[3][373], Cdfgrd1[3][3], Cstress[106], Cddsdde[106][106];
-} KSdata1;
+  double Cdfgrd0[373][3];
+  double Cdfgrd1[3][3];
+  double Cstress[106];
+  double Cddsdde[106][106];
+};
+                )
+typedef struct s_pbio pbio_t;
+
+gras_error_t test_pbio(gras_socket_t *sock, int direction) {
+  gras_error_t errcode;
+  pbio_t i,j;
+  int cpt;
+  int cpt2;
+  gras_datadesc_type_t *pbio_type;
+
+  INFO0("---- Test on the PBIO IEEE struct (also tests GRAS DEFINE TYPE) ----");
+  pbio_type = gras_datadesc_by_symbol(s_pbio);
+
+  /* Fill in that damn struct */
+  i.Cnstatv = 325115;
+  for (cpt=0; cpt<12; cpt++) 
+    i.Cstatev[cpt] = ((double) cpt) * -2361.11;
+  i.Cnprops = -37373;
+  for (cpt=0; cpt<110; cpt++)
+    i.Cprops[cpt] = cpt * 100.0;
+  for (cpt=0; cpt<4; cpt++)
+    i.Cndi[cpt] = cpt * 23262;
+  i.Cnshr = -4634;
+  i.Cnpt = 114142;
+  i.Cdtime = -11515.662;
+  i.Ctime[0] = 332523.226;
+  i.Ctime[1] = -26216.113;
+  i.Cntens = 235211411;
+  
+  for (cpt=0; cpt<3; cpt++) {
+    for (cpt2=0; cpt2<373; cpt2++)
+      i.Cdfgrd0[cpt2][cpt] = ((double)cpt) * ((double)cpt2);
+    for (cpt2=0; cpt2<3; cpt2++)
+      i.Cdfgrd1[cpt][cpt2] = -((double)cpt) * ((double)cpt2);
+  }
+  for (cpt=0; cpt<106; cpt++) {
+    i.Cstress[cpt]=(double)cpt * 22.113;
+    for (cpt2=0; cpt2<106; cpt2++) 
+      i.Cddsdde[cpt][cpt2] = ((double)cpt) * ((double)cpt2);
+  }
+  TRY(write_read(gras_datadesc_by_symbol(s_pbio),
+                &i,&j, sock,direction));
+  if (direction == READ || direction == RW) {
+    /* Check that the data match */
+    gras_assert(i.Cnstatv == j.Cnstatv);
+    for (cpt=0; cpt<12; cpt++)
+      gras_assert(i.Cstatev[cpt] == j.Cstatev[cpt]);
+    gras_assert(i.Cnprops == j.Cnprops);
+    for (cpt=0; cpt<110; cpt++)
+      gras_assert(i.Cprops[cpt] == j.Cprops[cpt]);
+    for (cpt=0; cpt<4; cpt++) 
+      gras_assert(i.Cndi[cpt] == j.Cndi[cpt]);
+    gras_assert(i.Cnshr == j.Cnshr);
+    gras_assert(i.Cnpt == j.Cnpt);
+    gras_assert(i.Cdtime == j.Cdtime);
+    gras_assert(i.Ctime[0] == j.Ctime[0]);
+    gras_assert(i.Ctime[1] == j.Ctime[1]);
+    gras_assert(i.Cntens == j.Cntens);
+    for (cpt=0; cpt<3; cpt++) {
+      for (cpt2=0; cpt2<373; cpt2++)
+       gras_assert(i.Cdfgrd0[cpt2][cpt] == j.Cdfgrd0[cpt2][cpt]);
+      for (cpt2=0; cpt2<3; cpt2++)
+       gras_assert(i.Cdfgrd1[cpt][cpt2] == j.Cdfgrd1[cpt][cpt2]);
+    }
+    for (cpt=0; cpt<106; cpt++) {
+      gras_assert(i.Cstress[cpt] == j.Cstress[cpt]);
+      for (cpt2=0; cpt2<106; cpt2++) 
+       gras_assert4(i.Cddsdde[cpt][cpt2] == j.Cddsdde[cpt][cpt2],
+                    "%f=i.Cddsdde[%d][%d] != j.Cddsdde[cpt][cpt2]=%f",
+                    i.Cddsdde[cpt][cpt2],cpt,cpt2,j.Cddsdde[cpt][cpt2]);
+    }
+  }
+
+  return no_error;
+}
+
+typedef struct {
+   int num_lits; /* size of next array */
+   int* literals;
+} Clause;
+
+void Clause_pre_cb  (gras_cbps_t *vars,void *data);
+
+void Clause_pre_cb(gras_cbps_t *vars, void *data) {
+  gras_cbps_i_push(vars, (long int) ((Clause*)data)->num_lits);
+}
+
+gras_error_t test_clause(gras_socket_t *sock, int direction) {
+  gras_error_t errcode;
+  gras_datadesc_type_t *ddt,*array_t;
+  Clause *i,*j;
+  int cpt;
+  
+  INFO0("---- Test on struct containing dynamic array and its size (cbps test) ----");
+
+  /* create and fill the struct */
+  if (! (i=malloc(sizeof(Clause))) )
+    RAISE_MALLOC;
+
+  i->num_lits = 5432;
+  if (! (i->literals = malloc(sizeof(int) * i->num_lits)) )
+    RAISE_MALLOC;
+  for (cpt=0; cpt<i->num_lits; cpt++)
+    i->literals[cpt] = cpt * cpt - ((cpt * cpt) / 2);
+  DEBUG3("created data=%p (within %p @%p)",&(i->num_lits),i,&i);
+  DEBUG1("created count=%d",i->num_lits);
+
+  /* create the damn type descriptor */
+  TRYFAIL(gras_datadesc_struct("Clause",&ddt));
+
+  gras_datadesc_cb_send(ddt,Clause_pre_cb); /* push the size of the arrray */
+  
+  TRYFAIL(gras_datadesc_struct_append(ddt,"num_lits", 
+                                     gras_datadesc_by_name("int")));
+
+  TRYFAIL(gras_datadesc_ref_pop_arr(gras_datadesc_by_name("int"), &array_t));
+  TRYFAIL(gras_datadesc_struct_append(ddt,"literals",array_t));
+  gras_datadesc_struct_close(ddt);
+  TRYFAIL(gras_datadesc_ref("Clause*",ddt,&ddt));
+
+  TRY(write_read(ddt, &i,&j, sock,direction));
+  if (direction == READ || direction == RW) {
+    gras_assert(i->num_lits == j->num_lits);
+    for (cpt=0; cpt<i->num_lits; cpt++)
+      gras_assert(i->literals[cpt] == j->literals[cpt]);
+    
+    free(j->literals);
+    free(j);
+  }
+  free(i->literals);
+  free(i);
+  return no_error;
+}
 
 int main(int argc,char *argv[]) {
   gras_error_t errcode;
   gras_socket_t *sock;
   int direction = RW;
+  int cpt;
   char r_arch_char = gras_arch_selfid();
 
-  gras_init_defaultlog(&argc,argv,
-                      "DataDesc.thresh=verbose"
-                      " test.thresh=debug"
-                      //" set.thresh=debug"
-                      );
-  if (argc >= 2) {
-    if (!strcmp(argv[1], "--read"))
+  gras_init_defaultlog(&argc,argv,NULL);
+
+  for (cpt=1; cpt<argc; cpt++) {
+    if (!strcmp(argv[cpt], "--read")) {
       direction = READ;
-    if (!strcmp(argv[1], "--write"))
+    } else if (!strcmp(argv[cpt], "--write")) {
       direction = WRITE;
+    } else {
+       filename=argv[cpt];
+    }
   }
     
   if (direction == WRITE) {
-    TRYFAIL(gras_socket_client_from_file("datadesc_usage.out",&sock));
+    TRYFAIL(gras_socket_client_from_file(filename,&sock));
     TRY(gras_datadesc_send(sock, gras_datadesc_by_name("char"),
                           &r_arch_char));
   }
   if (direction == READ) {
-    TRYFAIL(gras_socket_server_from_file("datadesc_usage.out",&sock));
+    TRYFAIL(gras_socket_server_from_file(filename,&sock));
     TRY(gras_datadesc_recv(sock, gras_datadesc_by_name("char"),
                           gras_arch_selfid(), &r_arch_char));
-    INFO1("This datafile was generated on %s", 
-         gras_datadesc_arch_name(r_arch_char));
+    INFO3("This datafile was generated on %s (%d), I'm %s.",
+         gras_datadesc_arch_name(r_arch_char),(int)r_arch_char,
+         gras_datadesc_arch_name(gras_arch_selfid()));
   }
   r_arch = (int)r_arch_char;
   
   TRYFAIL(test_int(sock,direction));    
   TRYFAIL(test_float(sock,direction));  
+  TRYFAIL(test_double(sock,direction));  
   TRYFAIL(test_array(sock,direction));  
   TRYFAIL(test_intref(sock,direction)); 
   
   TRYFAIL(test_string(sock,direction)); 
 
+  TRYFAIL(test_structures(sock,direction));
+
   TRYFAIL(test_homostruct(sock,direction));
   TRYFAIL(test_hetestruct(sock,direction));
   TRYFAIL(test_nestedstruct(sock,direction));
 
   TRYFAIL(declare_chained_list_type());
   TRYFAIL(test_chain_list(sock,direction));
-  TRYFAIL(test_graph(sock,direction));
+  //  TRYFAIL(test_graph(sock,direction));
+
+  TRYFAIL(test_pbio(sock,direction));
+
+  TRYFAIL(test_clause(sock,direction));
 
   if (direction != RW) 
     gras_socket_close(sock);