From a78ee9f32299617b858b7f9fcddab9701a9e93c0 Mon Sep 17 00:00:00 2001 From: Diana Picus Date: Wed, 21 Sep 2016 10:06:37 +0000 Subject: [PATCH] Revert "[sanitizers] Update sanitizers test to better match glibc internals" This reverts commit r282061 because it broke the clang-cuda-build bot. llvm-svn: 282064 --- .../sanitizer_common/TestCases/Linux/sem_init_glibc.cc | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/compiler-rt/test/sanitizer_common/TestCases/Linux/sem_init_glibc.cc b/compiler-rt/test/sanitizer_common/TestCases/Linux/sem_init_glibc.cc index 50a40c419d39..193b33d7976d 100644 --- a/compiler-rt/test/sanitizer_common/TestCases/Linux/sem_init_glibc.cc +++ b/compiler-rt/test/sanitizer_common/TestCases/Linux/sem_init_glibc.cc @@ -13,14 +13,8 @@ defined(__s390x__) || defined(__sparc64__) || defined(__alpha__) || \ defined(__ia64__) || defined(__m68k__)) && __GLIBC_PREREQ(2, 21) typedef uint64_t semval_t; -#define GET_SEM_VALUE(V) (V) #else typedef unsigned semval_t; -#if __GLIBC_PREREQ(2, 21) -#define GET_SEM_VALUE(V) ((V) >> 1) -#else -#define GET_SEM_VALUE(V) (V) -#endif #endif void my_sem_init(bool priv, int value, semval_t *a, unsigned char *b) { @@ -40,10 +34,10 @@ int main() { unsigned char b; my_sem_init(false, 42, &a, &b); - assert(GET_SEM_VALUE(a) == 42); + assert(a == 42); assert(b != 0xAB); my_sem_init(true, 43, &a, &b); - assert(GET_SEM_VALUE(a) == 43); + assert(a == 43); assert(b != 0xAB); }