]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Increase test coverage on OS X, by re-enabling the none/tests/*/movbe regression...
authorRhys Kidd <rhyskidd@gmail.com>
Sat, 15 Aug 2015 10:47:55 +0000 (10:47 +0000)
committerRhys Kidd <rhyskidd@gmail.com>
Sat, 15 Aug 2015 10:47:55 +0000 (10:47 +0000)
n-i-bz

$ perl tests/vg_regtest none/tests/x86/movbe none/tests/amd64/movbe
movbe:           valgrind   -q ./movbe
movbe:           valgrind   -q ./movbe

== 2 tests, 0 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures ==

On OS X 10.10

Before:

== 592 tests, 215 stderr failures, 9 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==

After:

== 594 tests, 215 stderr failures, 9 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15549

none/tests/amd64/Makefile.am
none/tests/amd64/movbe.c
none/tests/x86/Makefile.am
none/tests/x86/movbe.c
tests/malloc.h

index 53acc502200307fb0558d3b8131fef9043469af2..e1fff6c022f9b9d48c997cee49176d1ef79d2b4a 100644 (file)
@@ -111,6 +111,9 @@ endif
 if BUILD_LZCNT_TESTS
  check_PROGRAMS += lzcnt64
 endif
+if BUILD_MOVBE_TESTS
+ check_PROGRAMS += movbe
+endif
 if BUILD_SSE42_TESTS
  check_PROGRAMS += \
        pcmpstr64 pcmpxstrx64 sse4-64 crc32 aes \
@@ -144,9 +147,6 @@ if ! VGCONF_OS_IS_DARWIN
 if BUILD_LOOPNEL_TESTS
    check_PROGRAMS += loopnel
 endif
-if BUILD_MOVBE_TESTS
-   check_PROGRAMS += movbe
-endif
 if BUILD_AVX_TESTS
 if BUILD_VPCLMULQDQ_TESTS
    check_PROGRAMS += avx-1
index 4b23696b8146a6317e2df8a519ffd279dbcfe24d..603e140cbfa2e2d18c65fc2b991ec45a1d60a2c4 100644 (file)
@@ -2,7 +2,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <assert.h>
-#include <malloc.h>
+#include "tests/malloc.h"
 
 typedef  unsigned char           UChar;
 typedef  unsigned int            UInt;
@@ -43,7 +43,7 @@ void randBlock ( Block* b )
     \
     __attribute__ ((noinline)) static void test_##_name ( void )   \
     { \
-       Block* b = memalign(32, sizeof(Block)); \
+       Block* b = memalign32(sizeof(Block)); \
        randBlock(b); \
        printf("%s\n", #_name); \
        showBlock("before", b); \
index b0d10ef6831bc2f1a3568cc1f40f218be168a10a..15d1e3e77bfc98327185c6c2695cd4fd9c8a63cb 100644 (file)
@@ -119,10 +119,10 @@ endif
 if BUILD_LZCNT_TESTS
  check_PROGRAMS += lzcnt32
 endif
-if !VGCONF_OS_IS_DARWIN
 if BUILD_MOVBE_TESTS
  check_PROGRAMS += movbe
+ check_PROGRAMS += movbe
 endif
+if !VGCONF_OS_IS_DARWIN
 if !SOLARIS_SUN_STUDIO_AS
 # Sun Studio assembler fails to assemble the bound instruction
  check_PROGRAMS += faultstatus
index d4f49536b036a81f5cd0006f2fdc2415f24620f2..8821462f92ce04a5ed7ea43c4e0668bf79172dac 100644 (file)
@@ -2,7 +2,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <assert.h>
-#include <malloc.h>
+#include "tests/malloc.h"
 
 typedef  unsigned char           UChar;
 typedef  unsigned int            UInt;
@@ -43,7 +43,7 @@ void randBlock ( Block* b )
     \
     __attribute__ ((noinline)) static void test_##_name ( void )   \
     { \
-       Block* b = memalign(32, sizeof(Block)); \
+       Block* b = memalign32(sizeof(Block)); \
        randBlock(b); \
        printf("%s\n", #_name); \
        showBlock("before", b); \
index 0179b387cc393937cf8ab2bb73a625a82ff8325a..6a73dde1a9d9ff1244f0cf9da7220c872f4d8f7d 100644 (file)
@@ -23,5 +23,21 @@ static void* memalign16(size_t szB)
    assert(x);
    assert(0 == ((16-1) & (unsigned long)x));
    return x;
-} 
+}
+
+// Allocates a 32-aligned block.  Asserts if the allocation fails.
+__attribute__((unused))
+static void* memalign32(size_t szB)
+{
+   void* x;
+#if defined(VGO_darwin)
+   // Darwin lacks memalign
+   posix_memalign((void **)&x, 32, szB);
+#else
+   x = memalign(32, szB);
+#endif
+   assert(x);
+   assert(0 == ((32-1) & (unsigned long)x));
+   return x;
+}