Repurpose libnativeloader_lazy tests as shallow tests for API coverage
in CTS.

Most APIs are exercised extensively in any managed process, but use
this to cover the fringes.

This drops the mocks that used dynamic library symbol overrides
(android_create_namespace and android_link_namespaces) from the former
libnativeloader_lazy tests, because we cannot inject them in CTS tests.
However it turns out it works just fine to call into the real code in
the linker.

As a result libnativeloader_lazy_test no longer needs to be built with
exported symbols necessary to make the symbol override mocks to work.

Also strengthen the CreateClassLoaderNamespace test slightly by
verifying that it really did create a classloader namespace.

Also move libnativeloader_test and libnativeloader_lazy_test from
device-tests to general-tests, because they shouldn't have any device
dependencies.

Test: atest libnativeloader_test \
            art_libnativeloader_cts_test \
            libnativeloader_lazy_test
Bug: 335224367
Change-Id: Idd15d5a79f4f54c68304a4b758c7a46ba9b96c86
2 files changed