asan_test_utils.h revision 48ddbef1d051875b2d0b204e8d78300b58d80a85
1//===-- asan_test_utils.h ---------------------------------------*- C++ -*-===//
2//
3//                     The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file is a part of AddressSanitizer, an address sanity checker.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef ASAN_TEST_UTILS_H
15#define ASAN_TEST_UTILS_H
16
17#if !defined(ASAN_EXTERNAL_TEST_CONFIG)
18# define INCLUDED_FROM_ASAN_TEST_UTILS_H
19# include "asan_test_config.h"
20# undef INCLUDED_FROM_ASAN_TEST_UTILS_H
21#endif
22
23#include "sanitizer_common/tests/sanitizer_test_utils.h"
24
25// Check that pthread_create/pthread_join return success.
26#define PTHREAD_CREATE(a, b, c, d) ASSERT_EQ(0, pthread_create(a, b, c, d))
27#define PTHREAD_JOIN(a, b) ASSERT_EQ(0, pthread_join(a, b))
28
29#endif  // ASAN_TEST_UTILS_H
30