mrc0mmand / rpms / libguestfs

Forked from rpms/libguestfs 3 years ago
Clone

Blame SOURCES/0007-RHEL-7-Revert-tests-rsync-Skip-this-test-when-the-ba.patch

a30de4
From 4706dff15716286461c0826da9f703dc1b49177d Mon Sep 17 00:00:00 2001
0d20ef
From: "Richard W.M. Jones" <rjones@redhat.com>
0d20ef
Date: Thu, 2 Oct 2014 16:44:00 +0100
0d20ef
Subject: [PATCH] RHEL 7: Revert "tests: rsync: Skip this test when the backend
0d20ef
 is libvirt."
0d20ef
0d20ef
This reverts commit 765dc6237ce7b93dd2f33d99be53eae92e048a7a.
0d20ef
---
0d20ef
 tests/rsync/test-rsync.sh | 35 +++++++----------------------------
0d20ef
 1 file changed, 7 insertions(+), 28 deletions(-)
0d20ef
0d20ef
diff --git a/tests/rsync/test-rsync.sh b/tests/rsync/test-rsync.sh
46ce2f
index c6d98cfd1..246396276 100755
0d20ef
--- a/tests/rsync/test-rsync.sh
0d20ef
+++ b/tests/rsync/test-rsync.sh
90a56e
@@ -26,33 +26,10 @@ skip_if_skipped
90a56e
 skip_unless rsync --help
90a56e
 skip_unless_feature_available rsync
0d20ef
 
0d20ef
-# Get host IP address.  XXX Bit of a hack.
0d20ef
-backend="$(guestfish get-backend)"
0d20ef
-case "$backend" in
0d20ef
-    direct)
0d20ef
-        ip=169.254.2.2
0d20ef
-        listen_address=localhost
0d20ef
-        ;;
0d20ef
-    libvirt|libvirt:*)
0d20ef
-        # This would work, except that the host firewall is effective
0d20ef
-        # on virbr0, and that is likely to block the non-standard port
0d20ef
-        # number that we listen on.
0d20ef
-#        ip="$(ip -4 -o address show virbr0 |
0d20ef
-#                  awk '{print $4}' |
0d20ef
-#                  awk -F/ '{print $1}')"
0d20ef
-#        listen_address="$ip"
0d20ef
-        echo "$0: skipping test because host firewall will probably prevent this test from working"
0d20ef
-        exit 77
0d20ef
-        ;;
0d20ef
-    uml)
0d20ef
-        echo "$0: skipping test because networking is not available in the UML backend"
0d20ef
-        exit 77
0d20ef
-        ;;
0d20ef
-    *)
0d20ef
-        echo "$0: don't know how to get IP address of backend $backend"
0d20ef
-        exit 77
0d20ef
-        ;;
0d20ef
-esac
0d20ef
+if [ "$(guestfish get-backend)" = "uml" ]; then
0d20ef
+    echo "$0: skipping test because networking is not available in the UML backend"
0d20ef
+    exit 77
0d20ef
+fi
0d20ef
 
90a56e
 pwd="$(pwd)"
90a56e
 datadir="$(cd ../../test-data/files && pwd)"
90a56e
@@ -66,7 +43,7 @@ port="$(awk 'BEGIN{srand(); print 65000+int(500*rand())}' 
0d20ef
 
0d20ef
 # Write an rsync daemon config file.
0d20ef
 cat > rsyncd.conf <
0d20ef
-address = $listen_address
0d20ef
+address = localhost
0d20ef
 port = $port
0d20ef
 pid file = $pwd/rsyncd.pid
0d20ef
 [src]
90a56e
@@ -90,6 +67,8 @@ function cleanup ()
0d20ef
 }
0d20ef
 trap cleanup INT TERM QUIT EXIT
0d20ef
 
0d20ef
+# XXX
0d20ef
+ip=169.254.2.2
0d20ef
 user="$(id -un)"
0d20ef
 
0d20ef
 guestfish --network -N test-rsync.img=fs -m /dev/sda1 <
0d20ef
-- 
a30de4
2.14.3
0d20ef