From: Pierre-Marc Fournier Date: Thu, 25 Mar 2010 15:59:09 +0000 (-0400) Subject: testsuite: update for libmallocwrap rename to libustinstr-malloc X-Git-Tag: v0.5~40 X-Git-Url: http://git.liburcu.org/?a=commitdiff_plain;ds=inline;h=30ca09e13b3c7e6ff5f719ea6882d97acee609eb;p=ust.git testsuite: update for libmallocwrap rename to libustinstr-malloc --- diff --git a/configure.ac b/configure.ac index dc32afb..a354f83 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/tests/Makefile.am b/tests/Makefile.am index 7688e7e..8e5c678 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -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 diff --git a/tests/runtests b/tests/runtests index 3cb9da6..116bb1f 100755 --- a/tests/runtests +++ b/tests/runtests @@ -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 index 502d6c4..0000000 --- a/tests/test-libmallocwrap/Makefile.am +++ /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 index 7d09653..0000000 --- a/tests/test-libmallocwrap/prog.c +++ /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 -#include - -#define N_ITER 1000 - -int main() -{ - int i; - const char teststr[] = "Hello World! 1234567890abc"; - void *ptrs[N_ITER]; - - for(i=0; i +#include + +#define N_ITER 1000 + +int main() +{ + int i; + const char teststr[] = "Hello World! 1234567890abc"; + void *ptrs[N_ITER]; + + for(i=0; i