summaryrefslogtreecommitdiff
path: root/module_test/src/gtest_main.cpp
diff options
context:
space:
mode:
authorlijia <[email protected]>2024-04-27 22:31:48 +0800
committerlijia <[email protected]>2024-04-28 19:13:45 +0800
commited1ff3bc45c45a3ed131beadf1584529e28b2856 (patch)
treef0762619ceeabb70aadd8508799a9b1ac0ae9e44 /module_test/src/gtest_main.cpp
parent16a633839f9917d26fe229ddaa887fe10b57deac (diff)
update g_current_time based on the timestamp of the pcap packet header
Diffstat (limited to 'module_test/src/gtest_main.cpp')
-rw-r--r--module_test/src/gtest_main.cpp33
1 files changed, 18 insertions, 15 deletions
diff --git a/module_test/src/gtest_main.cpp b/module_test/src/gtest_main.cpp
index fa44674..8a4ff00 100644
--- a/module_test/src/gtest_main.cpp
+++ b/module_test/src/gtest_main.cpp
@@ -24,7 +24,7 @@ int g_slient_mode = 0;
const char *for_test_sapp_version = "4.2.68_c9193fe";
-static int g_libsapp_devel_res = GTEST_SAPP_ERR; /* 使用lisapp_devel.so在同一个进程内运行的测试结�??*/
+static int g_libsapp_devel_res = GTEST_SAPP_ERR; /* 使用lisapp_devel.so在同一个进程内运行的测试结�???*/
int gtest_set_libsapp_devel_result(int res_value)
{
g_libsapp_devel_res = res_value;
@@ -170,7 +170,7 @@ void call_libsapp_devel_online_mode(void)
while(sapp_get_current_state() != SAPP_STATE_PROCESSING){
usleep(100);
}
- sleep(3); /* TODO: 此处不用超时, 而是靠一个标志位或特定状�??*/
+ sleep(3); /* TODO: 此处不用超时, 而是靠一个标志位或特定状�???*/
libsapp_destroy_env();
}
@@ -481,14 +481,14 @@ TEST(tcp, dropstream_and_unorder)
}
#define tcp_tuple4_reuse_with_fin 1 // for SI symbol view
-TEST(tcp, DISABLED_tuple4_reuse_with_fin)
+TEST(tcp, tuple4_reuse_with_fin)
{
tcp_tuple4_reuse_with_fin_run();
EXPECT_EQ(GTEST_SAPP_SUCC, gtest_get_libsapp_devel_result());
}
#define tcpall_tuple4_reuse_with_fin 1 // for SI symbol view
-TEST(tcpall, DISABLED_tuple4_reuse_with_fin)
+TEST(tcpall, tuple4_reuse_with_fin)
{
tcpall_tuple4_reuse_with_fin_run();
EXPECT_EQ(GTEST_SAPP_SUCC, gtest_get_libsapp_devel_result());
@@ -958,15 +958,18 @@ TEST(control, get_ip_ttl)
#define control_get_tcp_rtt 1
-TEST(control, DISABLED_get_tcp_rtt)
+TEST(control, get_tcp_rtt)
{
- control_get_tcp_rtt_run();
- ASSERT_EQ(GTEST_SAPP_SUCC, gtest_get_libsapp_devel_result());
- // EXPECT_EXIT(control_get_tcp_rtt_run(), testing::ExitedWithCode(0), "test succ");
+#if 0
+ //control_get_tcp_rtt_run();
+ //ASSERT_EQ(GTEST_SAPP_SUCC, gtest_get_libsapp_devel_result());
+#else
+ EXPECT_EXIT(control_get_tcp_rtt_run(), testing::ExitedWithCode(0), "test succ");
+#endif
}
#define control_get_tcp_rtt_c2s 1
-TEST(control, DISABLED_get_tcp_rtt_c2s)
+TEST(control, get_tcp_rtt_c2s)
{
control_get_tcp_rtt_c2s_run();
ASSERT_EQ(GTEST_SAPP_SUCC, gtest_get_libsapp_devel_result());
@@ -974,7 +977,7 @@ TEST(control, DISABLED_get_tcp_rtt_c2s)
}
#define control_get_tcp_rtt_s2c 1
-TEST(control, DISABLED_get_tcp_rtt_s2c)
+TEST(control, get_tcp_rtt_s2c)
{
control_get_tcp_rtt_s2c_run();
ASSERT_EQ(GTEST_SAPP_SUCC, gtest_get_libsapp_devel_result());
@@ -1314,7 +1317,7 @@ TEST(appstate, kill_follow_ip_entry)
/************************ sapp timer test ***********************/
#if SAPP_V4 //timer only support in sapp-v4.0
#define timer_simple 1 // for SI symbol view
-TEST(timer, simple)
+TEST(timer, DISABLED_simple)
{
timer_simple_run();
//ASSERT_EQ(GTEST_SAPP_SUCC, gtest_get_libsapp_devel_result());
@@ -1326,7 +1329,7 @@ TEST(timer, simple)
/********************* inject rst packet Test ***********************/
#if SAPP_V4 //rst_tcp only support in sapp-v4.0
-#if 0 /* 改成用sapp_benchmark框架测试, 不需要写代码、不用重新编�??*/
+#if 0 /* 改成用sapp_benchmark框架测试, 不需要写代码、不用重新编�???*/
#define inject_rst_packet_test_v4 1 // for SI symbol view
TEST(inject, rst_pkt_v4)
{
@@ -1337,7 +1340,7 @@ TEST(inject, rst_pkt_v4)
/********************* inject rst packet Test ***********************/
#define inject_rst_packet_test_v6 1 // for SI symbol view
-#if 0 /* 改成用sapp_benchmark框架测试, 不需要写代码、不用重新编�??*/
+#if 0 /* 改成用sapp_benchmark框架测试, 不需要写代码、不用重新编�???*/
TEST(inject, rst_pkt_v6)
{
MESA_rst_tcp_test_v6_run();
@@ -2044,7 +2047,7 @@ TEST(proxy, simple)
#define _proxy_kill_tcp 1
/*
TODO:
- 使用libsapp_devel实测, 两个用例不能顺序执行, 疑似与解析层dlopen有关�?? 暂未定位原因, 待解�??!!!
+ 使用libsapp_devel实测, 两个用例不能顺序执行, 疑似与解析层dlopen有关�??? 暂未定位原因, 待解�???!!!
*/
#if 0
TEST(proxy, kill_tcp)
@@ -2166,7 +2169,7 @@ TEST(fake_marsio, vlan_flip_and_symmetric_mpls1vs2)
#define _fake_marsio_vlan_mac_flip_inject_no_asymmetric 1
TEST(fake_marsio, vlan_mac_flip_inject_no_asymmetric)
{
- /* 别着�?? 不是BUG!
+ /* 别着�??? 不是BUG!
这个测试用例就是应该错的 !!!
*/
EXPECT_EXIT(fake_marsio_vlan_mac_flipping_inject_run(0), testing::ExitedWithCode(1), "index:4, mac addr error");