From f7c68635cf5a7f1a4537fd9b280a8007cc866ca1 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Mon, 13 May 2019 14:07:53 -0700 Subject: [PATCH] test: more verbose ulimit test error License: MIT Signed-off-by: Steven Allen --- cmd/ipfs/util/ulimit_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/ipfs/util/ulimit_test.go b/cmd/ipfs/util/ulimit_test.go index 160f290feafb..0b6a227a5765 100644 --- a/cmd/ipfs/util/ulimit_test.go +++ b/cmd/ipfs/util/ulimit_test.go @@ -38,8 +38,10 @@ func TestManageInvalidNFds(t *testing.T) { t.Fatal("Cannot set the IPFS_FD_MAX env variable") } - if _, _, err := ManageFdLimit(); err == nil { - t.Errorf("ManageFdLimit should return an error") + t.Logf("setting ulimit to %d, max %d, cur %d", value, rlimit.Max, rlimit.Cur) + + if changed, new, err := ManageFdLimit(); err == nil { + t.Errorf("ManageFdLimit should return an error: changed %t, new: %d", changed, new) } else if err != nil { flag := strings.Contains(err.Error(), "failed to raise ulimit to IPFS_FD_MAX")