From 19a848bc4faee1e64636c6d6a25158a7d43ccb5d Mon Sep 17 00:00:00 2001 From: spiritlhl <103393591+spiritLHLS@users.noreply.github.com> Date: Tue, 30 Jul 2024 13:51:36 +0000 Subject: [PATCH] update --- disk/disktest.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/disk/disktest.go b/disk/disktest.go index e521926..987a18e 100644 --- a/disk/disktest.go +++ b/disk/disktest.go @@ -176,16 +176,16 @@ 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") || - 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) - defer os.Remove("/tmp/read" + blockFile) - if err != nil { - if EnableLoger { - Logger.Info("execDDTest read error for /tmp/ path: " + err.Error()) - } + } + 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) + defer os.Remove("/tmp/read" + blockFile) + if err != nil { + if EnableLoger { + Logger.Info("execDDTest read error for /tmp/ path: " + err.Error()) } } }