summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorQiuwen Lu <[email protected]>2016-11-10 17:19:20 +0800
committerQiuwen Lu <[email protected]>2016-11-10 17:19:20 +0800
commit8028cd21e1774148255f72c9fd89672ba3302eee (patch)
tree7f0c9e9cd404c76d04b8aed9bf6331f61731499a /test
parent162b9c05e314e05723260052739680b425426ec5 (diff)
更新VNode的统计方式,修正单元测试代码。
Diffstat (limited to 'test')
-rw-r--r--test/TestVNode.cc24
1 files changed, 12 insertions, 12 deletions
diff --git a/test/TestVNode.cc b/test/TestVNode.cc
index 33d7570..325da58 100644
--- a/test/TestVNode.cc
+++ b/test/TestVNode.cc
@@ -50,7 +50,7 @@ protected:
/// 测试用例,测试VNode节点的创建和初始化
TEST_F(TestCaseVNodeBase, TestVNodeCreate)
{
- std::string strVNodeSym = "TestVNodeCreate";
+ std::string strVNodeSym = "TVNCreate";
struct vnode* node = vnode_create(strVNodeSym.c_str(), vnode_ops_, 512, 8);
ASSERT_TRUE(node != NULL);
@@ -62,7 +62,7 @@ TEST_F(TestCaseVNodeBase, TestVNodeCreate)
/// 测试用例,测试VNode的销毁过程
TEST_F(TestCaseVNodeBase, TestVNodeDelete)
{
- std::string strVNodeSym = "TestVNodeDelete";
+ std::string strVNodeSym = "TVNDelete";
struct vnode* node = vnode_create(strVNodeSym.c_str(), vnode_ops_, 512, 8);
ASSERT_TRUE(node != NULL);
EXPECT_STREQ(node->symbol, strVNodeSym.c_str());
@@ -85,7 +85,7 @@ protected:
virtual void SetUp()
{
- node_ = vnode_create("TestVNodeOps", vnode_ops_, 512, 8);
+ node_ = vnode_create("TVNOps", vnode_ops_, 512, 8);
ASSERT_TRUE(node_ != NULL);
}
@@ -100,7 +100,7 @@ protected:
TEST_F(TestCaseVNodeOps, TestVNodeCreateDeleteProd)
{
struct vnode_prod* prod;
- std::string strProdSym = "VNodeProd1";
+ std::string strProdSym = "VProd1";
prod = vnode_create_prod(node_, vnode_ops_, strProdSym.c_str(), 10);
ASSERT_TRUE(prod != NULL);
@@ -112,7 +112,7 @@ TEST_F(TestCaseVNodeOps, TestVNodeCreateDeleteProd)
TEST_F(TestCaseVNodeOps, TestVNodeCreateDeleteCons)
{
struct vnode_cons* cons;
- std::string strConsSym = "VNodeCons2";
+ std::string strConsSym = "VCons2";
cons = vnode_create_cons(node_, vnode_ops_, strConsSym.c_str(), 10);
ASSERT_TRUE(cons != NULL);
@@ -124,11 +124,11 @@ TEST_F(TestCaseVNodeOps, TestVNodeCreateDeleteCons)
TEST_F(TestCaseVNodeOps, TestVNodeProdConsCreate)
{
struct vnode_prod* prod;
- std::string strProdSym = "VNodeProd3";
+ std::string strProdSym = "VProd3";
prod = vnode_create_prod(node_, vnode_ops_, strProdSym.c_str(), 10);
struct vnode_cons* cons;
- std::string strConsSym = "VNodeCons4";
+ std::string strConsSym = "VCons4";
cons = vnode_create_cons(node_, vnode_ops_, strConsSym.c_str(), 10);
ASSERT_TRUE(prod != NULL);
@@ -143,11 +143,11 @@ TEST_F(TestCaseVNodeOps, TestVNodeProdConsCreate)
TEST_F(TestCaseVNodeOps, TestVNodeProdConsLookup)
{
struct vnode_prod* prod;
- std::string strProdSym = "VNodeProd5";
+ std::string strProdSym = "VProd5";
prod = vnode_create_prod(node_, vnode_ops_, strProdSym.c_str(), 10);
struct vnode_cons* cons;
- std::string strConsSym = "VNodeCons6";
+ std::string strConsSym = "VCons6";
cons = vnode_create_cons(node_, vnode_ops_, strConsSym.c_str(), 10);
struct vnode_prod* prod_lookup;
@@ -190,7 +190,7 @@ protected:
static void SetUpTestCase()
{
TestCaseVNodeOps::SetUpTestCase();
- pool_ = rte_pktmbuf_pool_create("TestCaseVNodeDataOpsPool", 8192, 512, 0, 512, SOCKET_ID_ANY);
+ pool_ = rte_pktmbuf_pool_create("TCVNDataOpsPool", 8192, 512, 0, 512, SOCKET_ID_ANY);
ASSERT_TRUE(pool_ != NULL);
}
@@ -202,7 +202,7 @@ protected:
virtual void VNodeCreate()
{
- node_ = vnode_create("TestVNodeOps", vnode_ops_, 512, 0);
+ node_ = vnode_create("TVNOps", vnode_ops_, 512, 0);
ASSERT_TRUE(node_ != NULL);
}
@@ -290,7 +290,7 @@ protected:
static void SetUpTestCase()
{
- pool_ = rte_pktmbuf_pool_create("TestCaseVNodeDataMultiQPool", 8192, 512, 0, 512, SOCKET_ID_ANY);
+ pool_ = rte_pktmbuf_pool_create("TCVNDataMultiQPool", 8192, 512, 0, 512, SOCKET_ID_ANY);
ASSERT_TRUE(pool_ != NULL);
}