[compiler-rt] r226554 - [Msan] Fix the readlink unit test to pass on FreeBSD
Viktor Kutuzov
vkutuzov at accesssoftek.com
Tue Jan 20 01:57:28 PST 2015
Author: vkutuzov
Date: Tue Jan 20 03:57:28 2015
New Revision: 226554
URL: http://llvm.org/viewvc/llvm-project?rev=226554&view=rev
Log:
[Msan] Fix the readlink unit test to pass on FreeBSD
Differential Revision: http://reviews.llvm.org/D7052
Modified:
compiler-rt/trunk/lib/msan/tests/msan_test.cc
Modified: compiler-rt/trunk/lib/msan/tests/msan_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/msan/tests/msan_test.cc?rev=226554&r1=226553&r2=226554&view=diff
==============================================================================
--- compiler-rt/trunk/lib/msan/tests/msan_test.cc (original)
+++ compiler-rt/trunk/lib/msan/tests/msan_test.cc Tue Jan 20 03:57:28 2015
@@ -78,10 +78,12 @@
# define FILE_TO_READ "/bin/cat"
# define DIR_TO_READ "/bin"
# define SUBFILE_TO_READ "cat"
+# define SYMLINK_TO_READ "/usr/bin/tar"
#else
# define FILE_TO_READ "/proc/self/stat"
# define DIR_TO_READ "/proc/self"
# define SUBFILE_TO_READ "stat"
+# define SYMLINK_TO_READ "/proc/self/exe"
#endif
static const size_t kPageSize = 4096;
@@ -668,7 +670,7 @@ TEST(MemorySanitizer, DISABLED_ioctl) {
TEST(MemorySanitizer, readlink) {
char *x = new char[1000];
- readlink("/proc/self/exe", x, 1000);
+ readlink(SYMLINK_TO_READ, x, 1000);
EXPECT_NOT_POISONED(x[0]);
delete [] x;
}
More information about the llvm-commits
mailing list