r38356 - in /desktop/unstable/gvfs/debian: changelog patches/00git_testsuite_fixes.patch patches/series

mpitt at users.alioth.debian.org mpitt at users.alioth.debian.org
Tue Jun 4 05:47:03 UTC 2013


Author: mpitt
Date: Tue Jun  4 05:47:02 2013
New Revision: 38356

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=38356
Log:
Add 00git_testsuite_fixes.patch: Import various test suite fixes from
upstream git head. This fixes the hang of the autopkgtest and makes
the tests work with Python 3.3.

Added:
    desktop/unstable/gvfs/debian/patches/00git_testsuite_fixes.patch
Modified:
    desktop/unstable/gvfs/debian/changelog
    desktop/unstable/gvfs/debian/patches/series

Modified: desktop/unstable/gvfs/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gvfs/debian/changelog?rev=38356&op=diff
==============================================================================
--- desktop/unstable/gvfs/debian/changelog [utf-8] (original)
+++ desktop/unstable/gvfs/debian/changelog [utf-8] Tue Jun  4 05:47:02 2013
@@ -1,3 +1,11 @@
+gvfs (1.16.2-3) UNRELEASED; urgency=low
+
+  * Add 00git_testsuite_fixes.patch: Import various test suite fixes from
+    upstream git head. This fixes the hang of the autopkgtest and makes
+    the tests work with Python 3.3.
+
+ -- Martin Pitt <mpitt at debian.org>  Tue, 04 Jun 2013 07:45:02 +0200
+
 gvfs (1.16.2-2) unstable; urgency=low
 
   * Upload to unstable.

