Skip to content

Commit

Permalink
tests: Reproduce issue 14685
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 a4c6d1b commit 898ed88
Show file tree
Hide file tree
Showing 2 changed files with 29 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-issue14685
reproduce-issue14685: ./bin/etcd-v3.5.5-failpoints
cp ./bin/etcd-v3.5.5-failpoints ./bin/etcd
GO_TEST_FLAGS='-v --run=TestLinearizability/Issue14685 --count 100 --failfast' make test-linearizability

./bin/etcd-v3.5.5-failpoints:
rm -rf /tmp/etcd-release-v3.5.5/
mkdir -p /tmp/etcd-release-v3.5.5/
cd /tmp/etcd-release-v3.5.5/; \
git clone https://github.com/etcd-io/etcd.git .; \
git checkout v3.5.5; \
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.5/bin/etcd ./bin/etcd-v3.5.5-failpoints

# Cleanup

clean:
Expand Down
8 changes: 8 additions & 0 deletions tests/linearizability/linearizability_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,14 @@ func TestLinearizability(t *testing.T) {
e2e.WithGoFailEnabled(true),
),
},
{
name: "Issue14685",
failpoint: DefragBeforeCopyPanic,
config: *e2e.NewConfig(
e2e.WithClusterSize(1),
e2e.WithGoFailEnabled(true),
),
},
}
for _, tc := range tcs {
t.Run(tc.name, func(t *testing.T) {
Expand Down

0 comments on commit 898ed88

Please sign in to comment.