From: Sangyoon Jang Date: Thu, 1 Dec 2016 06:44:15 +0000 (+0900) Subject: Fix smoke test X-Git-Tag: accepted/tizen/3.0/mobile/20161206.000303 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f12a969a0d9b34aec3febec1be0759802db6caf4;p=platform%2Fcore%2Fappfw%2Fwgt-backend.git Fix smoke test Now gid of data, shared/data dir is system_share. Change-Id: Id69017b75af1f12cb61d6aa2fd24c1d528a43963 Signed-off-by: Sangyoon Jang --- diff --git a/src/unit_tests/smoke_test.cc b/src/unit_tests/smoke_test.cc index c696ad8..7b185d3 100644 --- a/src/unit_tests/smoke_test.cc +++ b/src/unit_tests/smoke_test.cc @@ -15,6 +15,7 @@ #include #include #include +#include #include #include @@ -43,6 +44,7 @@ namespace { const uid_t kTestUserId = tzplatform_getuid(TZ_SYS_DEFAULT_USER); const gid_t kTestGroupId = tzplatform_getgid(TZ_SYS_DEFAULT_USER); +const char kTestGroupName[] = "system_share"; const std::string kTestUserIdStr = std::to_string(kTestUserId); @@ -229,7 +231,12 @@ void ValidatePackageFS(const std::string& pkgid, struct stat stats; stat(iter->path().c_str(), &stats); ASSERT_EQ(kTestUserId, stats.st_uid) << "Invalid uid: " << iter->path(); - ASSERT_EQ(kTestGroupId, stats.st_gid) << "Invalid gid: " << iter->path(); + if (iter->path().filename() == "data") { + boost::optional gid = ci::GetGidByGroupName(kTestGroupName); + ASSERT_EQ(*gid, stats.st_gid) << "Invalid gid: " << iter->path(); + } else { + ASSERT_EQ(kTestGroupId, stats.st_gid) << "Invalid gid: " << iter->path(); + } } }