[PATCH] libtests/dl*: Use rtems_tarfs_load()

Sebastian Huber sebastian.huber at embedded-brains.de
Mon Nov 25 10:45:12 UTC 2019


Use rtems_tarfs_load() instead of Untar_FromMemory() to reduce the
memory demands of the tests.
---
 testsuites/libtests/dl01/init.c     | 4 ++--
 testsuites/libtests/dl02/init.c     | 4 ++--
 testsuites/libtests/dl04/init.c     | 4 ++--
 testsuites/libtests/dl05/init.c     | 4 ++--
 testsuites/libtests/dl06/initimpl.h | 4 ++--
 testsuites/libtests/dl07/init.c     | 4 ++--
 testsuites/libtests/dl08/init.c     | 4 ++--
 testsuites/libtests/dl09/init.c     | 4 ++--
 testsuites/libtests/dl10/init.c     | 4 ++--
 9 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/testsuites/libtests/dl01/init.c b/testsuites/libtests/dl01/init.c
index d073f56e9b..2f9c5209d0 100644
--- a/testsuites/libtests/dl01/init.c
+++ b/testsuites/libtests/dl01/init.c
@@ -18,7 +18,7 @@
 #include <unistd.h>
 
 #include <rtems/rtl/rtl.h>
-#include <rtems/untar.h>
+#include <rtems/imfs.h>
 
 #include "dl-load.h"
 
@@ -47,7 +47,7 @@ static void Init(rtems_task_argument arg)
 
   TEST_BEGIN();
 
