From b43886b081031983078cfac0b35a4c02f84e88b7 Mon Sep 17 00:00:00 2001 From: David Justo Date: Wed, 15 Jan 2025 18:42:27 -0800 Subject: [PATCH 1/5] Add subtle reminder ASan tests also need to run inside the `\out\` directory. --- README.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index de703daad4..2b4bd209f1 100644 --- a/README.md +++ b/README.md @@ -414,19 +414,17 @@ set PATH=C:\STL\out\x64\out\bin\amd64;%PATH% You don't need any extra steps to run with test code and the code in STL headers instrumented with [ASan][]. The test matrices include both ASan and non-ASan configurations. -However, to instrument the separately-compiled code (the DLL, the satellites, the [Import Library][] - everything that's -in `/stl/src`), you need to build the STL with ASan. Change the build steps to add `-DSTL_ASAN_BUILD=ON`: +However, to instrument the separately-compiled code (the DLL, the satellites, the [Import Library][] - everything that's in `/stl/src`), you need to build the STL with ASan. Change the build steps to add `-DSTL_ASAN_BUILD=ON`: ``` cmake --preset x64 -DSTL_ASAN_BUILD=ON cmake --build --preset x64 ``` -ASan-instrumented STL binaries require that the executable be instrumented as well, so you'll have to skip the non-ASan -configurations by passing `-Dtags=ASAN` to `stl-lit.py`: +ASan-instrumented STL binaries require that the executable be instrumented as well, so you'll have to skip the non-ASan configurations by passing `-Dtags=ASAN` to `stl-lit.py`: ``` -python tests\utils\stl-lit\stl-lit.py ..\..\tests\std\tests\VSO_0000000_vector_algorithms -Dtags=ASAN -v +C:\STL\out\x64> python tests\utils\stl-lit\stl-lit.py ..\..\tests\std\tests\VSO_0000000_vector_algorithms -Dtags=ASAN -v ``` # Benchmarking From 3a9b91cee52821f62656c1b705e780d170496f50 Mon Sep 17 00:00:00 2001 From: David Justo Date: Thu, 16 Jan 2025 10:08:13 -0800 Subject: [PATCH 2/5] Update README.md Co-authored-by: Casey Carter --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2b4bd209f1..63ef5b121b 100644 --- a/README.md +++ b/README.md @@ -412,7 +412,7 @@ set PATH=C:\STL\out\x64\out\bin\amd64;%PATH% ## Running Tests With Address Sanitizer (ASan) You don't need any extra steps to run with test code and the code in STL headers instrumented with [ASan][]. -The test matrices include both ASan and non-ASan configurations. +The test matrices include both ASan and non-ASan configurations if you don't pass `-Dtags=ASAN` or `-Dnotags=ASAN` to exclude one or the other. However, to instrument the separately-compiled code (the DLL, the satellites, the [Import Library][] - everything that's in `/stl/src`), you need to build the STL with ASan. Change the build steps to add `-DSTL_ASAN_BUILD=ON`: From 33178c8c7e8b9419dbe632622a16fa8efa49b21a Mon Sep 17 00:00:00 2001 From: David Justo Date: Thu, 16 Jan 2025 11:09:24 -0800 Subject: [PATCH 3/5] Update README.md Co-authored-by: Casey Carter --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 63ef5b121b..21bdc2a9a1 100644 --- a/README.md +++ b/README.md @@ -424,7 +424,7 @@ cmake --build --preset x64 ASan-instrumented STL binaries require that the executable be instrumented as well, so you'll have to skip the non-ASan configurations by passing `-Dtags=ASAN` to `stl-lit.py`: ``` -C:\STL\out\x64> python tests\utils\stl-lit\stl-lit.py ..\..\tests\std\tests\VSO_0000000_vector_algorithms -Dtags=ASAN -v +python out\x64\tests\utils\stl-lit\stl-lit.py tests\std\tests\VSO_0000000_vector_algorithms -Dtags=ASAN -v ``` # Benchmarking From d8a4b8c4ef3a1b0c03e7f88722678eca4a5eb8ce Mon Sep 17 00:00:00 2001 From: David Justo Date: Thu, 16 Jan 2025 11:13:50 -0800 Subject: [PATCH 4/5] add deliberate line-wrapping --- README.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 21bdc2a9a1..78071a3597 100644 --- a/README.md +++ b/README.md @@ -412,16 +412,19 @@ set PATH=C:\STL\out\x64\out\bin\amd64;%PATH% ## Running Tests With Address Sanitizer (ASan) You don't need any extra steps to run with test code and the code in STL headers instrumented with [ASan][]. -The test matrices include both ASan and non-ASan configurations if you don't pass `-Dtags=ASAN` or `-Dnotags=ASAN` to exclude one or the other. +The test matrices include both ASan and non-ASan configurations if you don't pass `-Dtags=ASAN` or `-Dnotags=ASAN` +to exclude one or the other. -However, to instrument the separately-compiled code (the DLL, the satellites, the [Import Library][] - everything that's in `/stl/src`), you need to build the STL with ASan. Change the build steps to add `-DSTL_ASAN_BUILD=ON`: +However, to instrument the separately-compiled code (the DLL, the satellites, the [Import Library][] - everything that's +in `/stl/src`), you need to build the STL with ASan. Change the build steps to add `-DSTL_ASAN_BUILD=ON`: ``` cmake --preset x64 -DSTL_ASAN_BUILD=ON cmake --build --preset x64 ``` -ASan-instrumented STL binaries require that the executable be instrumented as well, so you'll have to skip the non-ASan configurations by passing `-Dtags=ASAN` to `stl-lit.py`: +ASan-instrumented STL binaries require that the executable be instrumented as well, so you'll have to skip the non-ASan +configurations by passing `-Dtags=ASAN` to `stl-lit.py`: ``` python out\x64\tests\utils\stl-lit\stl-lit.py tests\std\tests\VSO_0000000_vector_algorithms -Dtags=ASAN -v From 99033e86046ec6bdeb84123cd406e9ccfc42eef3 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Fri, 17 Jan 2025 12:40:33 -0800 Subject: [PATCH 5/5] Consistently depict tests as being run from out\x64. --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 78071a3597..08072cadad 100644 --- a/README.md +++ b/README.md @@ -426,8 +426,10 @@ cmake --build --preset x64 ASan-instrumented STL binaries require that the executable be instrumented as well, so you'll have to skip the non-ASan configurations by passing `-Dtags=ASAN` to `stl-lit.py`: +(This example assumes that your current directory is `C:\Dev\STL\out\x64`.) + ``` -python out\x64\tests\utils\stl-lit\stl-lit.py tests\std\tests\VSO_0000000_vector_algorithms -Dtags=ASAN -v +python tests\utils\stl-lit\stl-lit.py ..\..\tests\std\tests\VSO_0000000_vector_algorithms -Dtags=ASAN -v ``` # Benchmarking