[gvfs] gvfs-test: Check for URI string presence on CLI unmount



commit a27fc080c1c6c09720c31bc8f323913ad8a772cb
Author: Tomas Bzatek <tbzatek redhat com>
Date:   Fri Feb 8 16:58:07 2013 +0100

    gvfs-test: Check for URI string presence on CLI unmount
    
    Turned out we can't easily check for 'Mount(0)' in `gvfs-mount -l`
    output since that string can be present from a system mount,
    either fstab or native volume monitor. Think of a mounted CD-ROM
    drive.
    
    We can't disable volume monitors either since there are tests that
    require it. The best solution would be to check for the particular
    URI but then we need to ensure the strings match (i.e. escaping issues),
    bringing more stress to properly formatted URIs.
    
    This fixes false unmount error reports when there was something else
    mounted as 'Mount(0)'.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=691336

 test/gvfs-test |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/test/gvfs-test b/test/gvfs-test
index 58f85fc..641f770 100755
--- a/test/gvfs-test
+++ b/test/gvfs-test
@@ -157,7 +157,7 @@ class GvfsTestCase(unittest.TestCase):
         timeout = 5
         while timeout > 0:
             (out, err) = self.program_out_err(['gvfs-mount', '-li'])
-            if 'Mount(0)' not in out:
+            if uri not in out:
                 break
             timeout -= 1
             time.sleep(1)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]