testsuite: update for libmallocwrap rename to libustinstr-malloc
authorPierre-Marc Fournier <pierre-marc.fournier@polymtl.ca>
Thu, 25 Mar 2010 15:59:09 +0000 (11:59 -0400)
committerPierre-Marc Fournier <pierre-marc.fournier@polymtl.ca>
Thu, 25 Mar 2010 15:59:09 +0000 (11:59 -0400)
configure.ac
tests/Makefile.am
tests/runtests
tests/test-libmallocwrap/Makefile.am [deleted file]
tests/test-libmallocwrap/prog.c [deleted file]
tests/test-libustinstr-malloc/Makefile.am [new file with mode: 0644]
tests/test-libustinstr-malloc/prog.c [new file with mode: 0644]

index dc32afbdc360096d5e5f9bf285d9d8e69b647522..a354f834495c28952bb72f806a9b4270f023d37e 100644 (file)
@@ -116,7 +116,7 @@ AC_CONFIG_FILES([
        tests/simple_include/Makefile
        tests/snprintf/Makefile
        tests/test-nevents/Makefile
-       tests/test-libmallocwrap/Makefile
+       tests/test-libustinstr-malloc/Makefile
        libustinstr-malloc/Makefile
        libustfork/Makefile
        ustd/Makefile
index 7688e7ef82d257f6eb562b843f1952f01d3b6f08..8e5c678f44f056b72fedf9f04ebd6df8e075df0b 100644 (file)
@@ -1,3 +1,3 @@
-SUBDIRS = hello hello2 basic basic_long fork simple_include snprintf test-nevents test-libmallocwrap
+SUBDIRS = hello hello2 basic basic_long fork simple_include snprintf test-nevents test-libustinstr-malloc
 
 dist_noinst_SCRIPTS = test_loop runtests trace_matches
index 3cb9da6ad68bc245e6c0ccc8a433d70351dd602f..116bb1f069ea97330e0d9667eca532458972c0d4 100755 (executable)
@@ -50,10 +50,10 @@ NOFAIL $MATCHES -N "fork - potential_exec" "^ust.potential_exec:" $trace_loc
 NOFAIL $MATCHES -N "fork - after_exec" "^ust.after_exec:" $trace_loc
 NOFAIL check_trace_logs "$trace_loc"
 
-starttest "libmallocwrap"
-NOFAIL usttrace -lm $TESTDIR/test-libmallocwrap/.libs/prog
+starttest "libustinstr-malloc"
+NOFAIL usttrace -lm $TESTDIR/test-libustinstr-malloc/.libs/prog
 trace_loc=$(usttrace -W)
-NOFAIL $MATCHES -N "mallocwrap - malloc" -n 1000 "^ust.malloc:.*{ size = 1[0-9][0-9][0-9]," $trace_loc
+NOFAIL $MATCHES -N "libustinstr-malloc - malloc" -n 1000 "^ust.malloc:.*{ size = 1[0-9][0-9][0-9]," $trace_loc
 NOFAIL check_trace_logs "$trace_loc"
 
 ### Manual mode test
@@ -68,7 +68,7 @@ mkfifo -m 0600 "$pidfilepath"
 ustd --pidfile "$pidfilepath" -o "$TRACE_DIR" >/dev/null 2>&1 &
 USTD_PID="$(<$pidfilepath)"
 
-LD_PRELOAD=/usr/local/lib/libust.so.0.0.0:/usr/local/lib/libmallocwrap.so find / >/dev/null 2>&1 &
+LD_PRELOAD=/usr/local/lib/libust.so.0.0.0:/usr/local/lib/libustinstr-malloc.so find / >/dev/null 2>&1 &
 PID=$!
 sleep 0.1
 NOFAIL ustctl --list-markers "$PID" >/dev/null
diff --git a/tests/test-libmallocwrap/Makefile.am b/tests/test-libmallocwrap/Makefile.am
deleted file mode 100644 (file)
index 502d6c4..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#AM_CPPFLAGS = -I$(top_srcdir)/include
-
-noinst_PROGRAMS = prog
-prog_SOURCES = prog.c
-prog_LDADD = $(top_builddir)/libust/libust.la $(top_builddir)/libust-initializer.o
diff --git a/tests/test-libmallocwrap/prog.c b/tests/test-libmallocwrap/prog.c
deleted file mode 100644 (file)
index 7d09653..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/* Copyright (C) 2009  Pierre-Marc Fournier
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
- */
-
-#include <string.h>
-#include <stdlib.h>
-
-#define N_ITER 1000
-
-int main()
-{
-       int i;
-       const char teststr[] = "Hello World! 1234567890abc";
-       void *ptrs[N_ITER];
-
-       for(i=0; i<N_ITER; i++) {
-               ptrs[i] = malloc(i+1000);
-
-               memcpy(ptrs[i], teststr, sizeof(teststr));
-
-               if(i%2 == 0) {
-                       free(ptrs[i]);
-               }
-       }
-
-       for(i=0; i<N_ITER; i++) {
-               if(i%2 == 1)
-                       free(ptrs[i]);
-       }
-
-       return 0;
-}
diff --git a/tests/test-libustinstr-malloc/Makefile.am b/tests/test-libustinstr-malloc/Makefile.am
new file mode 100644 (file)
index 0000000..502d6c4
--- /dev/null
@@ -0,0 +1,5 @@
+#AM_CPPFLAGS = -I$(top_srcdir)/include
+
+noinst_PROGRAMS = prog
+prog_SOURCES = prog.c
+prog_LDADD = $(top_builddir)/libust/libust.la $(top_builddir)/libust-initializer.o
diff --git a/tests/test-libustinstr-malloc/prog.c b/tests/test-libustinstr-malloc/prog.c
new file mode 100644 (file)
index 0000000..7d09653
--- /dev/null
@@ -0,0 +1,45 @@
+/* Copyright (C) 2009  Pierre-Marc Fournier
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
+ */
+
+#include <string.h>
+#include <stdlib.h>
+
+#define N_ITER 1000
+
+int main()
+{
+       int i;
+       const char teststr[] = "Hello World! 1234567890abc";
+       void *ptrs[N_ITER];
+
+       for(i=0; i<N_ITER; i++) {
+               ptrs[i] = malloc(i+1000);
+
+               memcpy(ptrs[i], teststr, sizeof(teststr));
+
+               if(i%2 == 0) {
+                       free(ptrs[i]);
+               }
+       }
+
+       for(i=0; i<N_ITER; i++) {
+               if(i%2 == 1)
+                       free(ptrs[i]);
+       }
+
+       return 0;
+}
This page took 0.027531 seconds and 4 git commands to generate.