From: Shengjing Zhu Date: Wed, 20 May 2020 00:33:47 +0800 Subject: skip test if device is not found --- fileutils_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fileutils_test.go b/fileutils_test.go index 63c516d..7efe277 100644 --- a/fileutils_test.go +++ b/fileutils_test.go @@ -39,7 +39,8 @@ func TestDeviceNumbers(t *testing.T) { for _, device := range devices { si, err := os.Lstat(device.device) if err != nil { - t.Errorf("not able to Lstat the device: %v", err) + t.Logf("not able to Lstat the device: %v", err) + continue } st, ok := si.Sys().(*syscall.Stat_t)