From da5a33d206431f885a4dc029d79f693a27ef293a Mon Sep 17 00:00:00 2001 From: hchiramm Date: Wed, 9 Apr 2014 18:48:28 +0530 Subject: Add statvfs support This support will help other consumers to get the statvfs details. Change-Id: Iee4e84a515ff80f24add812ad6fcf84c992bf356 Signed-off-by: hchiramm --- test/functional/libgfapi-python-tests.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test/functional') diff --git a/test/functional/libgfapi-python-tests.py b/test/functional/libgfapi-python-tests.py index baad035..3ef2401 100644 --- a/test/functional/libgfapi-python-tests.py +++ b/test/functional/libgfapi-python-tests.py @@ -261,6 +261,16 @@ class DirOpsTest(unittest.TestCase): self.vol.makedirs(name, 0755) self.assertTrue(self.vol.isdir(name)) + def test_statvfs(self): + sb = self.vol.statvfs("/") + self.assertFalse(isinstance(sb, types.IntType)) + self.assertEqual(sb.f_namemax, 255L) + # creating a dir, checking Total number of free inodes + # is reduced + self.vol.makedirs("statvfs_dir1", 0755) + sb2 = self.vol.statvfs("/") + self.assertTrue(sb2.f_ffree < sb.f_ffree) + def test_rmtree(self): """ by testing rmtree, we are also testing unlink and rmdir -- cgit