summaryrefslogtreecommitdiff
path: root/test/sanitizer_common/TestCases/Linux/sem_init_glibc.cc
diff options
context:
space:
mode:
authorDiana Picus <diana.picus@linaro.org>2016-09-21 10:06:37 +0000
committerDiana Picus <diana.picus@linaro.org>2016-09-21 10:06:37 +0000
commit1d7390eea36b7deee5c5c19e3a88803a322e5f92 (patch)
tree21a8bc951f81e36c056e8bf0836cbce34ed05b0f /test/sanitizer_common/TestCases/Linux/sem_init_glibc.cc
parentcf00ba7f74a93a10bc679cddd4195690f1d0153e (diff)
Revert "[sanitizers] Update sanitizers test to better match glibc internals"
This reverts commit r282061 because it broke the clang-cuda-build bot. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@282064 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/sanitizer_common/TestCases/Linux/sem_init_glibc.cc')
-rw-r--r--test/sanitizer_common/TestCases/Linux/sem_init_glibc.cc10
1 files changed, 2 insertions, 8 deletions
diff --git a/test/sanitizer_common/TestCases/Linux/sem_init_glibc.cc b/test/sanitizer_common/TestCases/Linux/sem_init_glibc.cc
index 50a40c419..193b33d79 100644
--- a/test/sanitizer_common/TestCases/Linux/sem_init_glibc.cc
+++ b/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);
}