summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRadek Podgorny <radek@podgorny.cz>2015-10-15 21:31:23 +0200
committerRadek Podgorny <radek@podgorny.cz>2015-10-15 21:31:23 +0200
commit0b35c647a60d22283a04583ac1a29c7d250d9184 (patch)
tree14530bb4152f0b3370ca68c6159df29b3738f158
parent967e25ec789e692eeaa61e54121e30b1a36e12a0 (diff)
parente98e12c3061f8e9fe1f60c83b5ea5f0038a7ceb2 (diff)
downloadunionfs-fuse-git-0b35c647a60d22283a04583ac1a29c7d250d9184.tar.gz
Merge pull request #30 from evnu/test_ioctl_debug
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):