OSDN Git Service

Migrate aslr test to gtest.
authordcashman <dcashman@google.com>
Mon, 7 Mar 2016 18:32:05 +0000 (10:32 -0800)
committerdcashman <dcashman@google.com>
Mon, 14 Mar 2016 17:42:31 +0000 (10:42 -0700)
commit16d6e19fcb5f50ad38a569253c1a4e6ea849e3b5
tree241b360fbe464510f5efa99f0a2cb4a266f5ea82
parent3fa224edef81d5bccc6522c8340118364e29b673
Migrate aslr test to gtest.

Create tests which test the values of mmap_rnd_bits, and
mmap_rnd_compat_bits, if applicable, and verify that the address space
is randomized as expected given the provided values.

Also add a pair of tests to CTS that enforce that the observed entropy
is at least as high as a designated value.  That value will start as our
default value, which also corresponds to the maximum value of some
configurations.

Packaging of executables along with a nativetest suite is not supported,
so add a dummy nativetest suite, scrape_mmap_addr, which ensure that the
executables are present along with the given tests at predictable
locations.

(cherry-pick of internal commit: d661642651a6689c76d3f575b4b5dbf04e6b75bd)

Bug: 26512380
Change-Id: I8c4a68f3d10a57f9a51bdc6084df622cf8517b51
tests/kernel.config/Android.mk
tests/kernel.config/aslr_rec_test.cpp [new file with mode: 0644]
tests/kernel.config/aslr_test.cpp [new file with mode: 0644]
tests/kernel.config/aslr_test.h [new file with mode: 0644]
tests/kernel.config/scrape_mmap_addr.cpp [new file with mode: 0644]