cmcfarlen commented on code in PR #13658:
URL: https://github.com/apache/trafficserver/pull/13658#discussion_r3973706147


##########
src/proxy/http/remap/unit-tests/CMakeLists.txt:
##########
@@ -94,7 +94,16 @@ if(NOT APPLE)
 endif()
 
 if(NOT APPLE)
-  add_catch2_test(NAME test_PluginDso COMMAND $<TARGET_FILE:test_PluginDso>)
+  add_catch2_test(
+    NAME
+    test_PluginDso
+    COMMAND
+    $<TARGET_FILE:test_PluginDso>
+    # Disable ODR violation caused by double definition inside a stub file 
libinknet_stub.cc
+    # see remap_test_dlopen_leak_suppression.txt for more info.
+    ENVIRONMENT
+    
"ASAN_OPTIONS=detect_odr_violation=0;LSAN_OPTIONS=suppressions=${CMAKE_CURRENT_SOURCE_DIR}/remap_test_dlopen_leak_suppression.txt"

Review Comment:
   Fixed in 0993e1446d — the three calls now share one variable:
   
   ```cmake
   # These tests dlopen plugins, and the stub file libinknet_stub.cc 
double-defines symbols.
   # Disable the resulting ODR violation report; see 
remap_test_dlopen_leak_suppression.txt.
   set(REMAP_DSO_TEST_ENVIRONMENT
       
"ASAN_OPTIONS=detect_odr_violation=0;LSAN_OPTIONS=suppressions=${CMAKE_CURRENT_SOURCE_DIR}/remap_test_dlopen_leak_suppression.txt"
   )
   ```
   
   Since these three registrations are `if(NOT APPLE)` and I develop on macOS, 
I verified the extra variable indirection doesn't perturb the list handling by 
applying the identical pattern to a macOS-built target and checking the 
generated command — both variables still arrive separately:
   
   ```
   cmake -E env ASAN_OPTIONS=detect_odr_violation=0 
LSAN_OPTIONS=suppressions=.../esi_test_leak_suppression.txt .../test_docnode 
'esi docnode test'
   ```
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to