libcutils: update fs_config tests for current behavior
Update fs_config tests for the new behavior in a8eb0072. Before the above CL, fs_config_cmp() would match any partition prefix to any path, even if there is not a logical relationship between them. For example, these two lines in the test the demonstrate the changed behavior: { true, "vendor/lib", "system/vendor/lib/hw", true }, { true, "system/vendor/lib", "vendor/lib/hw", true }, The first line should match and does; it is testing that files located at system/vendor/lib/hw are matched by an fs_path_config entry specified as vendor/lib. This is to allow for applying the policy we have for the vendor partition to files in /system/vendor in the case that there is no vendor partition. The second line should not match. This is testing that a file that's located at vendor/lib/hw is matched by an fs_path_config entry specified as system/vendor/lib. This is backwards; we do not want to have policy specified for system/vendor to impact policy for the vendor partition. Also, we never have any relationships from /system/oem to /oem or /system/odm to /odm, so these are logically unrelated and should fail to match. We do however have a relationship from /vendor/odm to /odm, so this test is added. Test: libcutils unit tests pass on CF Change-Id: I026f0233e00bbd0aad9bc0fb701aef000d2a037c
Loading
Please register or sign in to comment