summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Pitt <martinpitt@gnome.org>2012-10-16 15:59:05 +0200
committerAlexander Larsson <alexl@redhat.com>2012-10-17 09:44:06 +0200
commitfbc059e0f43dfab3db0916992019eb955adfe1c8 (patch)
tree242a63d2b4130c83c1021ed20a95908161bb5c2d
parentfb3f5e0830d69b4e80b4e4b1ad48f41fcaef6001 (diff)
downloadgvfs-fbc059e0f43dfab3db0916992019eb955adfe1c8.tar.gz
gvfs-test: Fix gvfs-mount waiting
unmount() was missing an actual sleep() in the waiting loop, leading to way too intensive polling. Also, always wait() on the Popen'ed gvfs-mount, to ensure we don't get zombies. https://bugzilla.gnome.org/show_bug.cgi?id=686006
-rwxr-xr-xtest/gvfs-test5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/gvfs-test b/test/gvfs-test
index bcffd4fe..6e018be3 100755
--- a/test/gvfs-test
+++ b/test/gvfs-test
@@ -119,12 +119,13 @@ class GvfsTestCase(unittest.TestCase):
def unmount(self, uri):
self.program_out_success(['gvfs-mount', '-u', uri])
- timeout = 50
+ timeout = 5
while timeout > 0:
(out, err) = self.program_out_err(['gvfs-mount', '-li'])
if 'Mount(0)' not in out:
break
timeout -= 1
+ time.sleep(1)
else:
self.fail('gvfs-mount -u %s failed' % uri)
@@ -548,8 +549,8 @@ ncalrpc dir = %(workdir)s/samba
break
else:
mount.terminate()
- mount.wait()
self.fail('timed out waiting for gvfs-mount %s' % uri)
+ mount.wait()
self.do_mount_check(uri, False)