Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,15 @@ test/dohd_base64_test
# Tags file
tags

# Test binaries
test/dohd_url64_test
test/dohd_url64_extended_test
test/dohd_heap_test
test/dohd_dns_parser_test
test/dohd_mempool_test

# Generated test certificates
test/*.crt
test/*.key
test/*.pem

39 changes: 37 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ asan:

clean:
make -C src clean
make -C test clean

docker-build:
docker build -f devops/Dockerfile . -t dyne/dohd:${VERSION}
Expand All @@ -23,9 +24,40 @@ docker-build-alpine:
docker-run:
docker run -it -p 8053:8053 dyne/dohd:${VERSION} ${CMD}

# Run all unit tests
check:
make -C test
./test/dohd_url64_test
make -C test check

# Run unit tests with ASAN (for leak detection)
check-asan: asan
make -C test check

# Run integration tests (requires running dohd instance)
check-integration:
make -C test integration

# Run valgrind leak detection test
check-valgrind:
make -C test valgrind

# Stress tests (auto-launch dohd, bombard until failure)
stress:
make -C test stress

stress-escalate:
make -C test stress-escalate

stress-flood:
make -C test stress-flood

stress-chaos:
make -C test stress-chaos

stress-all:
make -C test stress-all

stress-asan:
make -C test stress-asan

# requires https://github.com/DNS-OARC/flamethrower
# default upstream GENERATOR: -g randomlabel lblsize=10 lblcount=4 count=1000
Expand All @@ -39,3 +71,6 @@ check-flame:

site:
npx docsify-cli serve ./docs

.PHONY: build debug dmalloc asan clean docker-build docker-build-alpine docker-run \
check check-asan check-integration check-valgrind check-flame site
2 changes: 1 addition & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ asan: CFLAGS+=-fsanitize=address
asan: LDFLAGS+=-fsanitize=address
asan: dohd

dohd: url64.o libevquick.o dohd.o
dohd: url64.o libevquick.o mempool.o dohd.o
gcc -o $@ $^ $(LDFLAGS)
clean:
rm -f *.o dohd
Loading