mirror of https://github.com/golang/go.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 <josharian@gmail.com> Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
448d3952af
commit
b040bc9c06
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue