summaryrefslogtreecommitdiff
path: root/shaping/test/gtest_shaper.cpp
diff options
context:
space:
mode:
authorliuchang <[email protected]>2023-06-02 10:28:44 +0000
committerliuchang <[email protected]>2023-06-02 10:28:44 +0000
commit49b1128205177576fcb000474c6283184bbc44d1 (patch)
treeca887b4a07c755b99e6c5df7bad6830b3a6fe243 /shaping/test/gtest_shaper.cpp
parent4e63a3a5cd61c1ff579864b03324163e26e1b515 (diff)
don't calculate latency for borrow profile
Diffstat (limited to 'shaping/test/gtest_shaper.cpp')
-rw-r--r--shaping/test/gtest_shaper.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/shaping/test/gtest_shaper.cpp b/shaping/test/gtest_shaper.cpp
index f97591b..a1a9b77 100644
--- a/shaping/test/gtest_shaper.cpp
+++ b/shaping/test/gtest_shaper.cpp
@@ -607,7 +607,7 @@ TEST(single_session, udp_borrow)
shaping_stat_judge(line, 1, 1, 1, 0, 0, 0, 0, 170, SHAPING_DIR_OUT, profile_type_primary);
ASSERT_TRUE(NULL != fgets(line, sizeof(line), stat_file));//profile_id 2, borrow
- shaping_stat_judge(line, 1, 2, 2, 100, 10000, 0, 0, 170, SHAPING_DIR_OUT, profile_type_borrow);
+ shaping_stat_judge(line, 1, 2, 2, 100, 10000, 0, 0, 0, SHAPING_DIR_OUT, profile_type_borrow);
fclose(stat_file);
stat_file = fopen(SHAPING_STAT_FILE_NAME, "w");//clear stat file
@@ -681,11 +681,13 @@ TEST(single_session, udp_borrow_same_priority_9)
ASSERT_TRUE(NULL != fgets(line, sizeof(line), stat_file));//profile_id 1, primary
shaping_stat_judge(line, 1, 1, 9, 0, 0, 0, 0, 170, SHAPING_DIR_OUT, profile_type_primary);
+#if 0 //fieldstat don't output a row when all values is zero
ASSERT_TRUE(NULL != fgets(line, sizeof(line), stat_file));//profile_id 2, borrow
- shaping_stat_judge(line, 1, 2, 9, 0, 0, 0, 0, 170, SHAPING_DIR_OUT, profile_type_borrow);
+ shaping_stat_judge(line, 1, 2, 9, 0, 0, 0, 0, 0, SHAPING_DIR_OUT, profile_type_borrow);
+#endif
ASSERT_TRUE(NULL != fgets(line, sizeof(line), stat_file));//profile_id 3, borrow
- shaping_stat_judge(line, 1, 3, 9, 100, 10000, 0, 0, 170, SHAPING_DIR_OUT, profile_type_borrow);
+ shaping_stat_judge(line, 1, 3, 9, 100, 10000, 0, 0, 0, SHAPING_DIR_OUT, profile_type_borrow);
fclose(stat_file);
stat_file = fopen(SHAPING_STAT_FILE_NAME, "w");//clear stat file
@@ -1168,7 +1170,7 @@ TEST(two_session_diff_priority_same_profile, udp_borrow_in_order)
shaping_stat_judge(line, 1, 1, 1, 0, 0, 0, 0, 470, SHAPING_DIR_OUT, profile_type_primary);
ASSERT_TRUE(NULL != fgets(line, sizeof(line), stat_file));//profile_id 2, borrow
- shaping_stat_judge(line, 1, 2, 2, 100, 10000, 0, 0, 470, SHAPING_DIR_OUT, profile_type_borrow);
+ shaping_stat_judge(line, 1, 2, 2, 100, 10000, 0, 0, 0, SHAPING_DIR_OUT, profile_type_borrow);
ASSERT_TRUE(NULL != fgets(line, sizeof(line), stat_file));//profile_id 2, primary
shaping_stat_judge(line, 2, 2, 1, 100, 10000, 0, 0, 190, SHAPING_DIR_OUT, profile_type_primary);
@@ -1638,6 +1640,6 @@ TEST(statistics, udp_queueing_pkt)
int main(int argc, char **argv)
{
testing::InitGoogleTest(&argc, argv);
- //testing::GTEST_FLAG(filter) = "statistics.udp_queueing_pkt";
+ //testing::GTEST_FLAG(filter) = "single_session.udp_borrow_same_priority_9";
return RUN_ALL_TESTS();
} \ No newline at end of file