From: Nicholas Nethercote Date: Fri, 13 Feb 2009 06:23:46 +0000 (+0000) Subject: Moved 3 Linux-specific tests into linux/ directories. X-Git-Tag: svn/VALGRIND_3_5_0~1001 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6031d626c169d5e1c9104cb64e07acc884bd3654;p=thirdparty%2Fvalgrind.git Moved 3 Linux-specific tests into linux/ directories. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9144 --- diff --git a/configure.in b/configure.in index 1e7d33d28a..47abcf2ddf 100644 --- a/configure.in +++ b/configure.in @@ -1750,6 +1750,7 @@ AC_OUTPUT( none/tests/ppc32/Makefile none/tests/ppc64/Makefile none/tests/x86/Makefile + none/tests/linux/Makefile none/docs/Makefile exp-omega/Makefile exp-omega/tests/Makefile diff --git a/memcheck/tests/Makefile.am b/memcheck/tests/Makefile.am index f8a6e82b6d..986332783f 100644 --- a/memcheck/tests/Makefile.am +++ b/memcheck/tests/Makefile.am @@ -143,7 +143,6 @@ EXTRA_DIST = $(noinst_SCRIPTS) \ sigprocmask.stderr.exp sigprocmask.stderr.exp2 sigprocmask.vgtest \ stack_changes.stderr.exp stack_changes.stdout.exp \ stack_changes.stdout.exp2 stack_changes.vgtest \ - stack_switch.stderr.exp stack_switch.vgtest \ strchr.stderr.exp strchr.stderr.exp2 strchr.vgtest \ str_tester.stderr.exp str_tester.vgtest \ supp_unknown.stderr.exp supp_unknown.vgtest supp_unknown.supp \ @@ -215,7 +214,7 @@ check_PROGRAMS = \ realloc1 realloc2 realloc3 \ sh-mem sh-mem-random \ sigaltstack signal2 sigprocmask sigkill \ - stack_changes stack_switch strchr str_tester \ + stack_changes strchr str_tester \ supp_unknown supp1 supp2 suppfree \ trivialleak \ mismatches new_override metadata \ @@ -247,7 +246,6 @@ wrap6_CFLAGS = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -O2 -g # Don't allow GCC to inline memcpy(), because then we can't intercept it overlap_CFLAGS = $(AM_CFLAGS) -fno-builtin-memcpy -stack_switch_LDADD = -lpthread str_tester_CFLAGS = $(AM_CFLAGS) -Wno-shadow supp_unknown_SOURCES = badjump.c supp1_SOURCES = supp.c diff --git a/memcheck/tests/linux/Makefile.am b/memcheck/tests/linux/Makefile.am index 93fc4c79dc..8fde427641 100644 --- a/memcheck/tests/linux/Makefile.am +++ b/memcheck/tests/linux/Makefile.am @@ -3,11 +3,13 @@ noinst_SCRIPTS = filter_stderr EXTRA_DIST = $(noinst_SCRIPTS) \ brk.stderr.exp brk.vgtest \ capget capget.stderr.exp \ + stack_switch.stderr.exp stack_switch.vgtest \ timerfd-syscall timerfd-syscall.stderr.exp check_PROGRAMS = \ brk \ capget \ + stack_switch \ timerfd-syscall AM_CPPFLAGS = -I$(top_srcdir)/include @@ -15,4 +17,5 @@ AM_CFLAGS = $(WERROR) $(AM_FLAG_M3264_PRI) -Winline -Wall -Wshadow -g \ $(FLAG_MMMX) $(FLAG_MSSE) AM_CXXFLAGS = $(AM_CFLAGS) +stack_switch_LDADD = -lpthread timerfd_syscall_LDADD = -lrt diff --git a/memcheck/tests/stack_switch.c b/memcheck/tests/linux/stack_switch.c similarity index 88% rename from memcheck/tests/stack_switch.c rename to memcheck/tests/linux/stack_switch.c index 45cde8e149..a0cfbad857 100644 --- a/memcheck/tests/stack_switch.c +++ b/memcheck/tests/linux/stack_switch.c @@ -3,15 +3,6 @@ #include -#if defined(_AIX) -int main(int argc, char **argv) -{ - printf("this test is linux-specific\n"); - return 0; -} - -#else - #include #include #include @@ -63,5 +54,3 @@ int main(int argc, char **argv) exit( 0 ); } - -#endif /* !defined(_AIX) */ diff --git a/memcheck/tests/stack_switch.stderr.exp b/memcheck/tests/linux/stack_switch.stderr.exp similarity index 100% rename from memcheck/tests/stack_switch.stderr.exp rename to memcheck/tests/linux/stack_switch.stderr.exp diff --git a/memcheck/tests/stack_switch.vgtest b/memcheck/tests/linux/stack_switch.vgtest similarity index 100% rename from memcheck/tests/stack_switch.vgtest rename to memcheck/tests/linux/stack_switch.vgtest diff --git a/none/tests/Makefile.am b/none/tests/Makefile.am index 43a51bc38e..600cc86e07 100644 --- a/none/tests/Makefile.am +++ b/none/tests/Makefile.am @@ -3,6 +3,8 @@ include $(top_srcdir)/Makefile.flags.am SUBDIRS = . + +# Arch-specific tests. if VGCONF_ARCHS_INCLUDE_X86 SUBDIRS += x86 endif @@ -16,7 +18,12 @@ if VGCONF_ARCHS_INCLUDE_PPC64 SUBDIRS += ppc64 endif -DIST_SUBDIRS = x86 amd64 ppc32 ppc64 . +# OS-specific tests +if VGCONF_OS_IS_LINUX +SUBDIRS += linux +endif + +DIST_SUBDIRS = x86 amd64 ppc32 ppc64 linux . noinst_SCRIPTS = \ filter_cmdline0 filter_linenos \ @@ -76,11 +83,6 @@ EXTRA_DIST = $(noinst_SCRIPTS) \ map_unaligned.stderr.exp map_unaligned.vgtest \ map_unmap.stderr.exp map_unmap.stdout.exp map_unmap.vgtest \ mq.stderr.exp mq.vgtest \ - mremap.stderr.exp mremap.stdout.exp mremap.vgtest \ - mremap2.stderr.exp \ - mremap2.stdout.exp mremap2.stdout.exp2 \ - mremap2.stdout.exp-glibc28-amd64 \ - mremap2.vgtest \ munmap_exe.stderr.exp munmap_exe.vgtest \ nestedfns.stderr.exp nestedfns.stdout.exp nestedfns.vgtest \ pending.stdout.exp pending.stderr.exp pending.vgtest \ @@ -144,7 +146,7 @@ check_PROGRAMS = \ fdleak_fcntl fdleak_ipv4 fdleak_open fdleak_pipe \ fdleak_socketpair \ floored fork fucomip manythreads \ - munmap_exe map_unaligned map_unmap mq mremap mremap2 \ + munmap_exe map_unaligned map_unmap mq \ nestedfns \ pending \ pth_atfork1 pth_blockedsig pth_cancel1 pth_cancel2 pth_cvsimple \ diff --git a/none/tests/linux/Makefile.am b/none/tests/linux/Makefile.am new file mode 100644 index 0000000000..2760a8a4f8 --- /dev/null +++ b/none/tests/linux/Makefile.am @@ -0,0 +1,14 @@ +noinst_SCRIPTS = filter_stderr + +EXTRA_DIST = $(noinst_SCRIPTS) \ + mremap.stderr.exp mremap.stdout.exp mremap.vgtest \ + mremap2.stderr.exp mremap2.stdout.exp mremap2.stdout.exp2 \ + mremap2.stdout.exp-glibc28-amd64 mremap2.vgtest + +check_PROGRAMS = \ + mremap \ + mremap2 + +AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include -I$(top_builddir)/include +AM_CFLAGS = $(WERROR) -Winline -Wall -Wshadow -g $(AM_FLAG_M3264_PRI) +AM_CXXFLAGS = $(AM_CFLAGS) diff --git a/none/tests/linux/filter_stderr b/none/tests/linux/filter_stderr new file mode 100755 index 0000000000..0ae9313a9f --- /dev/null +++ b/none/tests/linux/filter_stderr @@ -0,0 +1,3 @@ +#! /bin/sh + +../filter_stderr diff --git a/none/tests/mremap.c b/none/tests/linux/mremap.c similarity index 94% rename from none/tests/mremap.c rename to none/tests/linux/mremap.c index 3a2d22a4a8..a768836ac1 100644 --- a/none/tests/mremap.c +++ b/none/tests/linux/mremap.c @@ -3,16 +3,6 @@ #include #include -#if defined(_AIX) - -int main ( void ) -{ - printf("This test is Linux-specific.\n"); - return 0; -} - -#else - static char *mkmap(unsigned sz) { static char *map; @@ -106,5 +96,3 @@ int main() return 0; } - -#endif /* defined(_AIX) */ diff --git a/none/tests/mremap.stderr.exp b/none/tests/linux/mremap.stderr.exp similarity index 100% rename from none/tests/mremap.stderr.exp rename to none/tests/linux/mremap.stderr.exp diff --git a/none/tests/mremap.stderr.exp-glibc27 b/none/tests/linux/mremap.stderr.exp-glibc27 similarity index 100% rename from none/tests/mremap.stderr.exp-glibc27 rename to none/tests/linux/mremap.stderr.exp-glibc27 diff --git a/none/tests/mremap.stdout.exp b/none/tests/linux/mremap.stdout.exp similarity index 100% rename from none/tests/mremap.stdout.exp rename to none/tests/linux/mremap.stdout.exp diff --git a/none/tests/mremap.vgtest b/none/tests/linux/mremap.vgtest similarity index 100% rename from none/tests/mremap.vgtest rename to none/tests/linux/mremap.vgtest diff --git a/none/tests/mremap2.c b/none/tests/linux/mremap2.c similarity index 96% rename from none/tests/mremap2.c rename to none/tests/linux/mremap2.c index 8bef831944..0d932dd44d 100644 --- a/none/tests/mremap2.c +++ b/none/tests/linux/mremap2.c @@ -2,16 +2,6 @@ #include -#if defined(_AIX) - -int main ( void ) -{ - printf("This test is Linux-specific.\n"); - return 0; -} - -#else - #include #include #include @@ -172,5 +162,3 @@ int main ( void ) } return 0; } - -#endif /* defined(_AIX5) */ diff --git a/none/tests/mremap2.stderr.exp b/none/tests/linux/mremap2.stderr.exp similarity index 100% rename from none/tests/mremap2.stderr.exp rename to none/tests/linux/mremap2.stderr.exp diff --git a/none/tests/mremap2.stdout.exp b/none/tests/linux/mremap2.stdout.exp similarity index 100% rename from none/tests/mremap2.stdout.exp rename to none/tests/linux/mremap2.stdout.exp diff --git a/none/tests/mremap2.stdout.exp-glibc28-amd64 b/none/tests/linux/mremap2.stdout.exp-glibc28-amd64 similarity index 100% rename from none/tests/mremap2.stdout.exp-glibc28-amd64 rename to none/tests/linux/mremap2.stdout.exp-glibc28-amd64 diff --git a/none/tests/mremap2.stdout.exp2 b/none/tests/linux/mremap2.stdout.exp2 similarity index 100% rename from none/tests/mremap2.stdout.exp2 rename to none/tests/linux/mremap2.stdout.exp2 diff --git a/none/tests/linux/mremap2.vgtest b/none/tests/linux/mremap2.vgtest new file mode 100644 index 0000000000..0e88835dce --- /dev/null +++ b/none/tests/linux/mremap2.vgtest @@ -0,0 +1,2 @@ +prog: mremap2 +stdout_filter: ../../../tests/filter_addresses diff --git a/none/tests/mremap2.vgtest b/none/tests/mremap2.vgtest deleted file mode 100644 index 9120adcf9f..0000000000 --- a/none/tests/mremap2.vgtest +++ /dev/null @@ -1,2 +0,0 @@ -prog: mremap2 -stdout_filter: ../../tests/filter_addresses