Skip to content

Commit

Permalink
Add script to quickly reproduce issue 14370
Browse files Browse the repository at this point in the history
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
  • Loading branch information
serathius committed Dec 7, 2022
1 parent 3e3be35 commit 46ee82d
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,27 @@ gofail-disable: install-gofail
install-gofail:
cd tools/mod; go install go.etcd.io/gofail@${GOFAIL_VERSION}

# Reproduce historical issues

.PHONY: reproduce-issue14370
reproduce-issue14370: ./bin/etcd-v3.5.4-failpoints
cp ./bin/etcd-v3.5.4-failpoints ./bin/etcd
GO_TEST_FLAGS='-v --run=TestLinearizability/Issue14370 --count 100 --failfast' make test-linearizability

./bin/etcd-v3.5.4-failpoints:
rm -rf /tmp/etcd-release-v3.5.4/
mkdir -p /tmp/etcd-release-v3.5.4/
cd /tmp/etcd-release-v3.5.4/; \
git clone https://github.com/etcd-io/etcd.git .; \
git checkout v3.5.4; \
go get go.etcd.io/gofail@${GOFAIL_VERSION}; \
(cd server; go get go.etcd.io/gofail@${GOFAIL_VERSION}); \
(cd etcdctl; go get go.etcd.io/gofail@${GOFAIL_VERSION}); \
(cd etcdutl; go get go.etcd.io/gofail@${GOFAIL_VERSION}); \
FAILPOINTS=true ./build;
mkdir -p ./bin
cp /tmp/etcd-release-v3.5.4/bin/etcd ./bin/etcd-v3.5.4-failpoints

# Cleanup

clean:
Expand Down

0 comments on commit 46ee82d

Please sign in to comment.