From 0051efda416210448612d4e1a04b35e7c3a464e4 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Mon, 19 Jan 2009 03:44:19 +0000 Subject: [PATCH] Create memcheck/tests/linux/ and move some Linux-specific tests into it. Partial merge from DARWIN branch, r8943. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8975 --- configure.in | 1 + memcheck/tests/Makefile.am | 10 +++++----- memcheck/tests/linux-capget.vgtest | 2 -- memcheck/tests/linux/Makefile.am | 17 +++++++++++++++++ .../tests/{linux-capget.c => linux/capget.c} | 0 .../capget.stderr.exp} | 0 memcheck/tests/linux/capget.vgtest | 2 ++ memcheck/tests/linux/filter_stderr | 3 +++ .../timerfd-syscall.c} | 2 +- .../timerfd-syscall.stderr.exp} | 0 .../timerfd-syscall.stdout.exp} | 0 .../timerfd-syscall.vgtest} | 2 +- 12 files changed, 30 insertions(+), 9 deletions(-) delete mode 100644 memcheck/tests/linux-capget.vgtest create mode 100644 memcheck/tests/linux/Makefile.am rename memcheck/tests/{linux-capget.c => linux/capget.c} (100%) rename memcheck/tests/{linux-capget.stderr.exp => linux/capget.stderr.exp} (100%) create mode 100644 memcheck/tests/linux/capget.vgtest create mode 100755 memcheck/tests/linux/filter_stderr rename memcheck/tests/{linux-timerfd-syscall.c => linux/timerfd-syscall.c} (99%) rename memcheck/tests/{linux-timerfd-syscall.stderr.exp => linux/timerfd-syscall.stderr.exp} (100%) rename memcheck/tests/{linux-timerfd-syscall.stdout.exp => linux/timerfd-syscall.stdout.exp} (100%) rename memcheck/tests/{linux-timerfd-syscall.vgtest => linux/timerfd-syscall.vgtest} (78%) diff --git a/configure.in b/configure.in index af05dcae6b..d10bd2c30a 100644 --- a/configure.in +++ b/configure.in @@ -1629,6 +1629,7 @@ AC_OUTPUT( memcheck/tests/ppc32/Makefile memcheck/tests/ppc64/Makefile memcheck/tests/x86/Makefile + memcheck/tests/linux/Makefile memcheck/tests/x86-linux/Makefile memcheck/docs/Makefile cachegrind/Makefile diff --git a/memcheck/tests/Makefile.am b/memcheck/tests/Makefile.am index 020c128e6f..8f54377f13 100644 --- a/memcheck/tests/Makefile.am +++ b/memcheck/tests/Makefile.am @@ -18,6 +18,11 @@ if VGA_PPC64 SUBDIRS += ppc64 endif +# OS-specific tests +if VGO_LINUX +SUBDIRS += linux +endif + # Platform-specific tests if VGP_X86_LINUX SUBDIRS += x86-linux @@ -73,10 +78,8 @@ EXTRA_DIST = $(noinst_SCRIPTS) \ leak-tree.stderr.exp2 leak-tree.stderr.exp64 \ leak-regroot.vgtest leak-regroot.stderr.exp \ leakotron.vgtest leakotron.stdout.exp leakotron.stderr.exp \ - linux-capget linux-capget.stderr.exp \ linux-syslog-syscall linux-syslog-syscall.stderr.exp \ linux-syscalls-2007 linux-syscalls-2007.stderr.exp \ - linux-timerfd-syscall linux-timerfd-syscall.stderr.exp \ long_namespace_xml.vgtest long_namespace_xml.stdout.exp \ long_namespace_xml.stderr.exp \ lsframe1.vgtest lsframe1.stdout.exp lsframe1.stderr.exp \ @@ -199,10 +202,8 @@ check_PROGRAMS = \ file_locking \ fprw fwrite hello inits inline \ leak-0 leak-cycle leak-pool leak-tree leak-regroot leakotron \ - linux-capget \ linux-syslog-syscall \ linux-syscalls-2007 \ - linux-timerfd-syscall \ long_namespace_xml \ lsframe1 lsframe2 \ mallinfo \ @@ -246,7 +247,6 @@ memcmptest_CFLAGS = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -fno-builtin-memcmp oset_test_CFLAGS = $(AM_FLAG_M3264_PRI) \ -DVGA_$(VG_ARCH_PRI)=1 -DVGO_$(VG_OS)=1 \ -DVGP_$(VG_ARCH_PRI)_$(VG_OS)=1 -linux_timerfd_syscall_LDADD = -lrt vcpu_bz2_CFLAGS = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -O2 -g vcpu_fbench_CFLAGS = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -O2 -g vcpu_fnfns_CFLAGS = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -O2 -g diff --git a/memcheck/tests/linux-capget.vgtest b/memcheck/tests/linux-capget.vgtest deleted file mode 100644 index acce6abcf1..0000000000 --- a/memcheck/tests/linux-capget.vgtest +++ /dev/null @@ -1,2 +0,0 @@ -prog: linux-capget -stderr_filter: filter_allocs diff --git a/memcheck/tests/linux/Makefile.am b/memcheck/tests/linux/Makefile.am new file mode 100644 index 0000000000..b0ad79f095 --- /dev/null +++ b/memcheck/tests/linux/Makefile.am @@ -0,0 +1,17 @@ +noinst_SCRIPTS = filter_stderr + +EXTRA_DIST = $(noinst_SCRIPTS) \ + capget capget.stderr.exp \ + timerfd-syscall timerfd-syscall.stderr.exp + +check_PROGRAMS = \ + capget \ + timerfd-syscall + +AM_CPPFLAGS = -I$(top_srcdir)/include +AM_CFLAGS = $(WERROR) @FLAG_M32@ -Winline -Wall -Wshadow -g \ + $(FLAG_MMMX) $(FLAG_MSSE) +AM_CXXFLAGS = $(AM_CFLAGS) +AM_CCASFLAGS = @FLAG_M32@ + +timerfd_syscall_LDADD = -lrt diff --git a/memcheck/tests/linux-capget.c b/memcheck/tests/linux/capget.c similarity index 100% rename from memcheck/tests/linux-capget.c rename to memcheck/tests/linux/capget.c diff --git a/memcheck/tests/linux-capget.stderr.exp b/memcheck/tests/linux/capget.stderr.exp similarity index 100% rename from memcheck/tests/linux-capget.stderr.exp rename to memcheck/tests/linux/capget.stderr.exp diff --git a/memcheck/tests/linux/capget.vgtest b/memcheck/tests/linux/capget.vgtest new file mode 100644 index 0000000000..8be6c3ef3a --- /dev/null +++ b/memcheck/tests/linux/capget.vgtest @@ -0,0 +1,2 @@ +prog: capget +stderr_filter: ../filter_allocs diff --git a/memcheck/tests/linux/filter_stderr b/memcheck/tests/linux/filter_stderr new file mode 100755 index 0000000000..0ae9313a9f --- /dev/null +++ b/memcheck/tests/linux/filter_stderr @@ -0,0 +1,3 @@ +#! /bin/sh + +../filter_stderr diff --git a/memcheck/tests/linux-timerfd-syscall.c b/memcheck/tests/linux/timerfd-syscall.c similarity index 99% rename from memcheck/tests/linux-timerfd-syscall.c rename to memcheck/tests/linux/timerfd-syscall.c index e1a891b88e..fdec7ceec4 100644 --- a/memcheck/tests/linux-timerfd-syscall.c +++ b/memcheck/tests/linux/timerfd-syscall.c @@ -28,7 +28,7 @@ #define _GNU_SOURCE -#include "../../config.h" +#include "../../../config.h" #include #include #include diff --git a/memcheck/tests/linux-timerfd-syscall.stderr.exp b/memcheck/tests/linux/timerfd-syscall.stderr.exp similarity index 100% rename from memcheck/tests/linux-timerfd-syscall.stderr.exp rename to memcheck/tests/linux/timerfd-syscall.stderr.exp diff --git a/memcheck/tests/linux-timerfd-syscall.stdout.exp b/memcheck/tests/linux/timerfd-syscall.stdout.exp similarity index 100% rename from memcheck/tests/linux-timerfd-syscall.stdout.exp rename to memcheck/tests/linux/timerfd-syscall.stdout.exp diff --git a/memcheck/tests/linux-timerfd-syscall.vgtest b/memcheck/tests/linux/timerfd-syscall.vgtest similarity index 78% rename from memcheck/tests/linux-timerfd-syscall.vgtest rename to memcheck/tests/linux/timerfd-syscall.vgtest index 1f1fbb7117..75a3f71752 100644 --- a/memcheck/tests/linux-timerfd-syscall.vgtest +++ b/memcheck/tests/linux/timerfd-syscall.vgtest @@ -1,2 +1,2 @@ prereq: [ "$(uname)" = "Linux" ] && awk 'END{exit("'$(uname -r)'" >= "2.6.25" ? 0 : 1)}'