if (debug) OUT;
main (void){  int count = TEST_ROUNDS;  int result = 0;  mtrace ();  /* Just a seed.  */  srandom (TEST_ROUNDS);  while (count--)    {      int nr = random () % NTESTS;      int index = tests[nr].index;      printf ("%4d: %4d: ", count + 1, nr);      fflush (stdout);      if (testobjs[index].handle == NULL)	{	  int (*fct) (int);	  /* Load the object.  */	  testobjs[index].handle = dlopen (testobjs[index].name,					   tests[nr].options);	  if (testobjs[index].handle == NULL)	    error (EXIT_FAILURE, 0, "cannot load `%s': %s",		   testobjs[index].name, dlerror ());	  /* Test the function call.  */	  fct = dlsym (testobjs[index].handle, tests[nr].fname);	  if (fct == NULL)	    error (EXIT_FAILURE, 0,		   "cannot get function `%s' from shared object `%s': %s",		   tests[nr].fname, testobjs[index].name, dlerror ());	  fct (10);	  printf ("successfully loaded `%s', handle %p\n",		  testobjs[index].name, testobjs[index].handle);	}      else	{	  if (dlclose (testobjs[index].handle) != 0)	    {	      printf ("failed to close %s\n", testobjs[index].name);	      result = 1;	    }	  else	    printf ("successfully unloaded `%s', handle %p\n",		    testobjs[index].name, testobjs[index].handle);	  testobjs[index].handle = NULL;	}    }  /* Unload all loaded modules.  */  for (count = 0; count < NOBJS; ++count)    if (testobjs[count].handle != NULL){	  printf ("\nclose: %s: l_initfini = %p, l_versions = %p\n",		  testobjs[count].name,		  ((struct link_map*)testobjs[count].handle)->l_initfini,		  ((struct link_map*)testobjs[count].handle)->l_versions);      if (dlclose (testobjs[count].handle) != 0)	{	  printf ("failed to close %s\n", testobjs[count].name);	  result = 1;}	}  return result;}