From b1e6cb5b235d2f9228e106efa563834a60ac7318 Mon Sep 17 00:00:00 2001 From: spiritlhl <103393591+spiritLHLS@users.noreply.github.com> Date: Tue, 30 Jul 2024 13:37:53 +0000 Subject: [PATCH] update --- disk/disktest.go | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/disk/disktest.go b/disk/disktest.go index f46265f..a7e702f 100644 --- a/disk/disktest.go +++ b/disk/disktest.go @@ -159,15 +159,15 @@ func ddTest2(blockFile, blockName, blockCount, bs string) string { } result += parseResultDD(tempText, blockCount) // 清理缓存, 避免影响测试结果 - // if testFilePath == "/tmp/" { - // syncCmd := exec.Command("sync") - // err = syncCmd.Run() - // if err != nil { - // if EnableLoger { - // Logger.Info("sync command failed: " + err.Error()) - // } - // } - // } + if testFilePath == "/tmp/" { + syncCmd := exec.Command("sync") + err = syncCmd.Run() + if err != nil { + if EnableLoger { + Logger.Info("sync command failed: " + err.Error()) + } + } + } // 读取测试 if EnableLoger { Logger.Info("Path:" + testFilePath) @@ -191,6 +191,9 @@ func ddTest2(blockFile, blockName, blockCount, bs string) string { } } } + if EnableLoger { + Logger.Info("Read Text:" + tempText) + } result += parseResultDD(tempText, blockCount) result += "\n" return result