Skip to content

Commit 597c668

Browse files
committed
Enable Jepsen tests for RR
Signed-off-by: Mark Hannum <[email protected]>
1 parent d18b3cc commit 597c668

File tree

18 files changed

+530
-51
lines changed

18 files changed

+530
-51
lines changed

cdb2jdbc/Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# shortcut for building jdbc driver via make
22
BASEDIR:=$(realpath ..)
33
VERSION?=$(shell grep ^comdb2 ../pkg/changelog | sed 's/^comdb2 .//; s/-.*//g')
4+
MVNFLAGS?=$(shell echo "${COMDB2_MVN_FLAGS}")
45

56
.PHONY: jdbc
67
MAVEN_VER := $(shell mvn -version 2>/dev/null)
@@ -9,21 +10,21 @@ envSkipTests?='true'
910

1011
jdbc:
1112
ifdef MAVEN_VER
12-
+mvn package
13+
+mvn $(MVNFLAGS) package
1314
else
1415
$(error "Could not find maven")
1516
endif
1617

1718
clean:
1819
ifdef MAVEN_VER
19-
+mvn clean
20+
+mvn $(MVNFLAGS) clean
2021
else
2122
$(error "Could not find maven")
2223
endif
2324

2425
install: jdbc
2526
ifdef MAVEN_VER
26-
+mvn install
27+
+mvn $(MVNFLAGS) install
2728
else
2829
$(error "Could not find maven")
2930
endif

tests/TODO

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,6 @@ sc_resume
6060
DISABLED TESTS:
6161
async_sc_bench.test -- benchmark for paper
6262
halt_processor_tds.test -- requires a cluster
63-
jepsen_a6.test -- jepsen tests require java & root access
64-
jepsen_a6_nemesis.test
65-
jepsen_atomic_writes.test
66-
jepsen_bank_nemesis.test
67-
jepsen_bank.test
68-
jepsen_dirty_reads.test
69-
jepsen_g2.test
70-
jepsen_register_nemesis.test
71-
jepsen_register.test
72-
jepsen_sets_nemesis.test
73-
jepsen_sets.test
7463
killcluster.test
7564
netloss.test -- does not pass most of the time; requires kernel 4.x & docker 17.x
7665
overflowblobs.test -- timesout

tests/docker/Dockerfile.install

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ RUN apt-get update && \
1212
gdb \
1313
git \
1414
iproute2 \
15+
iptables \
1516
iputils-ping \
1617
jq \
1718
libevent-dev \
@@ -29,10 +30,12 @@ RUN apt-get update && \
2930
libz-dev \
3031
lsof \
3132
make \
33+
maven \
3234
ncurses-dev \
3335
netcat-openbsd \
3436
net-tools \
3537
openssh-server \
38+
openjdk-11-jdk \
3639
protobuf-c-compiler \
3740
psmisc \
3841
pstack \
@@ -50,14 +53,18 @@ RUN apt-get update && \
5053

5154
COPY . /comdb2
5255

53-
RUN cd /comdb2 && \
56+
RUN export JAVA_HOME=$(dirname $(dirname $(readlink -f $(which java)))) && \
57+
export COMDB2_MVN_FLAGS="-Dhttp.proxyHost=devproxy.bloomberg.com -Dhttp.proxyPort=82 -Dhttps.proxyHost=devproxy.bloomberg.com -Dhttps.proxyPort=82" && \
58+
cd /comdb2/cdb2jdbc && \
59+
make install && \
60+
cd /comdb2 && \
5461
rm -rf build && \
5562
mkdir build && \
5663
cd build && \
5764
cmake -DWITH_TCL=1 -DCOMDB2_TEST=1 .. && \
5865
make -j4 && \
5966
make -j4 test-tools && \
60-
make install && \
67+
make install && \
6168
cp /comdb2/tests/docker/client / && \
6269
cp /comdb2/tests/docker/server / && \
6370
apt-get clean

tests/jepsen_a6.test/runit

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
# Runs the register linearizability test
44
#debug=1
55
#debug_trace="-D"
6-
export CDB2JDBC_STATEMENT_QUERYEFFECTS=1
7-
export CDB2JDBC_VERIFY_RETRY=0
6+
7+
. ${TESTSROOTDIR}/tools/jepsen_setup.sh
88

99
[[ "$debug" == 1 ]] && set -x
1010
needcluster=0
@@ -98,7 +98,7 @@ function runtestwithoptions
9898
export CDB2_CONFIG_FILE=${CDB2_CONFIG}
9999
(
100100
cd ${TESTSROOTDIR}/tools/linearizable/jepsen
101-
lein run test $testargs > $outfile 2>&1 < /dev/null
101+
$LEIN run test $testargs > $outfile 2>&1 < /dev/null
102102
r=$? ; [[ $r != 0 ]] && echo "XXX JEPSEN ERROR Lein test returns $r" >> $outfile
103103
)
104104
cat $outfile

tests/jepsen_a6_nemesis.test/runit

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
# Runs the register linearizability test
44
#debug=1
55
#debug_trace="-D"
6-
export CDB2JDBC_STATEMENT_QUERYEFFECTS=1
7-
export CDB2JDBC_VERIFY_RETRY=0
6+
7+
. ${TESTSROOTDIR}/tools/jepsen_setup.sh
88

