[libguestfs/f14/master] Use upstream patches to conditionally skip test-copy and test-virt-resize.

Richard W.M. Jones rjones at fedoraproject.org
Sat Oct 2 08:13:21 UTC 2010


commit 71866395889d14cd7e0922b75e491572c3933b5b
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Sat Oct 2 09:13:07 2010 +0100

    Use upstream patches to conditionally skip test-copy and test-virt-resize.

 libguestfs-1.5.18-disable-test-copy.patch     |   54 -------------------------
 libguestfs-1.5.21-skip-test-copy.patch        |   31 ++++++++++++++
 libguestfs-1.5.21-skip-test-virt-resize.patch |   29 +++++++++++++
 libguestfs.spec                               |   11 ++++-
 4 files changed, 68 insertions(+), 57 deletions(-)
---
diff --git a/libguestfs-1.5.21-skip-test-copy.patch b/libguestfs-1.5.21-skip-test-copy.patch
new file mode 100644
index 0000000..58268cc
--- /dev/null
+++ b/libguestfs-1.5.21-skip-test-copy.patch
@@ -0,0 +1,31 @@
+From 1a3324ea2b0f4a4e04f99c4efb5af1d4cc256731 Mon Sep 17 00:00:00 2001
+From: Richard W.M. Jones <rjones at redhat.com>
+Date: Sat, 2 Oct 2010 09:10:22 +0100
+Subject: [PATCH 2/2] test-copy: Skip this test if /dev/fd is missing, because of broken mock 1.1.4.
+
+---
+ regressions/test-copy.sh |    8 ++++++++
+ 1 files changed, 8 insertions(+), 0 deletions(-)
+
+diff --git a/regressions/test-copy.sh b/regressions/test-copy.sh
+index 237acd0..6cfb3f1 100755
+--- a/regressions/test-copy.sh
++++ b/regressions/test-copy.sh
+@@ -18,6 +18,14 @@
+ 
+ # Test guestfish copy-in and copy-out commands.
+ 
++# This test fails on some versions of mock which lack /dev/fd
++# directory.  Skip this test in that case.
++
++test -d /dev/fd || {
++    echo "$0: Skipping this test because /dev/fd is missing."
++    exit 0
++}
++
+ set -e
+ 
+ rm -f test1.img
+-- 
+1.7.3.1
+
diff --git a/libguestfs-1.5.21-skip-test-virt-resize.patch b/libguestfs-1.5.21-skip-test-virt-resize.patch
new file mode 100644
index 0000000..a2e09a3
--- /dev/null
+++ b/libguestfs-1.5.21-skip-test-virt-resize.patch
@@ -0,0 +1,29 @@
+From 887a79d1d1c47e537fdffd1208acbacd598b0f96 Mon Sep 17 00:00:00 2001
+From: Richard W.M. Jones <rjones at redhat.com>
+Date: Sat, 2 Oct 2010 09:07:42 +0100
+Subject: [PATCH 1/2] test-virt-resize: Skip this test on 32 bit hosts.
+
+---
+ tools/test-virt-resize.sh |    7 +++++++
+ 1 files changed, 7 insertions(+), 0 deletions(-)
+
+diff --git a/tools/test-virt-resize.sh b/tools/test-virt-resize.sh
+index 75d5147..2c343cb 100755
+--- a/tools/test-virt-resize.sh
++++ b/tools/test-virt-resize.sh
+@@ -1,5 +1,12 @@
+ #!/bin/bash -
+ 
++# virt-resize does not work on 32 bit because of limitations in Perl
++# so short-circuit this test on a 32 bit host.
++perl -e 'exit 1 if ~1 == 4294967294' || {
++    echo "$0: Skipping this test on 32 bit."
++    exit 0
++}
++
+ export LANG=C
+ set -e
+ 
+-- 
+1.7.3.1
+
diff --git a/libguestfs.spec b/libguestfs.spec
index f68f760..fefaaba 100644
--- a/libguestfs.spec
+++ b/libguestfs.spec
@@ -42,7 +42,7 @@ Summary:       Access and modify virtual machine disk images
 Name:          libguestfs
 Epoch:         1
 Version:       1.5.21
-Release:       1%{?dist}.2
+Release:       1%{?dist}.3
 License:       LGPLv2+
 Group:         Development/Libraries
 URL:           http://libguestfs.org/
@@ -52,8 +52,9 @@ BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root
 # Disable FUSE tests, not supported in Koji at the moment.
 Patch0:        libguestfs-1.0.79-no-fuse-test.patch
 
-# Disable test-copy since it requires /dev/fd which is not yet created by mock.
-Patch1:        libguestfs-1.5.18-disable-test-copy.patch
+# Upstream patches to skip problematic tests in some circumstances.
+Patch1:        libguestfs-1.5.21-skip-test-copy.patch
+Patch2:        libguestfs-1.5.21-skip-test-virt-resize.patch
 
 # Basic build requirements:
 BuildRequires: /usr/bin/pod2man
@@ -415,6 +416,7 @@ php-%{name} contains PHP bindings for %{name}.
 
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 mkdir -p daemon/m4
 
@@ -744,6 +746,9 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Sat Oct  2 2010 Richard Jones <rjones at redhat.com> - 1:1.5.21-1.fc14.3
+- Use upstream patches to conditionally skip test-copy and test-virt-resize.
+
 * Fri Oct  1 2010 Richard Jones <rjones at redhat.com> - 1:1.5.21-1.fc14.2
 - Put the /dev/fd avoidance patch back in, mock still not fixed.
 


More information about the scm-commits mailing list