Added: desktop/unstable/gvfs/debian/patches/00git_testsuite_fixes.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gvfs/debian/patches/00git_testsuite_fixes.patch?rev=38356&op=file
==============================================================================
--- desktop/unstable/gvfs/debian/patches/00git_testsuite_fixes.patch (added)
+++ desktop/unstable/gvfs/debian/patches/00git_testsuite_fixes.patch [utf-8] Tue Jun  4 05:47:02 2013
@@ -1,0 +1,128 @@
+Description: Import various test suite fixes from upstream git head.
+Author: Martin Pitt <martin.pitt at ubuntu.com>
+
+diff --git a/test/gvfs-test b/test/gvfs-test
+index e8b1416..1da2a8f 100755
+--- a/test/gvfs-test
++++ b/test/gvfs-test
+@@ -174,6 +174,10 @@ class GvfsTestCase(unittest.TestCase):
+         '''Wait for a gvfs-mount Popen process to show an User auth prompt'''
+ 
+         empty_timeout = 50
++
++        # set stdout to nonblocking
++        flags = fcntl.fcntl(popen.stdout, fcntl.F_GETFL)
++        fcntl.fcntl(popen.stdout, fcntl.F_SETFL, flags | os.O_NONBLOCK)
+         while True:
+             r = popen.stdout.read(1000)
+             #print('  wait_for_gvfs_mount_user_prompt: got "%s"' % str(r))
+@@ -185,6 +189,9 @@ class GvfsTestCase(unittest.TestCase):
+             empty_timeout -= 1
+             time.sleep(0.1)
+ 
++        # restore flags
++        fcntl.fcntl(popen.stdout, fcntl.F_SETFL, flags)
++
+     def mount_api(self, gfile, mount_op=None):
+         '''Mount a Gio.File using the Gio API
+         
+@@ -565,10 +572,12 @@ class Ftp(GvfsTestCase):
+         # wrong user name
+         self.wait_for_gvfs_mount_user_prompt(mount)
+         mount.stdin.write(b'eve\nh4ck\n')
++        mount.stdin.flush()
+ 
+         # wrong password name
+         self.wait_for_gvfs_mount_user_prompt(mount)
+         mount.stdin.write(b'testuser\nh4ck\n')
++        mount.stdin.flush()
+ 
+         # correct credentials
+         self.wait_for_gvfs_mount_user_prompt(mount)
+@@ -926,7 +935,7 @@ class Drive(GvfsTestCase):
+         ctx = GLib.MainContext().default()
+         while ctx.iteration(False):
+             pass
+-        self.monitor.stdout.readall()
++        self.monitor.stdout.read()
+ 
+     def setUp(self):
+         self.mock_polkit = None
+@@ -969,12 +978,6 @@ class Drive(GvfsTestCase):
+         self.assertRegex(out, 'should_automount=1')
+         self.assertRegex(out, 'themed icons:.*media-optical')
+ 
+-        # user is not on any local session in the sandbox, so mounting ought to
+-        # fail
+-        (code, out, err) = self.program_code_out_err(['gvfs-mount', '-d', '/dev/' + dev])
+-        self.assertNotEqual(code, 0)
+-        self.assertRegex(err, 'Not authorized')
+-
+         # tell polkit to do allow removable (but not internal) storage
+         self.start_polkit(['org.freedesktop.udisks2.filesystem-mount'])
+ 
+@@ -1159,6 +1162,7 @@ pkill --signal HUP udevd || pkill --signal HUP systemd-udevd
+         self.addCleanup(cleanup)
+         rootsh = subprocess.Popen(['./rootsh'], stdin=subprocess.PIPE)
+         rootsh.communicate(b'''export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
++mkdir -p /run/udev/rules.d
+ echo 'SUBSYSTEM=="block", ATTRS{model}=="scsi_debug*", ENV{ID_MEDIA_PLAYER}="MockTune"' > /run/udev/rules.d/40-scsi_debug-fake-mediaplayer.rules
+ sync
+ pkill --signal HUP udevd || pkill --signal HUP systemd-udevd
+@@ -1194,7 +1198,7 @@ pkill --signal HUP udevd || pkill --signal HUP systemd-udevd
+ 
+         empty_timeout = 50
+         while True:
+-            out = self.monitor.stdout.readall()
++            out = self.monitor.stdout.read()
+             if out:
+                 break
+             else:
+@@ -1206,7 +1210,7 @@ pkill --signal HUP udevd || pkill --signal HUP systemd-udevd
+ 
+         # wait a bit more to see whether we catch some stragglers
+         time.sleep(0.2)
+-        out2 = self.monitor.stdout.readall()
++        out2 = self.monitor.stdout.read()
+         if out2:
+             out += out2
+ 
+@@ -1220,6 +1224,8 @@ pkill --signal HUP udevd || pkill --signal HUP systemd-udevd
+                                             stdin=subprocess.PIPE)
+         self.mock_polkit.stdin.write(('set -e\n/home/test_polkitd.py -r -a %s\n'
+                                       % ','.join(actions)).encode('ASCII'))
++        self.mock_polkit.stdin.flush()
++
+         # wait until it started up
+         if actions:
+             timeout = 50
+@@ -1408,6 +1414,7 @@ DAVLockDB DAVLock
+         # wrong password
+         self.wait_for_gvfs_mount_user_prompt(mount)
+         mount.stdin.write(b'test\nh4ck\n')
++        mount.stdin.flush()
+ 
+         # correct password
+         (out, err) = mount.communicate(b's3kr1t\n')
+@@ -1429,6 +1436,7 @@ DAVLockDB DAVLock
+         # wrong password
+         self.wait_for_gvfs_mount_user_prompt(mount)
+         mount.stdin.write(b'test\nh4ck\n')
++        mount.stdin.flush()
+ 
+         # correct password
+         (out, err) = mount.communicate(b's3kr1t\n')
+diff --git a/test/gvfs-testbed b/test/gvfs-testbed
+index cd21dc3..b21bf84 100755
+--- a/test/gvfs-testbed
++++ b/test/gvfs-testbed
+@@ -52,7 +52,8 @@ MNT=`mktemp -d`
+ 
+ # work around scsi_debug not implementing CD-ROM SCSI commands
+ # see https://launchpad.net/bugs/1043182 for details
+-if [ -d /run/udev/rules.d/ -a ! -e /run/udev/rules.d/60-persistent-storage-scsi_debug.rules ]; then
++if [ -d /run/udev/ -a ! -e /run/udev/rules.d/60-persistent-storage-scsi_debug.rules ]; then
++    mkdir -p /run/udev/rules.d
+     cat <<EOF > /run/udev/rules.d/60-persistent-storage-scsi_debug.rules
+ KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ATTRS{model}=="scsi_debug*", ENV{ID_CDROM_MEDIA}=="?*", IMPORT{program}="/sbin/blkid -o udev -p -u noraid \$tempnode"
+ EOF

Modified: desktop/unstable/gvfs/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gvfs/debian/patches/series?rev=38356&op=diff
==============================================================================
--- desktop/unstable/gvfs/debian/patches/series [utf-8] (original)
+++ desktop/unstable/gvfs/debian/patches/series [utf-8] Tue Jun  4 05:47:02 2013
@@ -1,3 +1,4 @@
+00git_testsuite_fixes.patch
 01_modules_dir.patch
 04_hurd_path_max.patch
 05_shared_libdaemon.patch




More information about the pkg-gnome-commits mailing list