-  te = Untar_FromMemory((void *)TARFILE_START, (size_t)TARFILE_SIZE);
+  te = rtems_tarfs_load("/", (void *)TARFILE_START, (size_t)TARFILE_SIZE);
   if (te != 0)
   {
     printf("untar failed: %d\n", te);
diff --git a/testsuites/libtests/dl02/init.c b/testsuites/libtests/dl02/init.c
index bb2ef105fd..459d1b182a 100644
--- a/testsuites/libtests/dl02/init.c
+++ b/testsuites/libtests/dl02/init.c
@@ -18,7 +18,7 @@
 #include <unistd.h>
 
 #include <rtems/rtl/rtl.h>
-#include <rtems/untar.h>
+#include <rtems/imfs.h>
 
 #include "dl-load.h"
 
@@ -47,7 +47,7 @@ static void Init(rtems_task_argument arg)
 
   TEST_BEGIN();
 
-  te = Untar_FromMemory((void *)TARFILE_START, (size_t)TARFILE_SIZE);
+  te = rtems_tarfs_load("/", (void *)TARFILE_START, (size_t)TARFILE_SIZE);
   if (te != 0)
   {
     printf("untar failed: %d\n", te);
diff --git a/testsuites/libtests/dl04/init.c b/testsuites/libtests/dl04/init.c
index a19c3b2dae..d56b235f90 100644
--- a/testsuites/libtests/dl04/init.c
+++ b/testsuites/libtests/dl04/init.c
@@ -18,7 +18,7 @@
 #include <unistd.h>
 
 #include <rtems/rtl/rtl.h>
-#include <rtems/untar.h>
+#include <rtems/imfs.h>
 
 #include "dl-load.h"
 
@@ -47,7 +47,7 @@ static void Init(rtems_task_argument arg)
 
   TEST_BEGIN();
 
-  te = Untar_FromMemory((void *)TARFILE_START, (size_t)TARFILE_SIZE);
+  te = rtems_tarfs_load("/", (void *)TARFILE_START, (size_t)TARFILE_SIZE);
   if (te != 0)
   {
     printf("untar failed: %d\n", te);
diff --git a/testsuites/libtests/dl05/init.c b/testsuites/libtests/dl05/init.c
index dd2150d2a6..37dd99b188 100644
--- a/testsuites/libtests/dl05/init.c
+++ b/testsuites/libtests/dl05/init.c
@@ -18,7 +18,7 @@
 #include <unistd.h>
 
 #include <rtems/rtl/rtl.h>
-#include <rtems/untar.h>
+#include <rtems/imfs.h>
 
 #include "dl-load.h"
 
@@ -47,7 +47,7 @@ static void Init(rtems_task_argument arg)
 
   TEST_BEGIN();
 
-  te = Untar_FromMemory((void *)TARFILE_START, (size_t)TARFILE_SIZE);
+  te = rtems_tarfs_load("/", (void *)TARFILE_START, (size_t)TARFILE_SIZE);
   if (te != 0)
   {
     printf("untar failed: %d\n", te);
diff --git a/testsuites/libtests/dl06/initimpl.h b/testsuites/libtests/dl06/initimpl.h
index 6f03d01843..7dd8621fa2 100644
--- a/testsuites/libtests/dl06/initimpl.h
+++ b/testsuites/libtests/dl06/initimpl.h
@@ -18,7 +18,7 @@
 #include <unistd.h>
 
 #include <rtems/rtl/rtl.h>
-#include <rtems/untar.h>
+#include <rtems/imfs.h>
 
 #include "dl-load.h"
 
@@ -51,7 +51,7 @@ static void Init(rtems_task_argument arg)
 
   TEST_BEGIN();
 
-  te = Untar_FromMemory((void *)TARFILE_START, (size_t)TARFILE_SIZE);
+  te = rtems_tarfs_load("/", (void *)TARFILE_START, (size_t)TARFILE_SIZE);
   if (te != 0)
   {
     printf("untar failed: %d\n", te);
diff --git a/testsuites/libtests/dl07/init.c b/testsuites/libtests/dl07/init.c
index e398b58b63..9d8e375b27 100644
--- a/testsuites/libtests/dl07/init.c
+++ b/testsuites/libtests/dl07/init.c
@@ -18,7 +18,7 @@
 #include <unistd.h>
 
 #include <rtems/rtl/rtl.h>
-#include <rtems/untar.h>
+#include <rtems/imfs.h>
 
 #include "dl-load.h"
 
@@ -48,7 +48,7 @@ static void Init(rtems_task_argument arg)
 
   TEST_BEGIN();
 
-  te = Untar_FromMemory((void *)TARFILE_START, (size_t)TARFILE_SIZE);
+  te = rtems_tarfs_load("/", (void *)TARFILE_START, (size_t)TARFILE_SIZE);
   if (te != 0)
   {
     printf("untar failed: %d\n", te);
diff --git a/testsuites/libtests/dl08/init.c b/testsuites/libtests/dl08/init.c
index d1f01a56bd..65291bd277 100644
--- a/testsuites/libtests/dl08/init.c
+++ b/testsuites/libtests/dl08/init.c
@@ -18,7 +18,7 @@
 #include <unistd.h>
 
 #include <rtems/rtl/rtl.h>
-#include <rtems/untar.h>
+#include <rtems/imfs.h>
 
 #include "dl-load.h"
 
@@ -48,7 +48,7 @@ static void Init(rtems_task_argument arg)
 
   TEST_BEGIN();
 
-  te = Untar_FromMemory((void *)TARFILE_START, (size_t)TARFILE_SIZE);
+  te = rtems_tarfs_load("/", (void *)TARFILE_START, (size_t)TARFILE_SIZE);
   if (te != 0)
   {
     printf("untar failed: %d\n", te);
diff --git a/testsuites/libtests/dl09/init.c b/testsuites/libtests/dl09/init.c
index 5343a1dcdf..eafb5f4516 100644
--- a/testsuites/libtests/dl09/init.c
+++ b/testsuites/libtests/dl09/init.c
@@ -18,7 +18,7 @@
 #include <unistd.h>
 
 #include <rtems/rtl/rtl.h>
-#include <rtems/untar.h>
+#include <rtems/imfs.h>
 
 #include "dl-load.h"
 
@@ -48,7 +48,7 @@ static void Init(rtems_task_argument arg)
 
   TEST_BEGIN();
 
-  te = Untar_FromMemory((void *)TARFILE_START, (size_t)TARFILE_SIZE);
+  te = rtems_tarfs_load("/", (void *)TARFILE_START, (size_t)TARFILE_SIZE);
   if (te != 0)
   {
     printf("untar failed: %d\n", te);
diff --git a/testsuites/libtests/dl10/init.c b/testsuites/libtests/dl10/init.c
index 214bc7e789..d3a0457f88 100644
--- a/testsuites/libtests/dl10/init.c
+++ b/testsuites/libtests/dl10/init.c
@@ -21,7 +21,7 @@
 #include <rtems/rtl/rtl.h>
 #include <rtems/rtl/rtl-shell.h>
 #include <rtems/shell.h>
-#include <rtems/untar.h>
+#include <rtems/imfs.h>
 
 #include "dl-load.h"
 
@@ -52,7 +52,7 @@ static void Init(rtems_task_argument arg)
 
   TEST_BEGIN();
 
-  e = Untar_FromMemory((void *)TARFILE_START, (size_t)TARFILE_SIZE);
+  e = rtems_tarfs_load("/", (void *)TARFILE_START, (size_t)TARFILE_SIZE);
   if (e != 0)
   {
     printf ("error: untar failed: %d\n", e);
-- 
2.16.4



More information about the devel mailing list