99
[[ "$debug" == 1 ]] && set -x
1010
needcluster=0
@@ -98,7 +98,7 @@ function runtestwithoptions
9898
export CDB2_CONFIG_FILE=${CDB2_CONFIG}
9999
(
100100
cd ${TESTSROOTDIR}/tools/linearizable/jepsen
101-
lein run test $testargs > $outfile 2>&1 < /dev/null
101+
$LEIN run test $testargs > $outfile 2>&1 < /dev/null
102102
r=$? ; [[ $r != 0 ]] && echo "XXX JEPSEN ERROR Lein test returns $r" >> $outfile
103103
)
104104
cat $outfile

tests/jepsen_atomic_writes.test/runit

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
# Runs the register linearizability test
44
#debug=1
55
#debug_trace="-D"
6-
export CDB2JDBC_STATEMENT_QUERYEFFECTS=1
7-
export CDB2JDBC_VERIFY_RETRY=0
6+
7+
. ${TESTSROOTDIR}/tools/jepsen_setup.sh
88

99
[[ "$debug" == 1 ]] && set -x
1010
needcluster=0
@@ -98,7 +98,7 @@ function runtestwithoptions
9898
export CDB2_CONFIG_FILE=${CDB2_CONFIG}
9999
(
100100
cd ${TESTSROOTDIR}/tools/linearizable/jepsen
101-
lein run test $testargs > $outfile 2>&1 < /dev/null
101+
$LEIN run test $testargs > $outfile 2>&1 < /dev/null
102102
r=$? ; [[ $r != 0 ]] && echo "XXX JEPSEN ERROR Lein test returns $r" >> $outfile
103103
)
104104
cat $outfile

tests/jepsen_bank.test/runit

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
# Runs the register linearizability test
44
#debug=1
55
#debug_trace="-D"
6-
export CDB2JDBC_STATEMENT_QUERYEFFECTS=1
7-
export CDB2JDBC_VERIFY_RETRY=0
6+
7+
. ${TESTSROOTDIR}/tools/jepsen_setup.sh
88

99
[[ "$debug" == 1 ]] && set -x
1010
needcluster=0
@@ -97,7 +97,7 @@ function runtestwithoptions
9797
export CDB2_CONFIG_FILE=${CDB2_CONFIG}
9898
(
9999
cd ${TESTSROOTDIR}/tools/linearizable/jepsen
100-
lein run test $testargs > $outfile 2>&1 < /dev/null
100+
$LEIN run test $testargs > $outfile 2>&1 < /dev/null
101101
r=$? ; [[ $r != 0 ]] && echo "XXX JEPSEN ERROR Lein test returns $r" >> $outfile
102102
)
103103
cat $outfile

tests/jepsen_bank_nemesis.test/runit

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
# Runs the register linearizability test
44
#debug=1
55
#debug_trace="-D"
6-
export CDB2JDBC_STATEMENT_QUERYEFFECTS=1
7-
export CDB2JDBC_VERIFY_RETRY=0
6+
7+
. ${TESTSROOTDIR}/tools/jepsen_setup.sh
88

99
[[ "$debug" == 1 ]] && set -x
1010
needcluster=1
@@ -97,7 +97,7 @@ function runtestwithoptions
9797
export CDB2_CONFIG_FILE=${CDB2_CONFIG}
9898
(
9999
cd ${TESTSROOTDIR}/tools/linearizable/jepsen
100-
lein run test $testargs > $outfile 2>&1 < /dev/null
100+
$LEIN run test $testargs > $outfile 2>&1 < /dev/null
101101
r=$? ; [[ $r != 0 ]] && echo "XXX JEPSEN ERROR Lein test returns $r" >> $outfile
102102
)
103103
cat $outfile

tests/jepsen_dirty_reads.test/runit

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
# Runs the register linearizability test
44
#debug=1
55
#debug_trace="-D"
6-
export CDB2JDBC_STATEMENT_QUERYEFFECTS=1
7-
export CDB2JDBC_VERIFY_RETRY=0
6+
7+
. ${TESTSROOTDIR}/tools/jepsen_setup.sh
88

99
[[ "$debug" == 1 ]] && set -x
1010
needcluster=0
@@ -97,7 +97,7 @@ function runtestwithoptions
9797
export CDB2_CONFIG_FILE=${CDB2_CONFIG}
9898
(
9999
cd ${TESTSROOTDIR}/tools/linearizable/jepsen
100-
lein run test $testargs > $outfile 2>&1 < /dev/null
100+
$LEIN run test $testargs > $outfile 2>&1 < /dev/null
101101
r=$? ; [[ $r != 0 ]] && echo "XXX JEPSEN ERROR Lein test returns $r" >> $outfile
102102
)
103103
cat $outfile

tests/jepsen_g2.test/runit

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
# Runs the register linearizability test
44
#debug=1
55
#debug_trace="-D"
6-
export CDB2JDBC_STATEMENT_QUERYEFFECTS=1
7-
export CDB2JDBC_VERIFY_RETRY=0
6+
7+
. ${TESTSROOTDIR}/tools/jepsen_setup.sh
88

99
[[ "$debug" == 1 ]] && set -x
1010
needcluster=0
@@ -99,7 +99,7 @@ function runtestwithoptions
9999
export CDB2_CONFIG_FILE=${CDB2_CONFIG}
100100
(
101101
cd ${TESTSROOTDIR}/tools/linearizable/jepsen
102-
lein run test $testargs > $outfile 2>&1 < /dev/null
102+
$LEIN run test $testargs > $outfile 2>&1 < /dev/null
103103
r=$? ; [[ $r != 0 ]] && echo "XXX JEPSEN ERROR Lein test returns $r" >> $outfile
104104
)
105105
cat $outfile

0 commit comments

Comments
 (0)