Commit b040bc9c authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

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/28220Reviewed-by: default avatarJosh Bleecher Snyder <josharian@gmail.com>
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 448d3952
......@@ -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)
}
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment