4 #include <gnu/lib-names.h>
13 for (int i
= 1; i
<= 10; ++i
)
18 printf ("round %d\n", i
);
20 memset (used
, '\0', sizeof (used
));
23 for (int j
= 0; j
< DL_NNS
- 1; ++j
)
25 h
[j
] = dlmopen (LM_ID_NEWLM
, "$ORIGIN/tst-dlmopen1mod.so",
29 printf ("round %d, namespace %d: load failed: %s\n",
34 if (dlinfo (h
[j
], RTLD_DI_LMID
, &ns
) != 0)
36 printf ("round %d, namespace %d: dlinfo failed: %s\n",
40 if (ns
< 0 || ns
>= DL_NNS
)
42 printf ("round %d, namespace %d: invalid namespace %ld",
46 else if (used
[ns
] != 0)
49 round %d, namespace %d: duplicate allocate of namespace %ld",
57 for (int j
= 0; j
< DL_NNS
- 1; ++j
)
58 if (dlclose (h
[j
]) != 0)
60 printf ("round %d, namespace %d: close failed: %s\n",
69 #include <support/test-driver.c>