Skip to content

Commit

Permalink
tests: Document linearizability tests
Browse files Browse the repository at this point in the history
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
  • Loading branch information
serathius committed Nov 23, 2022
1 parent 51c0b4d commit a115242
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/linearizability.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
with:
go-version: "1.19.3"
- run: |
pushd tools/mod; go install go.etcd.io/gofail; popd
make install-gofail
mkdir -p /tmp/linearizability
FAILPOINTS=true make build
cat server/etcdserver/raft.fail.go
Expand Down
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@ verify-proto-annotations:
verify-genproto:
PASSES="genproto" ./scripts/test.sh

# Install dependencies

install-gofail:
cd tools/mod; go install go.etcd.io/gofail


# Cleanup

Expand Down
24 changes: 24 additions & 0 deletions tests/linearizability/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# etcd Linearizability Testing

This directory consists of etcd linearizability tests, that validate the correct
behavior of etcd under various system and network malfunctions.

This is done by comparing how real etcd cluster behaves versus an in memory model of etcd.
During the test we continuously inject different types of failures and validate etcd correctness.

TODO: How linearizability is used to validate tests

## Run locally

1. Build etcd with failpoints (can be skipped if you )
```bash
make install-gofail
FAILPOINTS=true make build
```
2. Run linearizability tests

```bash
make test-linearizability
```

TODO: How to validate results

0 comments on commit a115242

Please sign in to comment.