libhwbinder: add TREBLE_TESTING_OVERRIDE to tests

These environmental variables disable a check that modules which
are registered are also defined in the device manifest. Since
these tests register services themselves and the services are only
on the device if it is being tested, we want to enable this
override.

Explanation of override:
This means that you must set TREBLE_TESTING_OVERRIDE when running a test such
as hidl_test. Ideally these binaries set this value themselves. This allows
test modules to dynamically add and unset services even though they are not
declared in the device manifest. This prevents a problem where framework
changes are accidentally made in a way that is not backwards compatible. For
instance, consider the following situation for two devices developed in the
same tree:
A: serves @1.1::IFoo, declares @1.0::IFoo (incorrect)
B: serves @1.0::IFoo, declares @1.0::IFoo (correct configuration)
If development is done on device A, then framework code like: "V1_1::IFoo::
getService()->doV1_0Api()" will work. However, this will unintentionally break
the feature for devices like device B for which "V1_1::IFoo::getService()
will return nullptr. In order to prevent problems like this, we only allow
fetching an interface if it is declared in a VINTF manifest.

Test: all of the vts/performance tests here still work on a launch Treble device.
Bug: 38415912
Merged-In: I5595ac2389b8234a1a10d3c38da1918cc6d5a5e0
Change-Id: I5595ac2389b8234a1a10d3c38da1918cc6d5a5e0
3 files changed