[sanitizer_common][tests] Skip MemoryMapping::ParseUnixMemoryProfile … (#212114)

…etc. on NetBSD

The `Sanitizer-x86_64-Test` test doesn't link on NetBSD/amd64 10.1:

```
/usr/bin/ld: /usr/bin/ld: DWARF error: invalid or unhandled FORM value: 0x25
SANITIZER_TEST_OBJECTS.sanitizer_procmaps_test.cpp.x86_64.o: in function `__sanitizer::MemoryMapping_ParseUnixMemoryProfile_Test::TestBody()':
sanitizer_procmaps_test.cpp:(.text._ZN11__sanitizer41MemoryMapping_ParseUnixMemoryProfile_Test8TestBodyEv+0x52): undefined reference to `__sanitizer::ParseUnixMemoryProfile(void (*)(unsigned long, unsigned long, bool, unsigned long*), unsigned long*, char*, unsigned long)'
/usr/bin/ld: SANITIZER_TEST_OBJECTS.sanitizer_procmaps_test.cpp.x86_64.o: in function `__sanitizer::MemoryMapping_ParseUnixMemoryProfileTruncated_Test::TestBody()':
sanitizer_procmaps_test.cpp:(.text._ZN11__sanitizer50MemoryMapping_ParseUnixMemoryProfileTruncated_Test8TestBodyEv+0x17a): undefined reference to `__sanitizer::ParseUnixMemoryProfile(void (*)(unsigned long, unsigned long, bool, unsigned long*), unsigned long*, char*, unsigned long)'

```

Fixed by skipping the affected subtest.

Tested on `amd64-pc-netbsd10.1` and `x86_64-pc-linux-gnu`.

(cherry picked from commit 0cc7159125)
This commit is contained in:
Rainer Orth 2026-07-27 09:54:12 +02:00 committed by Tobias Hieta
parent 8eddfe681b
commit 38550ff6ae
No known key found for this signature in database
GPG key ID: 44F2485E45D59042

View file

@ -90,6 +90,8 @@ Size: 12 kB
Rss: 12 kB
)";
# if !SANITIZER_NETBSD
// Test fails to link with NetBSD 10.1 /usr/bin/ld.
TEST(MemoryMapping, ParseUnixMemoryProfile) {
struct entry {
uptr p;
@ -133,6 +135,7 @@ TEST(MemoryMapping, ParseUnixMemoryProfileTruncated) {
UnmapOrDie(mem, 2 * page);
}
# endif
# endif
} // namespace __sanitizer
#endif // !defined(_WIN32)