From: Brad Fitzpatrick Date: Wed, 31 Aug 2016 04:30:03 +0000 (+0000) Subject: syscall: add some debugging to TestGetfsstat X-Git-Tag: go1.8beta1~1546 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=b040bc9c062e4c5593792b6754d001509989a9df;p=gostls13.git syscall: add some debugging to TestGetfsstat TestGetfsstat is failing on OS X 10.8. Not sure why. Add more debug info. Change-Id: I7dabb70dd7aeffda7e8959103db9e4886b84741e Reviewed-on: https://go-review.googlesource.com/28220 Reviewed-by: Josh Bleecher Snyder Run-TryBot: Josh Bleecher Snyder TryBot-Result: Gobot Gobot --- diff --git a/src/syscall/syscall_bsd_test.go b/src/syscall/syscall_bsd_test.go index c2ea089d50..d11dc9a876 100644 --- a/src/syscall/syscall_bsd_test.go +++ b/src/syscall/syscall_bsd_test.go @@ -18,6 +18,7 @@ func TestGetfsstat(t *testing.T) { if err != nil { t.Fatal(err) } + t.Logf("num fs = %v", n) data := make([]syscall.Statfs_t, n) n, err = syscall.Getfsstat(data, MNT_WAIT) @@ -26,9 +27,9 @@ func TestGetfsstat(t *testing.T) { } empty := syscall.Statfs_t{} - for _, stat := range data { + for i, stat := range data { if stat == empty { - t.Fatal("an empty Statfs_t struct was returned") + t.Errorf("index %v is an empty Statfs_t struct", i) } } }