summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiels de Vos <ndevos@redhat.com>2018-11-15 13:31:40 +0100
committerNiels de Vos <ndevos@redhat.com>2018-11-27 10:25:21 +0100
commit957e7d7130b616b0e77d01cefcd6acca10914a4e (patch)
tree8844521c4c7e135672a18444b64cfa9d9bd80a97
parent3071bfd255cac21c4a2f270f0816bfa0c1121aee (diff)
Add job for running glusterfs regressions with TSAN
This is a copy of the job+script that are used for ASAN testing. Currently combining ASAN+TSAN in a single test-run is not an option, both libraries conflict with each other. Change-Id: Ie649a8f88be3e2aae949824903c490a64ea93e6e See-also: https://review.gluster.org/21641 # --enable-tsan option Updates: #543
-rw-r--r--build-gluster-org/jobs/tsan.yml41
-rw-r--r--build-gluster-org/scripts/tsan.sh30
2 files changed, 71 insertions, 0 deletions
diff --git a/build-gluster-org/jobs/tsan.yml b/build-gluster-org/jobs/tsan.yml
new file mode 100644
index 0000000..2125f79
--- /dev/null
+++ b/build-gluster-org/jobs/tsan.yml
@@ -0,0 +1,41 @@
+- job:
+ name: tsan
+ node: fedora
+ description: Threaded data corruption detector job for glusterfs
+ project-type: freestyle
+ concurrent: true
+
+ scm:
+ - glusterfs
+
+ properties:
+ - discard-after-x:
+ x: 30
+ - one-build-per-node
+
+ triggers:
+ - timed: "H 15 * * *"
+
+ builders:
+ - shell: !include-raw: ../scripts/tsan.sh
+
+ publishers:
+ - post-tasks:
+ - matches:
+ - log-text: Build was aborted
+ script: !include-raw: ../scripts/regression-abort.sh
+ - gluster-logs
+
+ parameters:
+ - string:
+ default: refs/heads/master
+ description: 'For review 12345 and patch set 6, this will be refs/changes/45/12345/6. Default: Tip of master'
+ name: GERRIT_REFSPEC
+ - string:
+ default: master
+ description: 'Name of the branch you want to build from. We usually build from master'
+ name: GERRIT_BRANCH
+
+ wrappers:
+ - timestamps
+
diff --git a/build-gluster-org/scripts/tsan.sh b/build-gluster-org/scripts/tsan.sh
new file mode 100644
index 0000000..5570bcb
--- /dev/null
+++ b/build-gluster-org/scripts/tsan.sh
@@ -0,0 +1,30 @@
+#!/bin/bash
+nproc=$(getconf _NPROCESSORS_ONLN)
+SRC=$(pwd);
+P=/build;
+
+sudo -E bash /opt/qa/cleanup.sh
+# Clean up other Gluster dirs
+sudo rm -rf /var/lib/glusterd/* /build/install /build/scratch >/dev/null 2>&1
+# Remove the many left over socket files in /var/run
+sudo rm -f /var/run/????????????????????????????????.socket >/dev/null 2>&1
+# Remove GlusterFS log files from previous runs
+sudo rm -rf /var/log/glusterfs/* /var/log/glusterfs/.cmd_log_history >/dev/null 2>&1
+JDIRS="/var/log/glusterfs /var/lib/glusterd /var/run/gluster /d /d/archived_builds /d/backends /d/build /d/logs /home/jenkins/root"
+sudo mkdir -p $JDIRS
+sudo chown jenkins:jenkins $JDIRS
+chmod 755 $JDIRS
+
+set -e
+./autogen.sh;
+rm -rf $P/scratch;
+mkdir -p $P/scratch;
+cd $P/scratch;
+rm -rf $P/install;
+$SRC/configure --prefix=$P/install --with-mountutildir=$P/install/sbin \
+ --with-initdir=$P/install/etc --localstatedir=/var \
+ --enable-debug --enable-gnfs --silent --enable-tsan
+make install -j ${nproc}
+cd $SRC;
+export TSAN_OPTIONS=log_path=/var/log/glusterfs/tsan-output.log
+sudo -E bash /opt/qa/regression.sh