summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Ottenklinger <magnus.ottenklinger@entelios.com>2015-06-12 16:02:52 +0200
committerMagnus Ottenklinger <evnu@posteo.de>2015-10-14 20:39:02 +0200
commite98e12c3061f8e9fe1f60c83b5ea5f0038a7ceb2 (patch)
tree258ba0ca9dbe9354bb466af7fbab3fe0ff7536c5
parenta591abfb17b3d69cda4af86bef1cc9717e153515 (diff)
downloadunionfs-fuse-git-e98e12c3061f8e9fe1f60c83b5ea5f0038a7ceb2.tar.gz
check debugging log after file operations
-rwxr-xr-xtest.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/test.py b/test.py
index 5b59fa6..21e1f1a 100755
--- a/test.py
+++ b/test.py
@@ -272,7 +272,15 @@ class IOCTL_TestCase(Common, unittest.TestCase):
temp_file = os.path.join(self._temp_dir, 'debug.log')
call('src/unionfsctl -p %r -d on union' % temp_file)
self.assertTrue(os.path.isfile(temp_file))
- self.assertEqual(read_from_file(temp_file), '')
+ self.assertTrue(os.stat(temp_file).st_size == 0)
+ # operations on 'union' results in debug output
+ write_to_file('union/rw_common_file', 'hello')
+ self.assertRegex(read_from_file(temp_file), 'unionfs_write')
+ read_from_file('union/rw_common_file')
+ self.assertRegex(read_from_file(temp_file),'unionfs_read')
+ os.remove('union/rw_common_file')
+ self.assertRegex(read_from_file(temp_file),'unionfs_unlink')
+ self.assertTrue(os.stat(temp_file).st_size > 0)
#enddef
def test_wrong_args(self):