From dea87f345e7f02fb30fd1b17df198c180c03a9ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Lucas=20Golini?= Date: Fri, 24 Apr 2026 12:00:45 -0300 Subject: [PATCH] Disable ASAN leak detection when run unit-tests with `xvfb-run` (because the tool leaks all X11 windows). --- .agent/rules/unit-tests.md | 2 +- projects/scripts/run_gdb_tests.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.agent/rules/unit-tests.md b/.agent/rules/unit-tests.md index a4160833d..f9d2425f1 100644 --- a/.agent/rules/unit-tests.md +++ b/.agent/rules/unit-tests.md @@ -9,7 +9,7 @@ The test binary manages its own current working directory, so you can execute it `bin/unit_tests/eepp-unit_tests-debug` * **Linux & FreeBSD Execution (Required for Desktop Environments):** Tests open ~50 individual windows. To prevent disrupting the desktop environment, run them in an isolated framebuffer using `xvfb-run`: - `xvfb-run -a -s "-screen 0 1280x1024x24" bin/unit_tests/eepp-unit_tests-debug` + `ASAN_OPTIONS=detect_leaks=0 xvfb-run -a -s "-screen 0 1280x1024x24" bin/unit_tests/eepp-unit_tests-debug` * **Filtering Tests:** Use the `--filter` parameter to run specific tests (supports glob patterns). *Example (runs all tests with "Offset" in the name):* diff --git a/projects/scripts/run_gdb_tests.sh b/projects/scripts/run_gdb_tests.sh index 0c0c5f2e1..84708d8c3 100755 --- a/projects/scripts/run_gdb_tests.sh +++ b/projects/scripts/run_gdb_tests.sh @@ -5,7 +5,7 @@ cd ../../bin/unit_tests echo "=== Running eepp unit tests under GDB (xvfb) ===" -xvfb-run -s "-screen 0 1280x1024x24" \ +ASAN_OPTIONS=detect_leaks=0 xvfb-run -s "-screen 0 1280x1024x24" \ gdb --batch --quiet --return-child-result \ -ex "set confirm off" \ -ex "set print thread-events off" \