Add a test ensuring multiple namespaces for APEX

This change adds a test to CtsApexTestCases to ensure that mount
namespaces are correctly configured. Specifically, for the devices
supporting APEX updates (i.e. ro.apex.updatable == true), the pre-apexd
processes (e.g. vold) and post-apexd processes (e.g. init, zygote, etc.)
must be running in different mount namespaces. In case of legacy
devices, they should be in the same mount namespace.

The test compares the mount namespaces indirectly by comparing the mount
ID of the "root" (/) mount point. Directly comparing the mount namespace
ID (/proc/<pid>/ns/mnt) is not available in user builds..

Bug: 139337320
Test: atest CtsApexTestCases

Change-Id: Ia8ec88b4b0e84db9bd1bff82ce6d86845bd1a4a2
1 file changed