[ARVADOS] updated: 32131dfa999fe658e5e61f465a5badf71271e2d2
git at public.curoverse.com
git at public.curoverse.com
Mon Apr 20 23:59:50 EDT 2015
Summary of changes:
sdk/python/arvados/arvfile.py | 13 +++-
sdk/python/arvados/keep.py | 2 +-
services/fuse/arvados_fuse/__init__.py | 49 ++++++++-----
services/fuse/arvados_fuse/fresh.py | 10 +++
services/fuse/arvados_fuse/fusedir.py | 3 +-
services/fuse/arvados_fuse/fusefile.py | 5 +-
services/fuse/setup.py | 2 +-
services/fuse/tests/test_mount.py | 125 +++++++++++++++++++++------------
8 files changed, 140 insertions(+), 69 deletions(-)
via 32131dfa999fe658e5e61f465a5badf71271e2d2 (commit)
from 5549904bbd5dec9bafe60e36d4ea1abe6b791f19 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 32131dfa999fe658e5e61f465a5badf71271e2d2
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Mon Apr 20 23:59:46 2015 -0400
3198: Fix test deadlock. Track inode lifetimes.
diff --git a/sdk/python/arvados/arvfile.py b/sdk/python/arvados/arvfile.py
index b4102f4..eb17bd4 100644
--- a/sdk/python/arvados/arvfile.py
+++ b/sdk/python/arvados/arvfile.py
@@ -457,6 +457,7 @@ class _BlockManager(object):
bufferblock = self._put_queue.get()
if bufferblock is None:
return
+
loc = self._keep.put(bufferblock.buffer_view[0:bufferblock.write_pointer].tobytes())
bufferblock.set_state(_BufferBlock.COMMITTED, loc)
@@ -721,8 +722,14 @@ class ArvadosFile(object):
elif size > self.size():
raise IOError(errno.EINVAL, "truncate() does not support extending the file size")
- def readfrom(self, offset, size, num_retries):
- """Read upto `size` bytes from the file starting at `offset`."""
+ def readfrom(self, offset, size, num_retries, exact=False):
+ """Read upto `size` bytes from the file starting at `offset`.
+
+ :exact:
+ If False (default), return less data than requested if the read
+ crosses a block boundary and the next block isn't cached. If True,
+ only return less data than requested when hitting EOF.
+ """
with self.lock:
if size == 0 or offset >= self.size():
@@ -735,7 +742,7 @@ class ArvadosFile(object):
data = []
for lr in readsegs:
- block = self.parent._my_block_manager().get_block_contents(lr.locator, num_retries=num_retries, cache_only=bool(data))
+ block = self.parent._my_block_manager().get_block_contents(lr.locator, num_retries=num_retries, cache_only=(bool(data) and not exact))
if block:
data.append(block[lr.segment_offset:lr.segment_offset+lr.segment_size])
else:
diff --git a/sdk/python/arvados/keep.py b/sdk/python/arvados/keep.py
index 6196b50..356cc48 100644
--- a/sdk/python/arvados/keep.py
+++ b/sdk/python/arvados/keep.py
@@ -635,7 +635,7 @@ class KeepClient(object):
def get_from_cache(self, loc):
"""Fetch a block only if is in the cache, otherwise return None."""
slot = self.block_cache.get(loc)
- if slot.ready.is_set():
+ if slot and slot.ready.is_set():
return slot.get()
else:
return None
diff --git a/services/fuse/arvados_fuse/__init__.py b/services/fuse/arvados_fuse/__init__.py
index 67878d7..e5d8128 100644
--- a/services/fuse/arvados_fuse/__init__.py
+++ b/services/fuse/arvados_fuse/__init__.py
@@ -151,9 +151,14 @@ class Inodes(object):
return entry
def del_entry(self, entry):
- self._obj_cache.unmanage(entry)
- llfuse.invalidate_inode(entry.inode)
- del self._entries[entry.inode]
+ if entry.ref_count == 0:
+ _logger.warn("Deleting inode %i", entry.inode)
+ self._obj_cache.unmanage(entry)
+ llfuse.invalidate_inode(entry.inode)
+ del self._entries[entry.inode]
+ else:
+ _logger.warn("Inode %i has refcount %i", entry.inode, entry.ref_count)
+ entry.dead = True
def catch_exceptions(orig_func):
@functools.wraps(orig_func)
@@ -164,8 +169,8 @@ def catch_exceptions(orig_func):
raise
except EnvironmentError as e:
raise llfuse.FUSEError(e.errno)
- except Exception:
- _logger.exception("")
+ except:
+ _logger.exception("Unhandled exception during FUSE operation")
raise llfuse.FUSEError(errno.EIO)
return catch_exceptions_wrapper
@@ -251,8 +256,6 @@ class Operations(llfuse.Operations):
@catch_exceptions
def lookup(self, parent_inode, name):
name = unicode(name, self.encoding)
- _logger.debug("arv-mount lookup: parent_inode %i name %s",
- parent_inode, name)
inode = None
if name == '.':
@@ -266,11 +269,24 @@ class Operations(llfuse.Operations):
inode = p[name].inode
if inode != None:
+ _logger.debug("arv-mount lookup: parent_inode %i name '%s' inode %i",
+ parent_inode, name, inode)
+ self.inodes[inode].inc_ref()
return self.getattr(inode)
else:
+ _logger.debug("arv-mount lookup: parent_inode %i name '%s' not found",
+ parent_inode, name)
raise llfuse.FUSEError(errno.ENOENT)
@catch_exceptions
+ def forget(self, inodes):
+ for inode, nlookup in inodes:
+ _logger.debug("arv-mount forget: %i %i", inode, nlookup)
+ ent = self.inodes[inode]
+ if ent.dec_ref(nlookup) == 0 and ent.dead:
+ self.inodes.del_entry(ent)
+
+ @catch_exceptions
def open(self, inode, flags):
if inode in self.inodes:
p = self.inodes[inode]
@@ -425,12 +441,12 @@ class Operations(llfuse.Operations):
# The file entry should have been implicitly created by callback.
f = p[name]
-
fh = self._filehandles_counter
self._filehandles_counter += 1
self._filehandles[fh] = FileHandle(fh, f)
self.inodes.touch(p)
+ f.inc_ref()
return (fh, self.getattr(f.inode))
@catch_exceptions
@@ -443,6 +459,7 @@ class Operations(llfuse.Operations):
# The dir entry should have been implicitly created by callback.
d = p[name]
+ d.inc_ref()
return self.getattr(d.inode)
@catch_exceptions
@@ -455,14 +472,14 @@ class Operations(llfuse.Operations):
def rmdir(self, inode_parent, name):
self.unlink(inode_parent, name)
- @catch_exceptions
- def rename(self, inode_parent_old, name_old, inode_parent_new, name_new):
- src = self._check_writable(inode_parent_old)
- dest = self._check_writable(inode_parent_new)
-
- with llfuse.lock_released:
- dest.collection.copy(name_old, name_new, source_collection=src.collection, overwrite=True)
- src.collection.remove(name_old)
+ # @catch_exceptions
+ # def rename(self, inode_parent_old, name_old, inode_parent_new, name_new):
+ # src = self._check_writable(inode_parent_old)
+ # dest = self._check_writable(inode_parent_new)
+ #
+ # with llfuse.lock_released:
+ # dest.collection.copy(name_old, name_new, source_collection=src.collection, overwrite=True)
+ # src.collection.remove(name_old)
@catch_exceptions
def flush(self, fh):
diff --git a/services/fuse/arvados_fuse/fresh.py b/services/fuse/arvados_fuse/fresh.py
index 9da3a5c..08ffb88 100644
--- a/services/fuse/arvados_fuse/fresh.py
+++ b/services/fuse/arvados_fuse/fresh.py
@@ -31,6 +31,8 @@ class FreshBase(object):
self._atime = time.time()
self._poll_time = 60
self.use_count = 0
+ self.ref_count = 0
+ self.dead = False
# Mark the value as stale
def invalidate(self):
@@ -66,5 +68,13 @@ class FreshBase(object):
def dec_use(self):
self.use_count -= 1
+ def inc_ref(self):
+ self.ref_count += 1
+ return self.ref_count
+
+ def dec_ref(self, n):
+ self.ref_count -= n
+ return self.ref_count
+
def objsize(self):
return 0
diff --git a/services/fuse/arvados_fuse/fusedir.py b/services/fuse/arvados_fuse/fusedir.py
index 51c652e..fd9fc72 100644
--- a/services/fuse/arvados_fuse/fusedir.py
+++ b/services/fuse/arvados_fuse/fusedir.py
@@ -138,6 +138,7 @@ class Directory(FreshBase):
changed = True
if changed:
+ llfuse.invalidate_inode(self.inode)
self._mtime = time.time()
self.fresh()
@@ -191,11 +192,11 @@ class CollectionDirectoryBase(Directory):
self.new_entry(name, item, self.mtime())
elif event == arvados.collection.DEL:
ent = self._entries[name]
+ del self._entries[name]
llfuse.invalidate_entry(self.inode, name)
self.inodes.del_entry(ent)
elif event == arvados.collection.MOD:
ent = self._entries[name]
- llfuse.invalidate_entry(self.inode, name)
llfuse.invalidate_inode(ent.inode)
_logger.warn("Finished handling event")
diff --git a/services/fuse/arvados_fuse/fusefile.py b/services/fuse/arvados_fuse/fusefile.py
index 07de680..d3c13f3 100644
--- a/services/fuse/arvados_fuse/fusefile.py
+++ b/services/fuse/arvados_fuse/fusefile.py
@@ -47,7 +47,7 @@ class FuseArvadosFile(File):
return self.arvfile.size()
def readfrom(self, off, size, num_retries=0):
- return self.arvfile.readfrom(off, size, num_retries)
+ return self.arvfile.readfrom(off, size, num_retries, exact=True)
def writeto(self, off, buf, num_retries=0):
return self.arvfile.writeto(off, buf, num_retries)
@@ -60,8 +60,7 @@ class FuseArvadosFile(File):
def flush(self):
if self.writable():
- self.arvfile.flush()
- return self.arvfile.parent.root_collection().save()
+ self.arvfile.parent.root_collection().save()
class StringFile(File):
diff --git a/services/fuse/setup.py b/services/fuse/setup.py
index a7ae1c2..31fa6ca 100644
--- a/services/fuse/setup.py
+++ b/services/fuse/setup.py
@@ -29,7 +29,7 @@ setup(name='arvados_fuse',
'bin/arv-mount'
],
install_requires=[
- 'arvados-python-client>=0.1.20150303143450',
+ 'arvados-python-client',
'llfuse',
'python-daemon',
'ciso8601'
diff --git a/services/fuse/tests/test_mount.py b/services/fuse/tests/test_mount.py
index bb7d871..ff641ca 100644
--- a/services/fuse/tests/test_mount.py
+++ b/services/fuse/tests/test_mount.py
@@ -13,11 +13,27 @@ import threading
import time
import unittest
import logging
-
+import multiprocessing
import run_test_server
logger = logging.getLogger('arvados.arv-mount')
+import threading, sys, traceback
+
+def dumpstacks(signal, frame):
+ id2name = dict([(th.ident, th.name) for th in threading.enumerate()])
+ code = []
+ for threadId, stack in sys._current_frames().items():
+ code.append("\n# Thread: %s(%d)" % (id2name.get(threadId,""), threadId))
+ for filename, lineno, name, line in traceback.extract_stack(stack):
+ code.append('File: "%s", line %d, in %s' % (filename, lineno, name))
+ if line:
+ code.append(" %s" % (line.strip()))
+ print "\n".join(code)
+
+import signal
+signal.signal(signal.SIGUSR1, dumpstacks)
+
class MountTestBase(unittest.TestCase):
def setUp(self):
self.keeptmp = tempfile.mkdtemp()
@@ -55,7 +71,7 @@ class MountTestBase(unittest.TestCase):
path = self.mounttmp
if subdir:
path = os.path.join(path, subdir)
- self.assertEqual(sorted(expect_content), sorted(os.listdir(path)))
+ self.assertEqual(sorted(expect_content), sorted(llfuse.listdir(path)))
class FuseMountTest(MountTestBase):
@@ -161,7 +177,7 @@ class FuseMagicTest(MountTestBase):
def runTest(self):
self.make_mount(fuse.MagicDirectory)
- mount_ls = os.listdir(self.mounttmp)
+ mount_ls = llfuse.listdir(self.mounttmp)
self.assertIn('README', mount_ls)
self.assertFalse(any(arvados.util.keep_locator_pattern.match(fn) or
arvados.util.uuid_pattern.match(fn)
@@ -170,11 +186,11 @@ class FuseMagicTest(MountTestBase):
self.assertDirContents(self.testcollection, ['thing1.txt'])
self.assertDirContents(os.path.join('by_id', self.testcollection),
['thing1.txt'])
- mount_ls = os.listdir(self.mounttmp)
+ mount_ls = llfuse.listdir(self.mounttmp)
self.assertIn('README', mount_ls)
self.assertIn(self.testcollection, mount_ls)
self.assertIn(self.testcollection,
- os.listdir(os.path.join(self.mounttmp, 'by_id')))
+ llfuse.listdir(os.path.join(self.mounttmp, 'by_id')))
files = {}
files[os.path.join(self.mounttmp, self.testcollection, 'thing1.txt')] = 'data 1'
@@ -188,15 +204,15 @@ class FuseTagsTest(MountTestBase):
def runTest(self):
self.make_mount(fuse.TagsDirectory)
- d1 = os.listdir(self.mounttmp)
+ d1 = llfuse.listdir(self.mounttmp)
d1.sort()
self.assertEqual(['foo_tag'], d1)
- d2 = os.listdir(os.path.join(self.mounttmp, 'foo_tag'))
+ d2 = llfuse.listdir(os.path.join(self.mounttmp, 'foo_tag'))
d2.sort()
self.assertEqual(['zzzzz-4zz18-fy296fx3hot09f7'], d2)
- d3 = os.listdir(os.path.join(self.mounttmp, 'foo_tag', 'zzzzz-4zz18-fy296fx3hot09f7'))
+ d3 = llfuse.listdir(os.path.join(self.mounttmp, 'foo_tag', 'zzzzz-4zz18-fy296fx3hot09f7'))
d3.sort()
self.assertEqual(['foo'], d3)
@@ -212,12 +228,12 @@ class FuseTagsUpdateTest(MountTestBase):
def runTest(self):
self.make_mount(fuse.TagsDirectory, poll_time=1)
- self.assertIn('foo_tag', os.listdir(self.mounttmp))
+ self.assertIn('foo_tag', llfuse.listdir(self.mounttmp))
bar_uuid = run_test_server.fixture('collections')['bar_file']['uuid']
self.tag_collection(bar_uuid, 'fuse_test_tag')
time.sleep(1)
- self.assertIn('fuse_test_tag', os.listdir(self.mounttmp))
+ self.assertIn('fuse_test_tag', llfuse.listdir(self.mounttmp))
self.assertDirContents('fuse_test_tag', [bar_uuid])
baz_uuid = run_test_server.fixture('collections')['baz_file']['uuid']
@@ -238,14 +254,14 @@ class FuseSharedTest(MountTestBase):
# shared_dirs is a list of the directories exposed
# by fuse.SharedDirectory (i.e. any object visible
# to the current user)
- shared_dirs = os.listdir(self.mounttmp)
+ shared_dirs = llfuse.listdir(self.mounttmp)
shared_dirs.sort()
self.assertIn('FUSE User', shared_dirs)
# fuse_user_objs is a list of the objects owned by the FUSE
# test user (which present as files in the 'FUSE User'
# directory)
- fuse_user_objs = os.listdir(os.path.join(self.mounttmp, 'FUSE User'))
+ fuse_user_objs = llfuse.listdir(os.path.join(self.mounttmp, 'FUSE User'))
fuse_user_objs.sort()
self.assertEqual(['FUSE Test Project', # project owned by user
'collection #1 owned by FUSE', # collection owned by user
@@ -254,7 +270,7 @@ class FuseSharedTest(MountTestBase):
], fuse_user_objs)
# test_proj_files is a list of the files in the FUSE Test Project.
- test_proj_files = os.listdir(os.path.join(self.mounttmp, 'FUSE User', 'FUSE Test Project'))
+ test_proj_files = llfuse.listdir(os.path.join(self.mounttmp, 'FUSE User', 'FUSE Test Project'))
test_proj_files.sort()
self.assertEqual(['collection in FUSE project',
'pipeline instance in FUSE project.pipelineInstance',
@@ -289,10 +305,10 @@ class FuseHomeTest(MountTestBase):
self.make_mount(fuse.ProjectDirectory,
project_object=self.api.users().current().execute())
- d1 = os.listdir(self.mounttmp)
+ d1 = llfuse.listdir(self.mounttmp)
self.assertIn('Unrestricted public data', d1)
- d2 = os.listdir(os.path.join(self.mounttmp, 'Unrestricted public data'))
+ d2 = llfuse.listdir(os.path.join(self.mounttmp, 'Unrestricted public data'))
public_project = run_test_server.fixture('groups')[
'anonymously_accessible_project']
found_in = 0
@@ -312,7 +328,7 @@ class FuseHomeTest(MountTestBase):
self.assertNotEqual(0, found_in)
self.assertNotEqual(0, found_not_in)
- d3 = os.listdir(os.path.join(self.mounttmp, 'Unrestricted public data', 'GNU General Public License, version 3'))
+ d3 = llfuse.listdir(os.path.join(self.mounttmp, 'Unrestricted public data', 'GNU General Public License, version 3'))
self.assertEqual(["GNU_General_Public_License,_version_3.pdf"], d3)
class FuseUpdateFileTest(MountTestBase):
@@ -327,7 +343,7 @@ class FuseUpdateFileTest(MountTestBase):
with llfuse.lock:
m.new_collection(None, collection)
- d1 = os.listdir(self.mounttmp)
+ d1 = llfuse.listdir(self.mounttmp)
self.assertEqual(["file1.txt"], d1)
with open(os.path.join(self.mounttmp, "file1.txt")) as f:
self.assertEqual("blub", f.read())
@@ -335,7 +351,7 @@ class FuseUpdateFileTest(MountTestBase):
with collection.open("file1.txt", "w") as f:
f.write("plnp")
- d1 = os.listdir(self.mounttmp)
+ d1 = llfuse.listdir(self.mounttmp)
self.assertEqual(["file1.txt"], d1)
with open(os.path.join(self.mounttmp, "file1.txt")) as f:
self.assertEqual("plnp", f.read())
@@ -352,13 +368,13 @@ class FuseAddFileToCollectionTest(MountTestBase):
with llfuse.lock:
m.new_collection(None, collection)
- d1 = os.listdir(self.mounttmp)
+ d1 = llfuse.listdir(self.mounttmp)
self.assertEqual(["file1.txt"], d1)
with collection.open("file2.txt", "w") as f:
f.write("plnp")
- d1 = os.listdir(self.mounttmp)
+ d1 = llfuse.listdir(self.mounttmp)
self.assertEqual(["file1.txt", "file2.txt"], sorted(d1))
class FuseRemoveFileFromCollectionTest(MountTestBase):
@@ -376,12 +392,12 @@ class FuseRemoveFileFromCollectionTest(MountTestBase):
with llfuse.lock:
m.new_collection(None, collection)
- d1 = os.listdir(self.mounttmp)
+ d1 = llfuse.listdir(self.mounttmp)
self.assertEqual(["file1.txt", "file2.txt"], sorted(d1))
collection.remove("file2.txt")
- d1 = os.listdir(self.mounttmp)
+ d1 = llfuse.listdir(self.mounttmp)
self.assertEqual(["file1.txt"], d1)
class FuseCreateFileTest(MountTestBase):
@@ -406,13 +422,16 @@ class FuseCreateFileTest(MountTestBase):
self.assertIn("file1.txt", collection)
- d1 = os.listdir(self.mounttmp)
+ d1 = llfuse.listdir(self.mounttmp)
self.assertEqual(["file1.txt"], d1)
collection2 = self.api.collections().get(uuid=collection.manifest_locator()).execute()
self.assertRegexpMatches(collection2["manifest_text"],
r'\. d41d8cd98f00b204e9800998ecf8427e\+0\+A[a-f0-9]{40}@[a-f0-9]{8} 0:0:file1\.txt$')
+def fuseWriteFileTestHelper(mounttmp):
+ with open(os.path.join(mounttmp, "file1.txt"), "r") as f:
+ return f.read() == "Hello world!"
class FuseWriteFileTest(MountTestBase):
def runTest(self):
@@ -434,13 +453,36 @@ class FuseWriteFileTest(MountTestBase):
with collection.open("file1.txt") as f:
self.assertEqual(f.read(), "Hello world!")
- with open(os.path.join(self.mounttmp, "file1.txt"), "r") as f:
- self.assertEqual(f.read(), "Hello world!")
+ # We can't just open the collection for reading because the underlying
+ # C implementation of open() makes a fstat() syscall with the GIL still
+ # held. When the GETATTR message comes back to llfuse (which in these
+ # tests is in the same interpreter process) it can't acquire the GIL,
+ # so it can't service the fstat() call, so it deadlocks. The
+ # workaround is to run some of our test code in a separate process.
+ # Forturnately the multiprocessing module makes this relatively easy.
+ pool = multiprocessing.Pool(1)
+ self.assertTrue(pool.apply(fuseWriteFileTestHelper, (self.mounttmp,)))
collection2 = self.api.collections().get(uuid=collection.manifest_locator()).execute()
self.assertRegexpMatches(collection2["manifest_text"],
r'\. 86fb269d190d2c85f6e0468ceca42a20\+12\+A[a-f0-9]{40}@[a-f0-9]{8} 0:12:file1\.txt$')
+def fuseUpdateFileTestHelper1(mounttmp):
+ with open(os.path.join(mounttmp, "file1.txt"), "r+") as f:
+ fr = f.read()
+ if fr != "Hello world!":
+ raise Exception("Got %s expected 'Hello world!'" % fr)
+ f.seek(0)
+ f.write("Hola mundo!")
+ f.seek(0)
+ fr = f.read()
+ if fr != "Hola mundo!!":
+ raise Exception("Got %s expected 'Hola mundo!!'" % fr)
+ return True
+
+def fuseUpdateFileTestHelper2(mounttmp):
+ with open(os.path.join(mounttmp, "file1.txt"), "r") as f:
+ return f.read() == "Hola mundo!!"
class FuseUpdateFileTest(MountTestBase):
def runTest(self):
@@ -457,19 +499,14 @@ class FuseUpdateFileTest(MountTestBase):
with open(os.path.join(self.mounttmp, "file1.txt"), "w") as f:
f.write("Hello world!")
- with open(os.path.join(self.mounttmp, "file1.txt"), "r+") as f:
- self.assertEqual(f.read(), "Hello world!")
- f.seek(0)
- f.write("Hola mundo!")
- f.seek(0)
- self.assertEqual(f.read(), "Hola mundo!!")
-
- with open(os.path.join(self.mounttmp, "file1.txt"), "r") as f:
- self.assertEqual(f.read(), "Hola mundo!")
+ # See note in FuseWriteFileTest
+ pool = multiprocessing.Pool(1)
+ self.assertTrue(pool.apply(fuseUpdateFileTestHelper1, (self.mounttmp,)))
+ self.assertTrue(pool.apply(fuseUpdateFileTestHelper2, (self.mounttmp,)))
collection2 = self.api.collections().get(uuid=collection.manifest_locator()).execute()
self.assertRegexpMatches(collection2["manifest_text"],
- r'\. 86fb269d190d2c85f6e0468ceca42a20\+12\+A[a-f0-9]{40}@[a-f0-9]{8} 0:12:file1\.txt$')
+ r'\. daaef200ebb921e011e3ae922dd3266b\+11\+A[a-f0-9]{40}@[a-f0-9]{8} 86fb269d190d2c85f6e0468ceca42a20\+12\+A[a-f0-9]{40}@[a-f0-9]{8} 0:11:file1\.txt 22:1:file1\.txt$')
class FuseMkdirTest(MountTestBase):
@@ -493,13 +530,13 @@ class FuseMkdirTest(MountTestBase):
with self.assertRaises(OSError):
os.mkdir(os.path.join(self.mounttmp, "testdir"))
- d1 = os.listdir(self.mounttmp)
+ d1 = llfuse.listdir(self.mounttmp)
self.assertEqual(["testdir"], d1)
with open(os.path.join(self.mounttmp, "testdir", "file1.txt"), "w") as f:
f.write("Hello world!")
- d1 = os.listdir(os.path.join(self.mounttmp, "testdir"))
+ d1 = llfuse.listdir(os.path.join(self.mounttmp, "testdir"))
self.assertEqual(["file1.txt"], d1)
collection2 = self.api.collections().get(uuid=collection.manifest_locator()).execute()
@@ -533,14 +570,14 @@ class FuseRmTest(MountTestBase):
with self.assertRaises(OSError):
os.rmdir(os.path.join(self.mounttmp, "testdir"))
- d1 = os.listdir(os.path.join(self.mounttmp, "testdir"))
+ d1 = llfuse.listdir(os.path.join(self.mounttmp, "testdir"))
self.assertEqual(["file1.txt"], d1)
# Delete file
os.remove(os.path.join(self.mounttmp, "testdir", "file1.txt"))
# Make sure it's empty
- d1 = os.listdir(os.path.join(self.mounttmp, "testdir"))
+ d1 = llfuse.listdir(os.path.join(self.mounttmp, "testdir"))
self.assertEqual([], d1)
# Try to delete it again
@@ -555,7 +592,7 @@ class FuseRmTest(MountTestBase):
os.rmdir(os.path.join(self.mounttmp, "testdir"))
# Make sure it's empty
- d1 = os.listdir(os.path.join(self.mounttmp))
+ d1 = llfuse.listdir(os.path.join(self.mounttmp))
self.assertEqual([], d1)
# Try to delete it again
@@ -589,16 +626,16 @@ class FuseMvTest(MountTestBase):
self.assertRegexpMatches(collection2["manifest_text"],
r'\./testdir 86fb269d190d2c85f6e0468ceca42a20\+12\+A[a-f0-9]{40}@[a-f0-9]{8} 0:12:file1\.txt$')
- d1 = os.listdir(os.path.join(self.mounttmp))
+ d1 = llfuse.listdir(os.path.join(self.mounttmp))
self.assertEqual(["testdir"], d1)
- d1 = os.listdir(os.path.join(self.mounttmp, "testdir"))
+ d1 = llfuse.listdir(os.path.join(self.mounttmp, "testdir"))
self.assertEqual(["file1.txt"], d1)
os.rename(os.path.join(self.mounttmp, "testdir", "file1.txt"), os.path.join(self.mounttmp, "file1.txt"))
- d1 = os.listdir(os.path.join(self.mounttmp))
+ d1 = llfuse.listdir(os.path.join(self.mounttmp))
self.assertEqual(["file1.txt", "testdir"], sorted(d1))
- d1 = os.listdir(os.path.join(self.mounttmp, "testdir"))
+ d1 = llfuse.listdir(os.path.join(self.mounttmp, "testdir"))
self.assertEqual([], d1)
collection2 = self.api.collections().get(uuid=collection.manifest_locator()).execute()
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list