Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix error messages in elf/tst-dlmopen1.c.
The test error messages incorrectly reference LIBC_SO
when they should reference the dlmopen'd library
tst-dlmopen1mod.so. Define TEST_SO and use it in
all the error messages.
  • Loading branch information
Carlos O'Donell committed Sep 18, 2015
1 parent 60084e3 commit e2b918d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 3 additions & 0 deletions ChangeLog
@@ -1,5 +1,8 @@
2015-09-18 Carlos O'Donell <carlos@redhat.com>

* elf/tst-dlmopen1.c: Define TEST_SO.
(do_test): Use TEST_SO.

* elf/dl-load.c: Include libc-internal.h.
(_dl_map_object_from_fd): Use ALIGN_UP and ALIGN_DOWN.

Expand Down
7 changes: 4 additions & 3 deletions elf/tst-dlmopen1.c
Expand Up @@ -2,6 +2,7 @@
#include <stdio.h>
#include <gnu/lib-names.h>

#define TEST_SO "$ORIGIN/tst-dlmopen1mod.so"

static int
do_test (void)
Expand Down Expand Up @@ -34,7 +35,7 @@ do_test (void)
return 1;
}

h = dlmopen (LM_ID_NEWLM, "$ORIGIN/tst-dlmopen1mod.so", RTLD_LAZY);
h = dlmopen (LM_ID_NEWLM, TEST_SO, RTLD_LAZY);
if (h == NULL)
{
printf ("cannot get handle for %s: %s\n",
Expand All @@ -52,7 +53,7 @@ do_test (void)

if (ns == LM_ID_BASE)
{
printf ("namespace for %s is LM_ID_BASE\n", LIBC_SO);
printf ("namespace for %s is LM_ID_BASE\n", TEST_SO);
return 1;
}

Expand All @@ -69,7 +70,7 @@ do_test (void)
if (dlclose (h) != 0)
{
printf ("dlclose for %s in %s failed: %s\n",
LIBC_SO, __func__, dlerror ());
TEST_SO, __func__, dlerror ());
return 1;
}

Expand Down

0 comments on commit e2b918d

Please sign in to comment.