namespace {
const uid_t kTestUserId = tzplatform_getuid(TZ_SYS_DEFAULT_USER);
+const gid_t kTestGroupId = tzplatform_getgid(TZ_SYS_DEFAULT_USER);
const std::string kTestUserIdStr =
std::to_string(kTestUserId);
bf::path manifest_backup = ci::GetBackupPathForManifestFile(manifest_path);
ASSERT_FALSE(bf::exists(package_backup));
ASSERT_FALSE(bf::exists(manifest_backup));
+
+ for (bf::recursive_directory_iterator iter(root_path);
+ iter != bf::recursive_directory_iterator(); ++iter) {
+ if (bf::is_symlink(symlink_status(iter->path())))
+ continue;
+ struct stat stats;
+ stat(iter->path().c_str(), &stats);
+ ASSERT_EQ(kTestUserId, stats.st_uid);
+ ASSERT_EQ(kTestGroupId, stats.st_gid);
+ }
}
void PackageCheckCleanup(const std::string& pkgid,