[rtems commit] libdl: Fix the tests loading the correct files
Chris Johns
chrisj at rtems.org
Fri Apr 13 00:17:34 UTC 2018
Module: rtems
Branch: master
Commit: 696b9121a2b7ec80464d13c723e6c780a3e5608c
Changeset: http://git.rtems.org/rtems/commit/?id=696b9121a2b7ec80464d13c723e6c780a3e5608c
Author: Chris Johns <chrisj at rtems.org>
Date: Thu Apr 12 17:48:28 2018 +1000
libdl: Fix the tests loading the correct files
---
testsuites/libtests/Makefile.am | 2 +-
testsuites/libtests/dl01/dl-load.c | 4 ++--
testsuites/libtests/dl02/dl-load.c | 4 ++--
testsuites/libtests/dl03/dl-cache.c | 22 +++++++++++-----------
testsuites/libtests/dl04/dl-load.c | 2 +-
testsuites/libtests/dl05/dl-load.c | 2 +-
6 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/testsuites/libtests/Makefile.am b/testsuites/libtests/Makefile.am
index 692df90..b786e73 100644
--- a/testsuites/libtests/Makefile.am
+++ b/testsuites/libtests/Makefile.am
@@ -364,7 +364,7 @@ dl02-o2.o: dl02/dl-o2.c Makefile
$(AM_V_CC)$(COMPILE) -c -o $@ $<
dl02.tar: dl02-o1.o dl02-o2.o
@rm -f $@
- $(AM_V_GEN)$(PAX) -w -f $@ $<
+ $(AM_V_GEN)$(PAX) -w -f $@ $+
dl02-tar.c: dl02.tar
$(AM_V_GEN)$(BIN2C) -C $< $@
dl02-tar.h: dl02.tar
diff --git a/testsuites/libtests/dl01/dl-load.c b/testsuites/libtests/dl01/dl-load.c
index e8f84bd..5438196 100644
--- a/testsuites/libtests/dl01/dl-load.c
+++ b/testsuites/libtests/dl01/dl-load.c
@@ -28,9 +28,9 @@ int dl_load_test(void)
int unresolved;
char* message = "loaded";
- printf("load: /dl-o1.o\n");
+ printf("load: /dl01-o1.o\n");
- handle = dlopen ("/dl-o1.o", RTLD_NOW | RTLD_GLOBAL);
+ handle = dlopen ("/dl01-o1.o", RTLD_NOW | RTLD_GLOBAL);
if (!handle)
{
printf("dlopen failed: %s\n", dlerror());
diff --git a/testsuites/libtests/dl02/dl-load.c b/testsuites/libtests/dl02/dl-load.c
index 5bb40dc..601d621 100644
--- a/testsuites/libtests/dl02/dl-load.c
+++ b/testsuites/libtests/dl02/dl-load.c
@@ -49,10 +49,10 @@ int dl_load_test(void)
int call_ret;
int ret;
- o1 = dl_load_obj("/dl-o1.o");
+ o1 = dl_load_obj("/dl02-o1.o");
if (!o1)
return 1;
- o2 = dl_load_obj("/dl-o2.o");
+ o2 = dl_load_obj("/dl02-o2.o");
if (!o1)
return 1;
diff --git a/testsuites/libtests/dl03/dl-cache.c b/testsuites/libtests/dl03/dl-cache.c
index 82227cb..53c4fe7 100644
--- a/testsuites/libtests/dl03/dl-cache.c
+++ b/testsuites/libtests/dl03/dl-cache.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016 Chris Johns <chrisj at rtems.org>. All rights reserved.
+ * Copyright (c) 2016, 2018 Chris Johns <chrisj at rtems.org>. All rights reserved.
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@@ -63,7 +63,7 @@ static bool dl_cache_check(void* buffer, off_t offset, size_t length)
return memcmp(buffer, contents + offset, length) == 0;
}
-static off_t dl_cache_buffer_offset(rtems_rtl_obj_cache_t* cache, void* buffer)
+static off_t dl_cache_buffer_offset(rtems_rtl_obj_cache* cache, void* buffer)
{
return (off_t) (((uint8_t*) buffer) - ((uint8_t*) cache->buffer));
}
@@ -73,22 +73,22 @@ static void dl_init_rtl(void)
/*
* Check the RTL object is created and can be locked and unlocked.
*/
- rtems_test_assert(rtems_rtl_data () == NULL);
+ rtems_test_assert(rtems_rtl_data_unprotected () == NULL);
rtems_test_assert(rtems_rtl_lock () != NULL);
rtems_rtl_unlock ();
- rtems_test_assert(rtems_rtl_data () != NULL);
+ rtems_test_assert(rtems_rtl_data_unprotected () != NULL);
rtems_rtl_trace_set_mask(RTEMS_RTL_TRACE_ALL | RTEMS_RTL_TRACE_CACHE);
}
int dl_cache_test(void)
{
- rtems_rtl_obj_cache_t cache;
- int fd;
- void* buffer;
- off_t offset_in;
- off_t offset;
- size_t length_in;
- size_t length;
+ rtems_rtl_obj_cache cache;
+ int fd;
+ void* buffer;
+ off_t offset_in;
+ off_t offset;
+ size_t length_in;
+ size_t length;
/*
* Make sure the RTL can initialise.
diff --git a/testsuites/libtests/dl04/dl-load.c b/testsuites/libtests/dl04/dl-load.c
index 1409d79..38810f4 100644
--- a/testsuites/libtests/dl04/dl-load.c
+++ b/testsuites/libtests/dl04/dl-load.c
@@ -26,7 +26,7 @@ int dl_load_test(void)
const char* err;
rtems_rtl_trace_set_mask(RTEMS_RTL_TRACE_ALL);
- handle = dlopen("/dl-o4.o", RTLD_GLOBAL | RTLD_NOW);
+ handle = dlopen("/dl04-o4.o", RTLD_GLOBAL | RTLD_NOW);
err = dlerror();
if (err != NULL)
printf("dlopen: %s\n", err);
diff --git a/testsuites/libtests/dl05/dl-load.c b/testsuites/libtests/dl05/dl-load.c
index c7d5698..5ef6457 100644
--- a/testsuites/libtests/dl05/dl-load.c
+++ b/testsuites/libtests/dl05/dl-load.c
@@ -36,7 +36,7 @@ int dl_load_test(void)
rtems_rtl_trace_set_mask(RTEMS_RTL_TRACE_ALL);
- handle = dlopen("/dl-o5.o", RTLD_GLOBAL | RTLD_NOW);
+ handle = dlopen("/dl05-o5.o", RTLD_GLOBAL | RTLD_NOW);
if (handle == NULL)
{
err = dlerror();
More information about the vc
mailing list