gtest_inject_tcp_rst creates a working directory under the current path

This commit is contained in:
luwenpeng
2024-05-17 19:50:51 +08:00
parent 31a4267e23
commit 5678cf645e
4 changed files with 46 additions and 22 deletions

View File

@@ -181,7 +181,7 @@ void packet_injector_test_frame_run(struct packet_injector_case *test)
// compare pcap
if (test->c2s_output_pcap && test->c2s_expect_pcap)
{
system_cmd("mv %s/%s %s", test->output_prefix, test->c2s_output_pcap, output_dir_abs_path);
system_cmd("mv %s/%s %s", test->work_dir, test->c2s_output_pcap, output_dir_abs_path);
expect_cmp_inject(test->work_dir,
expect_dir_abs_path, test->c2s_expect_pcap,
output_dir_abs_path, test->c2s_output_pcap,
@@ -189,7 +189,7 @@ void packet_injector_test_frame_run(struct packet_injector_case *test)
}
if (test->s2c_output_pcap && test->s2c_expect_pcap)
{
system_cmd("mv %s/%s %s", test->output_prefix, test->s2c_output_pcap, output_dir_abs_path);
system_cmd("mv %s/%s %s", test->work_dir, test->s2c_output_pcap, output_dir_abs_path);
expect_cmp_inject(test->work_dir,
expect_dir_abs_path, test->s2c_expect_pcap,
output_dir_abs_path, test->s2c_output_pcap,