[PATCH] Add test suite for the Control Flow Integrity feature.
Peter Collingbourne
peter at pcc.me.uk
Fri Feb 20 11:21:59 PST 2015
================
Comment at: test/cfi/CMakeLists.txt:11
@@ +10,3 @@
+ clang
+ LLVMgold
+ not
----------------
samsonov wrote:
> Would this work if LLVM_BINUTILS_INCDIR is unavailable?
Probably not, fixed.
================
Comment at: test/cfi/lit.cfg:8
@@ +7,3 @@
+config.suffixes = ['.cpp']
+config.test_format = lit.formats.ShTest()
+config.test_source_root = config.compiler_rt_src_root + '/test/cfi'
----------------
samsonov wrote:
> This should be set in test/lit.common.cfg
Done
================
Comment at: test/cfi/lit.cfg:9
@@ +8,3 @@
+config.test_format = lit.formats.ShTest()
+config.test_source_root = config.compiler_rt_src_root + '/test/cfi'
+config.test_exec_root = config.compiler_rt_obj_root + '/test/cfi'
----------------
samsonov wrote:
> os.path.dirname(__file__)
> ?
Done
================
Comment at: test/cfi/lit.cfg:10
@@ +9,3 @@
+config.test_source_root = config.compiler_rt_src_root + '/test/cfi'
+config.test_exec_root = config.compiler_rt_obj_root + '/test/cfi'
+config.excludes = ['Inputs']
----------------
samsonov wrote:
> You probably don't need test_exec_root here.
Done
================
Comment at: test/cfi/lit.cfg:11
@@ +10,3 @@
+config.test_exec_root = config.compiler_rt_obj_root + '/test/cfi'
+config.excludes = ['Inputs']
+
----------------
samsonov wrote:
> There is no such directory at the moment
Done
================
Comment at: test/cfi/lit.cfg:29
@@ +28,3 @@
+
+config.substitutions.append((r"%clangxx ", config.llvm_obj_root + '/bin/clang++ '))
+
----------------
samsonov wrote:
> We have config.clang for that
Done
================
Comment at: test/cfi/lit.cfg:32
@@ +31,3 @@
+if sys.platform == 'darwin' and is_darwin_lto_supported():
+ config.substitutions.append((r"%clangxx_cfi ", 'env DYLD_LIBRARY_PATH=' + config.llvm_shlib_dir + ' ' + config.llvm_obj_root + '/bin/clang++ -fsanitize=cfi '))
+elif sys.platform.startswith('linux') and is_linux_lto_supported():
----------------
samsonov wrote:
> ditto
Done
================
Comment at: test/cfi/lit.cfg:38
@@ +37,3 @@
+
+config.substitutions.append((r"\bFileCheck\b", config.llvm_obj_root + '/bin/FileCheck'))
+config.substitutions.append((r"\bnot\b", config.llvm_obj_root + '/bin/not'))
----------------
samsonov wrote:
> This should be handled by lit.common.cfg as well: we add llvm_tools_dir to PATH
Done
http://reviews.llvm.org/D7738
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list