From 657a24ce01293c9db8cfbe1648b3a47ebc10a31c Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Thu, 14 Jan 2021 10:38:59 -0800 Subject: [PATCH] libct/cg/TestGetHugePageSizeImpl: only log errors This: > === RUN TestGetHugePageSizeImpl > utils_test.go:504: (input [hugepages-akB], error strconv.Atoi: parsing "a": invalid syntax) feels like an error but it's not. Only log errors. Signed-off-by: Kir Kolyshkin --- libcontainer/cgroups/utils_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libcontainer/cgroups/utils_test.go b/libcontainer/cgroups/utils_test.go index 1645ae7b0..11bc7d883 100644 --- a/libcontainer/cgroups/utils_test.go +++ b/libcontainer/cgroups/utils_test.go @@ -501,9 +501,8 @@ func TestGetHugePageSizeImpl(t *testing.T) { warns.Reset() output, err := getHugePageSizeFromFilenames(c.input) if err != nil { - t.Logf("(input %v, error %v)", c.input, err) if !c.isErr { - t.Error("unexpected error ^^^^") + t.Errorf("input %v, expected nil, got error: %v", c.input, err) } // no more checks continue