예제 #1
0
파일: t4_fuse.py 프로젝트: naeloob/s3ql
 def tst_bug382(self):
     dirname = self.newname()
     fullname = self.mnt_dir + "/" + dirname
     os.mkdir(fullname)
     assert stat.S_ISDIR(os.stat(fullname).st_mode)
     assert dirname in llfuse.listdir(self.mnt_dir)
     cmd = ('(%d, %r)' % (llfuse.ROOT_INODE, path2bytes(dirname))).encode()
     llfuse.setxattr('%s/%s' % (self.mnt_dir, CTRL_NAME), 'rmtree', cmd)
     assert_raises(FileNotFoundError, os.stat, fullname)
     assert dirname not in llfuse.listdir(self.mnt_dir)
예제 #2
0
파일: t4_fuse.py 프로젝트: rootfs/s3ql
 def tst_bug382(self):
     dirname = self.newname()
     fullname = self.mnt_dir + "/" + dirname
     os.mkdir(fullname)
     assert stat.S_ISDIR(os.stat(fullname).st_mode)
     assert dirname in llfuse.listdir(self.mnt_dir)
     cmd = ('(%d, %r)' % (llfuse.ROOT_INODE, path2bytes(dirname))).encode()
     llfuse.setxattr('%s/%s' % (self.mnt_dir, CTRL_NAME), 'rmtree', cmd)
     assert_raises(FileNotFoundError, os.stat, fullname)
     assert dirname not in llfuse.listdir(self.mnt_dir)
예제 #3
0
 def tst_bug382(self):
     dirname = self.newname()
     fullname = self.mnt_dir + "/" + dirname
     os.mkdir(fullname)
     assert stat.S_ISDIR(os.stat(fullname).st_mode)
     assert dirname in llfuse.listdir(self.mnt_dir)
     llfuse.setxattr('%s/%s' % (self.mnt_dir, CTRL_NAME),
                     'rmtree', pickle.dumps((llfuse.ROOT_INODE, path2bytes(dirname)),
                                            PICKLE_PROTOCOL))
     assert_raises(FileNotFoundError, os.stat, fullname)
     assert dirname not in llfuse.listdir(self.mnt_dir)
예제 #4
0
 def tst_bug382(self):
     dirname = self.newname()
     fullname = self.mnt_dir + "/" + dirname
     os.mkdir(fullname)
     self.assertTrue(stat.S_ISDIR(os.stat(fullname).st_mode))
     self.assertTrue(dirname in llfuse.listdir(self.mnt_dir))
     llfuse.setxattr('%s/%s' % (self.mnt_dir, CTRL_NAME), 
                     'rmtree', pickle.dumps((llfuse.ROOT_INODE, path2bytes(dirname)),
                                            PICKLE_PROTOCOL))
     self.assertRaises(FileNotFoundError, os.stat, fullname)
     self.assertTrue(dirname not in llfuse.listdir(self.mnt_dir))
예제 #5
0
 def tst_bug382(self):
     dirname = self.newname()
     fullname = self.mnt_dir + "/" + dirname
     os.mkdir(fullname)
     assert stat.S_ISDIR(os.stat(fullname).st_mode)
     assert dirname in pyfuse3.listdir(self.mnt_dir)
     cmd = ('(%d, %r)' % (pyfuse3.ROOT_INODE, path2bytes(dirname))).encode()
     pyfuse3.setxattr('%s/%s' % (self.mnt_dir, CTRL_NAME), 'rmtree', cmd)
     # Invalidation is asynchronous...
     try:
         retry(5, lambda: not os.path.exists(fullname))
     except RetryTimeoutError:
         pass  # assert_raises should fail
     assert_raises(FileNotFoundError, os.stat, fullname)
     assert dirname not in pyfuse3.listdir(self.mnt_dir)