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
-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
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
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
+++ /dev/null
-#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
+++ /dev/null
-/* 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;
-}
--- /dev/null
+#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
--- /dev/null
+/* 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;
+}