summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--automation/taskcluster/docker-fuzz/setup.sh3
-rw-r--r--automation/taskcluster/graph/src/extend.js2
-rwxr-xr-xbuild.sh2
-rw-r--r--coreconf/config.gypi1
-rw-r--r--gtests/freebl_gtest/freebl_gtest.gyp8
-rw-r--r--gtests/freebl_gtest/mpi_unittest.cc2
-rw-r--r--lib/freebl/freebl.gyp2
7 files changed, 13 insertions, 7 deletions
diff --git a/automation/taskcluster/docker-fuzz/setup.sh b/automation/taskcluster/docker-fuzz/setup.sh
index f84614ab5..7b53316ba 100644
--- a/automation/taskcluster/docker-fuzz/setup.sh
+++ b/automation/taskcluster/docker-fuzz/setup.sh
@@ -19,9 +19,6 @@ apt_packages+=('ninja-build')
apt_packages+=('pkg-config')
apt_packages+=('zlib1g-dev')
-# ct-verif and sanitizers
-apt_packages+=('valgrind')
-
# Latest Mercurial.
apt_packages+=('mercurial')
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 41BD8711B1F0EC2B0D85B91CF59CE3A8323293EE
diff --git a/automation/taskcluster/graph/src/extend.js b/automation/taskcluster/graph/src/extend.js
index 1468c2750..25f2e3f2b 100644
--- a/automation/taskcluster/graph/src/extend.js
+++ b/automation/taskcluster/graph/src/extend.js
@@ -368,7 +368,7 @@ async function scheduleTestBuilds() {
"/bin/bash",
"-c",
"bin/checkout.sh && " +
- "nss/automation/taskcluster/scripts/build_gyp.sh -g -v --test"
+ "nss/automation/taskcluster/scripts/build_gyp.sh -g -v --test --ct-verif"
],
artifacts: {
public: {
diff --git a/build.sh b/build.sh
index f5f4fdff0..003e1b324 100755
--- a/build.sh
+++ b/build.sh
@@ -36,6 +36,7 @@ NSS build tool options:
--test ignore map files and export everything we have
--fuzz enable fuzzing mode. this always enables test builds
--pprof build with gperftool support
+ --ct-verif build with valgrind for ct-verif
--scan-build run the build with scan-build (scan-build has to be in the path)
--scan-build=/out/path sets the output path for scan-build
--asan do an asan build
@@ -103,6 +104,7 @@ while [ $# -gt 0 ]; do
--sancov) enable_sancov ;;
--sancov=?*) enable_sancov "${1#*=}" ;;
--pprof) gyp_params+=(-Duse_pprof=1) ;;
+ --ct-verif) gyp_params+=(-Dct_verif=1) ;;
*) show_help; exit 2 ;;
esac
shift
diff --git a/coreconf/config.gypi b/coreconf/config.gypi
index ed063c60d..b531239cf 100644
--- a/coreconf/config.gypi
+++ b/coreconf/config.gypi
@@ -105,6 +105,7 @@
'fuzz%': 0,
'sign_libs%': 1,
'use_pprof%': 0,
+ 'ct_verif%': 0,
'nss_public_dist_dir%': '<(nss_dist_dir)/public',
'nss_private_dist_dir%': '<(nss_dist_dir)/private',
},
diff --git a/gtests/freebl_gtest/freebl_gtest.gyp b/gtests/freebl_gtest/freebl_gtest.gyp
index 730520fca..bda380686 100644
--- a/gtests/freebl_gtest/freebl_gtest.gyp
+++ b/gtests/freebl_gtest/freebl_gtest.gyp
@@ -19,8 +19,12 @@
'<(DEPTH)/lib/freebl/freebl.gyp:<(freebl_name)',
'<(DEPTH)/gtests/google_test/google_test.gyp:gtest',
],
- 'defines': [
- 'CT_VERIF',
+ 'conditions': [
+ [ 'ct_verif==1', {
+ 'defines': [
+ 'CT_VERIF',
+ ],
+ }],
],
}
],
diff --git a/gtests/freebl_gtest/mpi_unittest.cc b/gtests/freebl_gtest/mpi_unittest.cc
index c6e140492..d465d5c5a 100644
--- a/gtests/freebl_gtest/mpi_unittest.cc
+++ b/gtests/freebl_gtest/mpi_unittest.cc
@@ -83,8 +83,10 @@ TEST_F(MPITest, MpiCmpConstTest) {
"FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632550"),
16);
+#ifdef CT_VERIF
mp_taint(&b);
mp_taint(&c);
+#endif
uint32_t runs = 5000000;
uint32_t time_b = 0, time_c = 0;
diff --git a/lib/freebl/freebl.gyp b/lib/freebl/freebl.gyp
index a98a999f8..dc2d5f896 100644
--- a/lib/freebl/freebl.gyp
+++ b/lib/freebl/freebl.gyp
@@ -233,7 +233,7 @@
'UNSAFE_FUZZER_MODE',
],
}],
- [ 'test_build==1', {
+ [ 'ct_verif==1', {
'defines': [
'CT_VERIF',
],