Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
spiritLHLS committed Jul 30, 2024
1 parent b1e6cb5 commit f5c5905
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions disk/disktest.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,17 +169,15 @@ 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)
if err != nil {
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)
Expand All @@ -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
Expand Down

0 comments on commit f5c5905

Please sign in to comment.