Skip to content

Commit

Permalink
add debug prints to figure out intermittent test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
warner committed Sep 12, 2014
1 parent 528364a commit de02d74
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/allmydata/test/test_util.py
Expand Up @@ -518,6 +518,7 @@ def test_disk_stats(self):
raise unittest.SkipTest("This test will spuriously fail there is no disk space left.")

disk = fileutil.get_disk_stats('.', 2**13)
print "GET_DISK_STATS", disk
self.failUnless(disk['total'] > 0, disk['total'])
self.failUnless(disk['used'] > 0, disk['used'])
self.failUnless(disk['free_for_root'] > 0, disk['free_for_root'])
Expand Down
1 change: 1 addition & 0 deletions src/allmydata/util/fileutil.py
Expand Up @@ -395,6 +395,7 @@ def get_disk_stats(whichdir, reserved_space=0):
total = s.f_frsize * s.f_blocks
free_for_root = s.f_frsize * s.f_bfree
free_for_nonroot = s.f_frsize * s.f_bavail
print "STATVFS", s

# valid for all platforms:
used = total - free_for_root
Expand Down

0 comments on commit de02d74

Please sign in to comment.