[PATCH 06/11] libtests/dl02: Update the rtl-shell path. More verbose test.

chrisj at rtems.org chrisj at rtems.org
Tue Feb 5 01:42:59 UTC 2019


From: Chris Johns <chrisj at rtems.org>

Updates #3686
---
 testsuites/libtests/dl07/dl-load.c | 21 ++++++++++++---------
 1 file changed, 12 insertions(+), 9 deletions(-)

diff --git a/testsuites/libtests/dl07/dl-load.c b/testsuites/libtests/dl07/dl-load.c
index 6e0262c7df..b0f8bd9dac 100644
--- a/testsuites/libtests/dl07/dl-load.c
+++ b/testsuites/libtests/dl07/dl-load.c
@@ -16,12 +16,11 @@
 
 #include <tmacros.h>
 
+#include <rtems/rtl/rtl-shell.h>
 #include <rtems/rtl/rtl-trace.h>
 
 typedef int (*call_sig)(void);
 
-int rtems_rtl_shell_command (int argc, char* argv[]);
-
 static void dl_load_dump (void)
 {
 #if DL07_RTL_CMDS
@@ -76,10 +75,10 @@ static void* dl_load_obj(const char* name, bool has_unresolved)
   return handle;
 }
 
-static void dl_close (void* handle)
+static void dl_close (void* handle, const char* msg)
 {
   int r;
-  printf ("handle: %p closing\n", handle);
+  printf ("%s: handle: %p closing\n", msg, handle);
   r = dlclose (handle);
   if (r != 0)
     printf("dlclose failed: %s\n", dlerror());
@@ -147,19 +146,23 @@ int dl_load_test(void)
   /*
    * Try and close the dependent modules, we should get an error.
    */
+  printf ("unload test: o1\n");
   rtems_test_assert (dlclose (o1) != 0);
+  printf ("unload test: o2\n");
   rtems_test_assert (dlclose (o2) != 0);
+  printf ("unload test: o4\n");
   rtems_test_assert (dlclose (o4) != 0);
+  printf ("unload test: o5\n");
   rtems_test_assert (dlclose (o5) != 0);
 
-  dl_close (o3);
+  dl_close (o3, "o3");
   rtems_test_assert (dlclose (o1) != 0);
-  dl_close (o4);
+  dl_close (o4, "o4");
   rtems_test_assert (dlclose (o1) != 0);
-  dl_close (o5);
+  dl_close (o5, "o5");
   rtems_test_assert (dlclose (o1) != 0);
-  dl_close (o2);
-  dl_close (o1);
+  dl_close (o2, "o2");
+  dl_close (o1, "o1");
 
   return 0;
 }
-- 
2.19.1




More information about the devel mailing list