From 414b9bcf81c482767ee25fc4e1ab427ea933e94b Mon Sep 17 00:00:00 2001 From: lijia Date: Wed, 24 Apr 2024 19:16:24 +0800 Subject: TSG-20863 : add get tcp rtt; dup traffic check first N pkt use config file instead of macro fix value. --- module_test/src/gtest_main.cpp | 92 ++++++++++++++++++++++++++---------------- 1 file changed, 58 insertions(+), 34 deletions(-) (limited to 'module_test/src/gtest_main.cpp') diff --git a/module_test/src/gtest_main.cpp b/module_test/src/gtest_main.cpp index e121b4d..faaba60 100644 --- a/module_test/src/gtest_main.cpp +++ b/module_test/src/gtest_main.cpp @@ -823,28 +823,28 @@ TEST(control, plug_dup_pkt_udp) ASSERT_EQ(GTEST_SAPP_SUCC, gtest_get_libsapp_devel_result()); } -#if (0 == HIGH_PERF) -#define control_find_streaminfo_v4 1 -TEST(control, find_streaminfo_v4) -{ - find_streaminfo_v4_run(); - ASSERT_EQ(GTEST_SAPP_SUCC, gtest_get_libsapp_devel_result()); -} -#endif - -#define control_find_streaminfo_v6 1 -TEST(control, find_streaminfo_v6) -{ - find_streaminfo_v6_run(); - ASSERT_EQ(GTEST_SAPP_SUCC, gtest_get_libsapp_devel_result()); -} - -#define control_find_streaminfo_diff_tunnel_v4 1 -TEST(control, find_streaminfo_diff_tunnel_v4) -{ - find_streaminfo_diff_tunnel_v4_run(); - ASSERT_EQ(GTEST_SAPP_SUCC, gtest_get_libsapp_devel_result()); -} +// #if (0 == HIGH_PERF) +// #define control_find_streaminfo_v4 1 +// TEST(control, find_streaminfo_v4) +// { +// find_streaminfo_v4_run(); +// ASSERT_EQ(GTEST_SAPP_SUCC, gtest_get_libsapp_devel_result()); +// } +// #endif + +// #define control_find_streaminfo_v6 1 +// TEST(control, find_streaminfo_v6) +// { +// find_streaminfo_v6_run(); +// ASSERT_EQ(GTEST_SAPP_SUCC, gtest_get_libsapp_devel_result()); +// } + +// #define control_find_streaminfo_diff_tunnel_v4 1 +// TEST(control, find_streaminfo_diff_tunnel_v4) +// { +// find_streaminfo_diff_tunnel_v4_run(); +// ASSERT_EQ(GTEST_SAPP_SUCC, gtest_get_libsapp_devel_result()); +// } #define control_get_root_dir 1 @@ -871,20 +871,20 @@ TEST(control, toml_array_parse) } -#define control_get_linkdir_from_mac0 1 -TEST(control, get_linkdir_from_mac0) -{ - get_linkdir_from_mac_run(); - ASSERT_EQ(GTEST_SAPP_SUCC, gtest_get_libsapp_devel_result()); -} +// #define control_get_linkdir_from_mac0 1 +// TEST(control, get_linkdir_from_mac0) +// { +// get_linkdir_from_mac_run(); +// ASSERT_EQ(GTEST_SAPP_SUCC, gtest_get_libsapp_devel_result()); +// } -#define control_get_linkdir_from_mac1 1 -TEST(control, get_linkdir_from_mac1) -{ - get_linkdir_from_mac_run2(); - ASSERT_EQ(GTEST_SAPP_SUCC, gtest_get_libsapp_devel_result()); -} +// #define control_get_linkdir_from_mac1 1 +// TEST(control, get_linkdir_from_mac1) +// { +// get_linkdir_from_mac_run2(); +// ASSERT_EQ(GTEST_SAPP_SUCC, gtest_get_libsapp_devel_result()); +// } #define control_get_depmode_mirror 1 TEST(control, get_depmode_mirror) @@ -944,6 +944,30 @@ TEST(control, get_ip_ttl) } +#define control_get_tcp_rtt 1 +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"); +} + +#define control_get_tcp_rtt_c2s 1 +TEST(control, get_tcp_rtt_c2s) +{ + control_get_tcp_rtt_c2s_run(); + ASSERT_EQ(GTEST_SAPP_SUCC, gtest_get_libsapp_devel_result()); + // EXPECT_EXIT(control_get_tcp_rtt_run(), testing::ExitedWithCode(0), "test succ"); +} + +#define control_get_tcp_rtt_s2c 1 +TEST(control, get_tcp_rtt_s2c) +{ + control_get_tcp_rtt_s2c_run(); + ASSERT_EQ(GTEST_SAPP_SUCC, gtest_get_libsapp_devel_result()); + // EXPECT_EXIT(control_get_tcp_rtt_run(), testing::ExitedWithCode(0), "test succ"); +} + /************************ project_requirement.h API test ***********************/ #define project_simple 1 // for SI symbol view TEST(project, simple) -- cgit v1.2.3