diff --git a/hiviewdfx/faultloggertest/faultloggercpptest/faultloggertest.cpp b/hiviewdfx/faultloggertest/faultloggercpptest/faultloggertest.cpp index c849baef808e25eb359fdc9f96ac7dc5daf3c341..5870de2257c19270d2699a1678846105913375de 100755 --- a/hiviewdfx/faultloggertest/faultloggercpptest/faultloggertest.cpp +++ b/hiviewdfx/faultloggertest/faultloggercpptest/faultloggertest.cpp @@ -130,7 +130,7 @@ HWTEST_F(faultloggertest, Faultlogger_Faultdetect1, Function|MediumTest|Level1) string fileinfo; fileinfo = ReadFile("/data/log/faultlog/temp/" + faultloggerfile); std::vector para = {"Pid:" + to_string(pid), "Uid:0", - "Process name:/data/local/tmp/faultloggertest", + "Process name:", "/data/local/tmp/faultloggertest", "Reason:Signal:SIGILL", "Fault thread Info:", "Tid:" + to_string(pid), "Name:faultloggertest"}; if (!fileinfo.empty()) { diff --git a/hiviewdfx/hilogtest/libhilogtest/libhilogCtest/libhilogCtest.cpp b/hiviewdfx/hilogtest/libhilogtest/libhilogCtest/libhilogCtest.cpp index 0e44b0cb38305f0d3ebe866992797a68e78ce9c7..683a1b50afbfeef5b420240346b1356a0e96d98d 100755 --- a/hiviewdfx/hilogtest/libhilogtest/libhilogCtest/libhilogCtest.cpp +++ b/hiviewdfx/hilogtest/libhilogtest/libhilogCtest/libhilogCtest.cpp @@ -69,8 +69,7 @@ HWTEST_F(LibhilogCtest, HILOG_INFO, Function|MediumTest|Level2) "%{private}lf,%{public}.2f,%s,%{private}c", i, 1.00001, 2.333333, "sse", 'a'); std::string expected{"I 03e00/testtag0testtag0testtag0testta: \ 123456789_1234567890_publicandprivatelogtestis:1,,2.33,,"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); std::cout<<"cmdRunResult = " + cmdRunResult<,2.33,,"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,2.33,,"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,2.33,,"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,2.33,,"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,1,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,2147483647,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,2000,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,1024,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,2147483647,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,2147483647,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,4000,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,65535,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,1.010000,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,2.147484,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,2.15,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,321.1,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,b,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,20,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,23,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,10,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,0x13,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,16,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,19,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,0X1C,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,1F,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,STRING2,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,中文,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,2.231000e+10,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,5.676767E-02,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,2.231e+10,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,0.0567677,;"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,,,,"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,,,,"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<,2.33,,"}; - sleep(1); - CmdRun("hilog -x| grep testtag0testtag0testtag0testta", cmdRunResult); + CmdRun("timeout 3 hilog | grep testtag0testtag0testtag0testta", cmdRunResult); + std::cout<