diff options
author | Mark Salyzyn <salyzyn@google.com> | 2017-05-02 08:56:15 -0700 |
---|---|---|
committer | Mark Salyzyn <salyzyn@google.com> | 2017-05-04 11:41:17 -0700 |
commit | 0f6a270d24ba373fdb74b2059e0366ba4fbbd8fe (patch) | |
tree | 1d566ba399526fb43366be62afbaff1b426a86ac /libcutils/fs_config.cpp | |
parent | 3d7ee068e0a0ce707965835f58abce65189abda4 (diff) |
libcutils: fs_config internal table alias test
Private interface to permit testing only added to fs_config to
expose android_files and android_dirs.
Make sure that both paths to a partition are specified in fs_config
internal tables.
Test: gTest libcutils-unit-test --gtest_filter=fs_config.*
Bug: 37703469
Change-Id: Ida5fccdb786dc6d67325005d4fdd1fa1ffaef396
Diffstat (limited to 'libcutils/fs_config.cpp')
-rw-r--r-- | libcutils/fs_config.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libcutils/fs_config.cpp b/libcutils/fs_config.cpp index a2dd67776..2b3443f3f 100644 --- a/libcutils/fs_config.cpp +++ b/libcutils/fs_config.cpp @@ -92,6 +92,9 @@ static const struct fs_path_config android_dirs[] = { { 00755, AID_ROOT, AID_ROOT, 0, 0 }, // clang-format on }; +#ifndef __ANDROID_VNDK__ +auto __for_testing_only__android_dirs = android_dirs; +#endif // Rules for files. // These rules are applied based on "first match", so they @@ -238,6 +241,9 @@ static const struct fs_path_config android_files[] = { { 00644, AID_ROOT, AID_ROOT, 0, 0 }, // clang-format on }; +#ifndef __ANDROID_VNDK__ +auto __for_testing_only__android_files = android_files; +#endif static size_t strip(const char* path, size_t len, const char suffix[]) { if (len < strlen(suffix)) return len; |