From bac53634537ca304eba66b3c0b3b0e2eb4a6a776 Mon Sep 17 00:00:00 2001 From: Chris Johns Date: Mon, 17 Dec 2018 17:40:46 +1100 Subject: libtests/dl02: Update the rtl-shell path. More verbose test. Updates #3686 --- testsuites/libtests/dl07/dl-load.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'testsuites') 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 +#include #include 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; } -- cgit v1.2.3