|
|
|
@ -1399,15 +1399,13 @@ static int StatsTestCounterReg04(void)
|
|
|
|
static int StatsTestGetCntArray05(void)
|
|
|
|
static int StatsTestGetCntArray05(void)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ThreadVars tv;
|
|
|
|
ThreadVars tv;
|
|
|
|
int id;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
memset(&tv, 0, sizeof(ThreadVars));
|
|
|
|
memset(&tv, 0, sizeof(ThreadVars));
|
|
|
|
|
|
|
|
int id = RegisterCounter("t1", "c1", &tv.perf_public_ctx);
|
|
|
|
id = RegisterCounter("t1", "c1", &tv.perf_public_ctx);
|
|
|
|
|
|
|
|
FAIL_IF(id != 1);
|
|
|
|
FAIL_IF(id != 1);
|
|
|
|
|
|
|
|
|
|
|
|
int r = StatsGetAllCountersArray(NULL, &tv.perf_private_ctx);
|
|
|
|
int r = StatsGetAllCountersArray(NULL, &tv.perf_private_ctx);
|
|
|
|
FAIL_IF_NOT(r == -1);
|
|
|
|
FAIL_IF_NOT(r == -1);
|
|
|
|
|
|
|
|
StatsReleaseCounters(tv.perf_public_ctx.head);
|
|
|
|
|
|
|
|
StatsReleasePrivateThreadContext(&tv.perf_private_ctx);
|
|
|
|
PASS;
|
|
|
|
PASS;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|