Define range of GIDs for cached app data.

To support upcoming disk usage calculation optimizations, this change
creates a new GID for each app that will be used to mark its cached
data.  We're allocating these unique GIDs so that we can use
quotactl() to track cached data on a per-app basis.

Test: builds, boots, tests pass
Bug: 27948817
Change-Id: Ic00c39ccedc23d5d43988029e9921679126f8f2d
diff --git a/tests/grp_pwd_test.cpp b/tests/grp_pwd_test.cpp
index a684780..ed68fca 100644
--- a/tests/grp_pwd_test.cpp
+++ b/tests/grp_pwd_test.cpp
@@ -339,6 +339,22 @@
   check_get_group("u0_a9999", 19999);
 }
 
+TEST(getgrnam, app_id_u0_a0_cache) {
+  check_get_group("u0_a0_cache", 20000);
+}
+
+TEST(getgrnam, app_id_u0_a1234_cache) {
+  check_get_group("u0_a1234_cache", 21234);
+}
+
+TEST(getgrnam, app_id_u0_a9999_cache) {
+  check_get_group("u0_a9999_cache", 29999);
+}
+
+TEST(getgrnam, app_id_u10_a1234_cache) {
+  check_get_group("u10_a1234_cache", 1021234);
+}
+
 // Test the difference between uid and shared gid.
 TEST(getgrnam, app_id_all_a9999) {
   check_get_group("all_a9999", 59999);