提交 8fa05594 编写于 作者: X xia-liyun

format code:zhanghanlin9@huawei.com

Signed-off-by: Nxia-liyun <xialiyun@huawei.com>
Change-Id: I9923661a13f8e3858759e71a5b4238afcdfc6222
上级 0c8289e5
......@@ -38,20 +38,20 @@
#include "service.h"
#include "samgr_lite.h"
#define TEST_APP_ID "com.permission.test"
#define TEST_APP_ID2 "com.permission.test2"
#define SUBTEST_APP_ID "com.permission.subtest"
#define TEST_APP_SHORT "a"
#define TEST_APP_LONG "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
#define TEST_APP_PATH "/storage/app/etc/permissions/com.permission.test"
#define TEST_APP_INVALID "com.permission.!@#$%^&*()_+"
#define TEST_APP_NOT_EXIST "com.permission.onetwothree"
#define PERMISSION_UNDEFINED "ohos.permission.TEST"
#define PERMISSION_TOOLONG "ohos.permission.balabalabalabalabalabalabalabalabalabala"
#define PERMISSION_EMPTY ""
#define PERMISSION_UNSUPPORTED "!@#$%^&*()_+"
#define ETC_PREFIX "/storage/app/etc"
#define PERMISSION_PREFIX "/storage/app/etc/permissions"
const char[] TEST_APP_ID = "com.permission.test";
const char[] TEST_APP_ID2 = "com.permission.test2";
const char[] SUBTEST_APP_ID = "com.permission.subtest";
const char[] TEST_APP_SHORT = "a";
const char[] TEST_APP_LONG = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
const char[] TEST_APP_PATH = "/storage/app/etc/permissions/com.permission.test";
const char[] TEST_APP_INVALID = "com.permission.!@#$%^&*()_+";
const char[] TEST_APP_NOT_EXIST = "com.permission.onetwothree";
const char[] PERMISSION_UNDEFINED = "ohos.permission.TEST";
const char[] PERMISSION_TOOLONG = "ohos.permission.balabalabalabalabalabalabalabalabalabala";
const char[] PERMISSION_EMPTY = "";
const char[] PERMISSION_UNSUPPORTED = "!@#$%^&*()_+";
const char[] ETC_PREFIX = "/storage/app/etc";
const char[] PERMISSION_PREFIX = "/storage/app/etc/permissions";
const int SLEEP_TIME = 5;
const int TEST_TASKID = 1000;
......@@ -67,19 +67,19 @@ const int MAX_PID = 0x7fffffff;
const int MIN_PID = 0;
const int ABNORMAL_PKG_NUM = 5;
const int DIR_MODE = 777;
const int FLAG_NOT_EXIST=123;
const int PERFORMANCE_RUN_TIMES=10000;
const int MILLISECOND=1000;
const int FLAG_NOT_EXIST = 123;
const int PERFORMANCE_RUN_TIMES = 10000;
const int MILLISECOND = 1000;
int IsUserGrant(const char* pname);
int IsUserGrant(const char *pname);
int CheckPermData(const PermissionTrans* pt, const PermissionSaved* ps,
const PermissionSaved* pre, int len, int plen);
int CheckPermData(const PermissionTrans *pt, const PermissionSaved *ps,
const PermissionSaved *pre, int len, int plen);
void ClrPers(PermissionSaved* &permissions);
void ClrPers(PermissionSaved *&permissions);
void CheckAppPermission(const char *identifier, int expRet, int expNum, const PermissionTrans* installPers,
const PermissionSaved* lastPers = nullptr, int lastLen = 0);
void CheckAppPermission(const char *identifier, int expRet, int expNum, const PermissionTrans *installPers,
const PermissionSaved *lastPers = nullptr, int lastLen = 0);
void SubTestWithoutCheck(const char *identifier, int taskID);
......
......@@ -14,7 +14,7 @@
*/
#include "ActsPMSTest.h"
#include<sys/time.h>
#include <sys/time.h>
using namespace std;
using namespace testing::ext;
......@@ -68,13 +68,14 @@ static PermissionTrans g_systemPers[] = {
},
};
class ActsPMSUpdatePermissionTest:public testing::Test{
class ActsPMSUpdatePermissionTest : public testing::Test
{
protected:
static void SetUpTestCase(void)
{
CreateAppDir();
IUnknown *iUnknown = SAMGR_GetInstance()->GetFeatureApi(PERMISSION_SERVICE, PERM_INNER);
iUnknown->QueryInterface(iUnknown, DEFAULT_VERSION, (void **) &g_interface);
iUnknown->QueryInterface(iUnknown, DEFAULT_VERSION, (void **)&g_interface);
setuid(0);
}
static void TearDownTestCase(void) {}
......@@ -92,8 +93,8 @@ protected:
long GetCurrentTimeMillis()
{
struct timeval current;
gettimeofday(&current,NULL);
return current.tv_sec*MILLISECOND+current.tv_usec/MILLISECOND;
gettimeofday(&current, NULL);
return current.tv_sec * MILLISECOND + current.tv_usec / MILLISECOND;
}
/**
......@@ -105,22 +106,23 @@ HWTEST_F(ActsPMSUpdatePermissionTest, testSecPMUpdatePMFlags_001, Function | Med
{
SaveOrUpdatePermissions(TEST_APP_ID, g_systemPers, SYS_PERM_NUM, FIRST_INSTALL);
PermissionSaved *permissions=NULL;
int permNum=0;
int ret=g_interface->QueryPermission(TEST_APP_ID,&permissions,&permNum);
EXPECT_EQ(ret,PERM_ERRORCODE_SUCCESS)<<"query ret="<<ret<<endl;
EXPECT_EQ(permNum,SYS_PERM_NUM)<<"permNum ="<<permNum<<endl;
if(permissions!=NULL){
EXPECT_EQ(permissions[0].flags,PMS_FLAG_DEFAULT)<<"flags ="<<permissions[0].flags<<endl;
PermissionSaved *permissions = NULL;
int permNum = 0;
int ret = g_interface->QueryPermission(TEST_APP_ID, &permissions, &permNum);
EXPECT_EQ(ret, PERM_ERRORCODE_SUCCESS) << "query ret=" << ret << endl;
EXPECT_EQ(permNum, SYS_PERM_NUM) << "permNum =" << permNum << endl;
if (permissions != NULL)
{
EXPECT_EQ(permissions[0].flags, PMS_FLAG_DEFAULT) << "flags =" << permissions[0].flags << endl;
}
ClrPers(permissions);
ret=g_interface->UpdatePermissionFlags(TEST_APP_ID,g_systemPers[0].name,PMS_FLAG_DEFAULT);
EXPECT_EQ(ret,PERM_ERRORCODE_SUCCESS)<<"update perms flag ret ="<<ret<<endl;
ret = g_interface->UpdatePermissionFlags(TEST_APP_ID, g_systemPers[0].name, PMS_FLAG_DEFAULT);
EXPECT_EQ(ret, PERM_ERRORCODE_SUCCESS) << "update perms flag ret =" << ret << endl;
ret=g_interface->QueryPermission(TEST_APP_ID,&permissions,&permNum);
EXPECT_EQ(ret,PERM_ERRORCODE_SUCCESS)<<"query ret="<<ret<<endl;
EXPECT_EQ(permNum,SYS_PERM_NUM)<<"permNum ="<<permNum<<endl;
ret = g_interface->QueryPermission(TEST_APP_ID, &permissions, &permNum);
EXPECT_EQ(ret, PERM_ERRORCODE_SUCCESS) << "query ret=" << ret << endl;
EXPECT_EQ(permNum, SYS_PERM_NUM) << "permNum =" << permNum << endl;
ClrPers(permissions);
UnLoadPermissions(TEST_TASKID);
......@@ -136,22 +138,23 @@ HWTEST_F(ActsPMSUpdatePermissionTest, testSecPMUpdatePMFlags_002, Function | Med
{
SaveOrUpdatePermissions(TEST_APP_ID, g_systemPers, SYS_PERM_NUM, FIRST_INSTALL);
PermissionSaved *permissions=NULL;
int permNum=0;
int ret=g_interface->QueryPermission(TEST_APP_ID,&permissions,&permNum);
EXPECT_EQ(ret,PERM_ERRORCODE_SUCCESS)<<"query ret="<<ret<<endl;
EXPECT_EQ(permNum,SYS_PERM_NUM)<<"permNum ="<<permNum<<endl;
if(permissions!=NULL){
EXPECT_EQ(permissions[0].flags,PMS_FLAG_DEFAULT)<<"flags ="<<permissions[0].flags<<endl;
PermissionSaved *permissions = NULL;
int permNum = 0;
int ret = g_interface->QueryPermission(TEST_APP_ID, &permissions, &permNum);
EXPECT_EQ(ret, PERM_ERRORCODE_SUCCESS) << "query ret=" << ret << endl;
EXPECT_EQ(permNum, SYS_PERM_NUM) << "permNum =" << permNum << endl;
if (permissions != NULL)
{
EXPECT_EQ(permissions[0].flags, PMS_FLAG_DEFAULT) << "flags =" << permissions[0].flags << endl;
}
ClrPers(permissions);
ret=g_interface->UpdatePermissionFlags(TEST_APP_ID,g_systemPers[0].name,PMS_FLAG_USER_FIXED);
EXPECT_EQ(ret,PERM_ERRORCODE_SUCCESS)<<"update perms flag ret ="<<ret<<endl;
ret = g_interface->UpdatePermissionFlags(TEST_APP_ID, g_systemPers[0].name, PMS_FLAG_USER_FIXED);
EXPECT_EQ(ret, PERM_ERRORCODE_SUCCESS) << "update perms flag ret =" << ret << endl;
ret=g_interface->QueryPermission(TEST_APP_ID,&permissions,&permNum);
EXPECT_EQ(ret,PERM_ERRORCODE_SUCCESS)<<"query ret="<<ret<<endl;
EXPECT_EQ(permNum,SYS_PERM_NUM)<<"permNum ="<<permNum<<endl;
ret = g_interface->QueryPermission(TEST_APP_ID, &permissions, &permNum);
EXPECT_EQ(ret, PERM_ERRORCODE_SUCCESS) << "query ret=" << ret << endl;
EXPECT_EQ(permNum, SYS_PERM_NUM) << "permNum =" << permNum << endl;
ClrPers(permissions);
UnLoadPermissions(TEST_TASKID);
......@@ -167,27 +170,28 @@ HWTEST_F(ActsPMSUpdatePermissionTest, testSecPMUpdatePMFlags_003, Function | Med
{
SaveOrUpdatePermissions(TEST_APP_ID, g_systemPers, SYS_PERM_NUM, FIRST_INSTALL);
PermissionSaved *permissions=NULL;
int permNum=0;
int ret=g_interface->QueryPermission(TEST_APP_ID,&permissions,&permNum);
EXPECT_EQ(ret,PERM_ERRORCODE_SUCCESS)<<"query ret="<<ret<<endl;
EXPECT_EQ(permNum,SYS_PERM_NUM)<<"permNum ="<<permNum<<endl;
if(permissions!=NULL){
EXPECT_EQ(permissions[0].flags,PMS_FLAG_DEFAULT)<<"flags ="<<permissions[0].flags<<endl;
PermissionSaved *permissions = NULL;
int permNum = 0;
int ret = g_interface->QueryPermission(TEST_APP_ID, &permissions, &permNum);
EXPECT_EQ(ret, PERM_ERRORCODE_SUCCESS) << "query ret=" << ret << endl;
EXPECT_EQ(permNum, SYS_PERM_NUM) << "permNum =" << permNum << endl;
if (permissions != NULL)
{
EXPECT_EQ(permissions[0].flags, PMS_FLAG_DEFAULT) << "flags =" << permissions[0].flags << endl;
}
ClrPers(permissions);
//pkg name not exist
ret=g_interface->UpdatePermissionFlags(TEST_APP_NOT_EXIST,g_systemPers[0].name,PMS_FLAG_USER_FIXED);
EXPECT_EQ(ret,PERM_ERRORCODE_FILE_NOT_EXIST)<<"update perms flag ret ="<<ret<<endl;
// pkg name not exist
ret = g_interface->UpdatePermissionFlags(TEST_APP_NOT_EXIST, g_systemPers[0].name, PMS_FLAG_USER_FIXED);
EXPECT_EQ(ret, PERM_ERRORCODE_FILE_NOT_EXIST) << "update perms flag ret =" << ret << endl;
//pkg perm not exist
ret=g_interface->UpdatePermissionFlags(TEST_APP_ID,PERMISSION_UNDEFINED,PMS_FLAG_USER_FIXED);
EXPECT_EQ(ret,PERM_ERRORCODE_SUCCESS)<<"update perms flag ret ="<<ret<<endl;
// pkg perm not exist
ret = g_interface->UpdatePermissionFlags(TEST_APP_ID, PERMISSION_UNDEFINED, PMS_FLAG_USER_FIXED);
EXPECT_EQ(ret, PERM_ERRORCODE_SUCCESS) << "update perms flag ret =" << ret << endl;
//pkg flag not exist
ret=g_interface->UpdatePermissionFlags(TEST_APP_ID,g_systemPers[0].name,FLAG_NOT_EXIST);
EXPECT_EQ(ret,PERM_ERRORCODE_INVALID_PARAMS)<<"update perms flag ret ="<<ret<<endl;
// pkg flag not exist
ret = g_interface->UpdatePermissionFlags(TEST_APP_ID, g_systemPers[0].name, FLAG_NOT_EXIST);
EXPECT_EQ(ret, PERM_ERRORCODE_INVALID_PARAMS) << "update perms flag ret =" << ret << endl;
ClrPers(permissions);
UnLoadPermissions(TEST_TASKID);
......@@ -203,27 +207,28 @@ HWTEST_F(ActsPMSUpdatePermissionTest, testSecPMUpdatePMFlags_004, Function | Med
{
SaveOrUpdatePermissions(TEST_APP_ID, g_systemPers, SYS_PERM_NUM, FIRST_INSTALL);
PermissionSaved *permissions=NULL;
int permNum=0;
int ret=g_interface->QueryPermission(TEST_APP_ID,&permissions,&permNum);
EXPECT_EQ(ret,PERM_ERRORCODE_SUCCESS)<<"query ret="<<ret<<endl;
EXPECT_EQ(permNum,SYS_PERM_NUM)<<"permNum ="<<permNum<<endl;
if(permissions!=NULL){
EXPECT_EQ(permissions[0].flags,PMS_FLAG_DEFAULT)<<"flags ="<<permissions[0].flags<<endl;
PermissionSaved *permissions = NULL;
int permNum = 0;
int ret = g_interface->QueryPermission(TEST_APP_ID, &permissions, &permNum);
EXPECT_EQ(ret, PERM_ERRORCODE_SUCCESS) << "query ret=" << ret << endl;
EXPECT_EQ(permNum, SYS_PERM_NUM) << "permNum =" << permNum << endl;
if (permissions != NULL)
{
EXPECT_EQ(permissions[0].flags, PMS_FLAG_DEFAULT) << "flags =" << permissions[0].flags << endl;
}
ClrPers(permissions);
//pkg name empty
ret=g_interface->UpdatePermissionFlags(NULL,g_systemPers[0].name,PMS_FLAG_USER_FIXED);
EXPECT_EQ(ret,PERM_ERRORCODE_INVALID_PARAMS)<<"update perms flag ret ="<<ret<<endl;
// pkg name empty
ret = g_interface->UpdatePermissionFlags(NULL, g_systemPers[0].name, PMS_FLAG_USER_FIXED);
EXPECT_EQ(ret, PERM_ERRORCODE_INVALID_PARAMS) << "update perms flag ret =" << ret << endl;
//pkg perm empty
ret=g_interface->UpdatePermissionFlags(TEST_APP_ID,NULL,PMS_FLAG_USER_FIXED);
EXPECT_EQ(ret,PERM_ERRORCODE_INVALID_PARAMS)<<"update perms flag ret ="<<ret<<endl;
// pkg perm empty
ret = g_interface->UpdatePermissionFlags(TEST_APP_ID, NULL, PMS_FLAG_USER_FIXED);
EXPECT_EQ(ret, PERM_ERRORCODE_INVALID_PARAMS) << "update perms flag ret =" << ret << endl;
//pkg flag empty
ret=g_interface->UpdatePermissionFlags(TEST_APP_ID,g_systemPers[0].name,NULL);
EXPECT_EQ(ret,PERM_ERRORCODE_SUCCESS)<<"update perms flag ret ="<<ret<<endl;
// pkg flag empty
ret = g_interface->UpdatePermissionFlags(TEST_APP_ID, g_systemPers[0].name, NULL);
EXPECT_EQ(ret, PERM_ERRORCODE_SUCCESS) << "update perms flag ret =" << ret << endl;
ClrPers(permissions);
UnLoadPermissions(TEST_TASKID);
......@@ -239,23 +244,24 @@ HWTEST_F(ActsPMSUpdatePermissionTest, testSecPMUpdatePMFlags_005, Function | Med
{
SaveOrUpdatePermissions(TEST_APP_ID, g_systemPers, SYS_PERM_NUM, FIRST_INSTALL);
PermissionSaved *permissions=NULL;
int permNum=0;
int ret=g_interface->QueryPermission(TEST_APP_ID,&permissions,&permNum);
EXPECT_EQ(ret,PERM_ERRORCODE_SUCCESS)<<"query ret="<<ret<<endl;
EXPECT_EQ(permNum,SYS_PERM_NUM)<<"permNum ="<<permNum<<endl;
if(permissions!=NULL){
EXPECT_EQ(permissions[0].flags,PMS_FLAG_DEFAULT)<<"flags ="<<permissions[0].flags<<endl;
PermissionSaved *permissions = NULL;
int permNum = 0;
int ret = g_interface->QueryPermission(TEST_APP_ID, &permissions, &permNum);
EXPECT_EQ(ret, PERM_ERRORCODE_SUCCESS) << "query ret=" << ret << endl;
EXPECT_EQ(permNum, SYS_PERM_NUM) << "permNum =" << permNum << endl;
if (permissions != NULL)
{
EXPECT_EQ(permissions[0].flags, PMS_FLAG_DEFAULT) << "flags =" << permissions[0].flags << endl;
}
ClrPers(permissions);
//pkg name invalid
ret=g_interface->UpdatePermissionFlags(TEST_APP_INVALID,g_systemPers[0].name,PMS_FLAG_USER_FIXED);
EXPECT_EQ(ret,PERM_ERRORCODE_FILE_NOT_EXIST)<<"update perms flag ret ="<<ret<<endl;
// pkg name invalid
ret = g_interface->UpdatePermissionFlags(TEST_APP_INVALID, g_systemPers[0].name, PMS_FLAG_USER_FIXED);
EXPECT_EQ(ret, PERM_ERRORCODE_FILE_NOT_EXIST) << "update perms flag ret =" << ret << endl;
//pkg perm invalid
ret=g_interface->UpdatePermissionFlags(TEST_APP_ID,PERMISSION_UNSUPPORTED,PMS_FLAG_USER_FIXED);
EXPECT_EQ(ret,PERM_ERRORCODE_SUCCESS)<<"update perms flag ret ="<<ret<<endl;
// pkg perm invalid
ret = g_interface->UpdatePermissionFlags(TEST_APP_ID, PERMISSION_UNSUPPORTED, PMS_FLAG_USER_FIXED);
EXPECT_EQ(ret, PERM_ERRORCODE_SUCCESS) << "update perms flag ret =" << ret << endl;
ClrPers(permissions);
UnLoadPermissions(TEST_TASKID);
......@@ -271,22 +277,23 @@ HWTEST_F(ActsPMSUpdatePermissionTest, testSecPMUpdatePMFlags_006, Function | Med
{
SaveOrUpdatePermissions(TEST_APP_ID, g_systemPers, SYS_PERM_NUM, FIRST_INSTALL);
PermissionSaved *permissions=NULL;
int permNum=0;
int ret=g_interface->QueryPermission(TEST_APP_ID,&permissions,&permNum);
EXPECT_EQ(ret,PERM_ERRORCODE_SUCCESS)<<"query ret="<<ret<<endl;
EXPECT_EQ(permNum,SYS_PERM_NUM)<<"permNum ="<<permNum<<endl;
if(permissions!=NULL){
EXPECT_EQ(permissions[0].flags,PMS_FLAG_DEFAULT)<<"flags ="<<permissions[0].flags<<endl;
PermissionSaved *permissions = NULL;
int permNum = 0;
int ret = g_interface->QueryPermission(TEST_APP_ID, &permissions, &permNum);
EXPECT_EQ(ret, PERM_ERRORCODE_SUCCESS) << "query ret=" << ret << endl;
EXPECT_EQ(permNum, SYS_PERM_NUM) << "permNum =" << permNum << endl;
if (permissions != NULL)
{
EXPECT_EQ(permissions[0].flags, PMS_FLAG_DEFAULT) << "flags =" << permissions[0].flags << endl;
}
ClrPers(permissions);
for(int i=0; i<PERFORMANCE_RUN_TIMES/2; i++)
for (int i = 0; i < PERFORMANCE_RUN_TIMES / 2; i++)
{
ret=g_interface->UpdatePermissionFlags(TEST_APP_ID,g_systemPers[0].name,PMS_FLAG_DEFAULT);
EXPECT_EQ(ret,PERM_ERRORCODE_SUCCESS)<<"update perms flag ret ="<<ret<<endl;
ret=g_interface->UpdatePermissionFlags(TEST_APP_ID,g_systemPers[0].name,PMS_FLAG_USER_FIXED);
EXPECT_EQ(ret,PERM_ERRORCODE_SUCCESS)<<"update perms flag ret ="<<ret<<endl;
ret = g_interface->UpdatePermissionFlags(TEST_APP_ID, g_systemPers[0].name, PMS_FLAG_DEFAULT);
EXPECT_EQ(ret, PERM_ERRORCODE_SUCCESS) << "update perms flag ret =" << ret << endl;
ret = g_interface->UpdatePermissionFlags(TEST_APP_ID, g_systemPers[0].name, PMS_FLAG_USER_FIXED);
EXPECT_EQ(ret, PERM_ERRORCODE_SUCCESS) << "update perms flag ret =" << ret << endl;
}
ClrPers(permissions);
......@@ -301,27 +308,28 @@ HWTEST_F(ActsPMSUpdatePermissionTest, testSecPMUpdatePMFlags_006, Function | Med
*/
HWTEST_F(ActsPMSUpdatePermissionTest, testSecPMUpdatePMFlags_007, Function | MediumTest | Level2)
{
SaveOrUpdatePermissions(TEST_APP_ID, g_systemPers, SYS_PERM_NUM, FIRST_INSTALL);
PermissionSaved *permissions=NULL;
int permNum=0;
int ret=g_interface->QueryPermission(TEST_APP_ID,&permissions,&permNum);
EXPECT_EQ(ret,PERM_ERRORCODE_SUCCESS)<<"query ret="<<ret<<endl;
EXPECT_EQ(permNum,SYS_PERM_NUM)<<"permNum ="<<permNum<<endl;
if(permissions!=NULL){
EXPECT_EQ(permissions[0].flags,PMS_FLAG_DEFAULT)<<"flags ="<<permissions[0].flags<<endl;
SaveOrUpdatePermissions(TEST_APP_ID, g_systemPers, SYS_PERM_NUM, FIRST_INSTALL);
PermissionSaved *permissions = NULL;
int permNum = 0;
int ret = g_interface->QueryPermission(TEST_APP_ID, &permissions, &permNum);
EXPECT_EQ(ret, PERM_ERRORCODE_SUCCESS) << "query ret=" << ret << endl;
EXPECT_EQ(permNum, SYS_PERM_NUM) << "permNum =" << permNum << endl;
if (permissions != NULL)
{
EXPECT_EQ(permissions[0].flags, PMS_FLAG_DEFAULT) << "flags =" << permissions[0].flags << endl;
}
ClrPers(permissions);
long startTime=GetCurrentTimeMillis();
for(int i=0; i<PERFORMANCE_RUN_TIMES/2; i++)
long startTime = GetCurrentTimeMillis();
for (int i = 0; i < PERFORMANCE_RUN_TIMES / 2; i++)
{
ret=g_interface->UpdatePermissionFlags(TEST_APP_ID,g_systemPers[0].name,PMS_FLAG_DEFAULT);
ret=g_interface->UpdatePermissionFlags(TEST_APP_ID,g_systemPers[0].name,PMS_FLAG_USER_FIXED);
ret = g_interface->UpdatePermissionFlags(TEST_APP_ID, g_systemPers[0].name, PMS_FLAG_DEFAULT);
ret = g_interface->UpdatePermissionFlags(TEST_APP_ID, g_systemPers[0].name, PMS_FLAG_USER_FIXED);
}
long timeCost=GetCurrentTimeMillis()-startTime;
long timeAvg=timeCost/10000;
EXPECT_LT(timeAvg,11)<<"avg times ="<<timeAvg<<endl;
long timeCost = GetCurrentTimeMillis() - startTime;
long timeAvg = timeCost / 10000;
EXPECT_LT(timeAvg, 11) << "avg times =" << timeAvg << endl;
ClrPers(permissions);
UnLoadPermissions(TEST_TASKID);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册