From f5c5905163667a71e378a65d8cb24a6fbd01a42b Mon Sep 17 00:00:00 2001 From: spiritlhl <103393591+spiritLHLS@users.noreply.github.com> Date: Tue, 30 Jul 2024 13:42:50 +0000 Subject: [PATCH] update --- disk/disktest.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/disk/disktest.go b/disk/disktest.go index a7e702f..dc8008e 100644 --- a/disk/disktest.go +++ b/disk/disktest.go @@ -169,9 +169,6 @@ func ddTest2(blockFile, blockName, blockCount, bs string) string { } } // 读取测试 - if EnableLoger { - Logger.Info("Path:" + testFilePath) - } time.Sleep(1 * time.Second) tempText, err = execDDTest("/root/"+blockFile, "/dev/null", bs, blockCount) defer os.Remove("/root/" + blockFile) @@ -179,7 +176,8 @@ func ddTest2(blockFile, blockName, blockCount, bs string) string { if EnableLoger { Logger.Info("execDDTest read error for /root/ path: " + err.Error()) } - if strings.Contains(tempText, "Invalid argument") || strings.Contains(tempText, "Permission denied") { + if strings.Contains(tempText, "Invalid argument") || strings.Contains(tempText, "Permission denied") || + strings.Contains(tempText, "失败") || strings.Contains(tempText, "无效的参数") { time.Sleep(1 * time.Second) tempText, err = execDDTest(testFilePath+blockFile, "/tmp/read"+blockFile, bs, blockCount) defer os.Remove(testFilePath + blockFile) @@ -191,9 +189,6 @@ func ddTest2(blockFile, blockName, blockCount, bs string) string { } } } - if EnableLoger { - Logger.Info("Read Text:" + tempText) - } result += parseResultDD(tempText, blockCount) result += "\n" return result