[PATCH] D70682: [scudo][standalone] Make tests work on Fuchsia
Kostya Kortchinsky via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 25 10:35:06 PST 2019
cryptoad created this revision.
cryptoad added reviewers: mcgrathr, phosek, hctim, pcc, eugenis, cferris.
Herald added subscribers: Sanitizers, jfb, srhines.
Herald added projects: Sanitizers, LLVM.
cryptoad updated this revision to Diff 230930.
cryptoad added a comment.
cryptoad updated this revision to Diff 230932.
Adding `allocator_config.h` to the diff.
cryptoad added a comment.
Adding the LLVM header to `scudo_unit_test.h`.
This CL makes unit tests compatible with Fuchsia's zxtest. This
required a few changes here and there, but also unearthed some
incompatibilities that had to be addressed.
A header is introduced to allow to account for the zxtest/gtest
differences, some `#if SCUDO_FUCHSIA` are used to disable incompatible
code (the 32-bit primary, or the exclusive TSD).
It also brought to my attention that I was using
`__scudo_default_options` in different tests, which ended up in a
single binary, and I am not sure how that ever worked. So move
this to the main cpp.
Additionally fully disable the secondary freelist on Fuchsia as we do
not track VMOs for secondary allocations, so no release possible.
With some modifications to Scudo's BUILD.gn in Fuchsia:
[==========] 79 tests from 23 test cases ran (10280 ms total).
[ PASSED ] 79 tests
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D70682
Files:
compiler-rt/lib/scudo/standalone/allocator_config.h
compiler-rt/lib/scudo/standalone/secondary.h
compiler-rt/lib/scudo/standalone/tests/atomic_test.cpp
compiler-rt/lib/scudo/standalone/tests/bytemap_test.cpp
compiler-rt/lib/scudo/standalone/tests/checksum_test.cpp
compiler-rt/lib/scudo/standalone/tests/chunk_test.cpp
compiler-rt/lib/scudo/standalone/tests/combined_test.cpp
compiler-rt/lib/scudo/standalone/tests/flags_test.cpp
compiler-rt/lib/scudo/standalone/tests/list_test.cpp
compiler-rt/lib/scudo/standalone/tests/map_test.cpp
compiler-rt/lib/scudo/standalone/tests/mutex_test.cpp
compiler-rt/lib/scudo/standalone/tests/primary_test.cpp
compiler-rt/lib/scudo/standalone/tests/quarantine_test.cpp
compiler-rt/lib/scudo/standalone/tests/release_test.cpp
compiler-rt/lib/scudo/standalone/tests/report_test.cpp
compiler-rt/lib/scudo/standalone/tests/scudo_unit_test.h
compiler-rt/lib/scudo/standalone/tests/scudo_unit_test_main.cpp
compiler-rt/lib/scudo/standalone/tests/secondary_test.cpp
compiler-rt/lib/scudo/standalone/tests/size_class_map_test.cpp
compiler-rt/lib/scudo/standalone/tests/stats_test.cpp
compiler-rt/lib/scudo/standalone/tests/strings_test.cpp
compiler-rt/lib/scudo/standalone/tests/tsd_test.cpp
compiler-rt/lib/scudo/standalone/tests/vector_test.cpp
compiler-rt/lib/scudo/standalone/tests/wrappers_c_test.cpp
compiler-rt/lib/scudo/standalone/tests/wrappers_cpp_test.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70682.230932.patch
Type: text/x-patch
Size: 24279 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191125/bca588cc/attachment.bin>
More information about the llvm-commits
mailing list