diff options
Diffstat (limited to 'CLAUDE.md')
| -rw-r--r-- | CLAUDE.md | 19 |
1 files changed, 18 insertions, 1 deletions
@@ -61,7 +61,7 @@ Existing certs live in `certs/`. Only regenerate if missing. ## Running -Each program takes a single argument: a configuration file. Example config files are in `config/`. Start programs in order in separate terminals from the project root: +Each program takes a configuration file and an optional log level: `<program> <config-file> [log-level]`. The log level defaults to `info`. Valid levels: `trace`, `debug`, `info`, `warning`, `error`, `fatal`. Example config files are in `config/`. Start programs in order in separate terminals from the project root: **1. Local Discovery Server (LDS)** @@ -163,6 +163,23 @@ Each test starts ServerLDS (port 14840) and ServerRegister (port 14841), runs Cl To add a new test case: create a directory under `tests/` with 3 config files (`server_lds.conf`, `server_register.conf`, `client_find_servers.conf`), then add a `"name;ExpectedPolicy"` entry to the `INTEGRATION_TESTS` list in `CMakeLists.txt`. +### Memory Leak Check (ASan) + +Rebuild with AddressSanitizer, then run the tests: + +```sh +cmake -B build -DCMAKE_C_FLAGS="-fsanitize=address -fno-omit-frame-pointer" -DCMAKE_EXE_LINKER_FLAGS="-fsanitize=address" +cmake --build build --parallel +ASAN_OPTIONS="detect_leaks=1" ctest --test-dir build --output-on-failure +``` + +Reconfigure without the flags afterwards to return to a normal build: + +```sh +cmake -B build -DCMAKE_C_FLAGS="" -DCMAKE_EXE_LINKER_FLAGS="" +cmake --build build --parallel +``` + ## Project Structure | Path | Purpose | |
