testing: improve sanitizer handling