sanitizer_procmaps_test.cc revision 821acfaccc7d11b987e2882b022e8d167b0c8a54
1//===-- sanitizer_procmaps_test.cc ----------------------------------------===//
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 ThreadSanitizer/AddressSanitizer runtime.
11//
12//===----------------------------------------------------------------------===//
13#include "sanitizer_common/sanitizer_procmaps.h"
14//#include "sanitizer_common/sanitizer_internal_defs.h"
15//#include "sanitizer_common/sanitizer_libc.h"
16#include "gtest/gtest.h"
17
18namespace __sanitizer {
19
20#ifdef SANITIZER_LINUX
21TEST(ProcMaps, CodeRange) {
22  uptr start, end;
23  bool res = GetCodeRangeForFile("[vdso]", &start, &end);
24  EXPECT_EQ(res, true);
25  EXPECT_GT(start, (uptr)0);
26  EXPECT_LT(start, end);
27}
28#endif
29
30}  // namespace __sanitizer
31