Blob Blame History Raw
From 2f258581f9c706c5c92d0986e7bae8583ce145dd Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 2 Oct 2014 16:44:00 +0100
Subject: [PATCH] RHEL 7: Revert "tests: rsync: Skip this test when the backend
 is libvirt."

This reverts commit 765dc6237ce7b93dd2f33d99be53eae92e048a7a.
---
 tests/rsync/test-rsync.sh | 35 +++++++----------------------------
 1 file changed, 7 insertions(+), 28 deletions(-)

diff --git a/tests/rsync/test-rsync.sh b/tests/rsync/test-rsync.sh
index c6d98cfd1..246396276 100755
--- a/tests/rsync/test-rsync.sh
+++ b/tests/rsync/test-rsync.sh
@@ -26,33 +26,10 @@ skip_if_skipped
 skip_unless rsync --help
 skip_unless_feature_available rsync
 
-# Get host IP address.  XXX Bit of a hack.
-backend="$(guestfish get-backend)"
-case "$backend" in
-    direct)
-        ip=169.254.2.2
-        listen_address=localhost
-        ;;
-    libvirt|libvirt:*)
-        # This would work, except that the host firewall is effective
-        # on virbr0, and that is likely to block the non-standard port
-        # number that we listen on.
-#        ip="$(ip -4 -o address show virbr0 |
-#                  awk '{print $4}' |
-#                  awk -F/ '{print $1}')"
-#        listen_address="$ip"
-        echo "$0: skipping test because host firewall will probably prevent this test from working"
-        exit 77
-        ;;
-    uml)
-        echo "$0: skipping test because networking is not available in the UML backend"
-        exit 77
-        ;;
-    *)
-        echo "$0: don't know how to get IP address of backend $backend"
-        exit 77
-        ;;
-esac
+if [ "$(guestfish get-backend)" = "uml" ]; then
+    echo "$0: skipping test because networking is not available in the UML backend"
+    exit 77
+fi
 
 pwd="$(pwd)"
 datadir="$(cd ../../test-data/files && pwd)"
@@ -66,7 +43,7 @@ port="$(awk 'BEGIN{srand(); print 65000+int(500*rand())}' </dev/null)"
 
 # Write an rsync daemon config file.
 cat > rsyncd.conf <<EOF
-address = $listen_address
+address = localhost
 port = $port
 pid file = $pwd/rsyncd.pid
 [src]
@@ -90,6 +67,8 @@ function cleanup ()
 }
 trap cleanup INT TERM QUIT EXIT
 
+# XXX
+ip=169.254.2.2
 user="$(id -un)"
 
 guestfish --network -N test-rsync.img=fs -m /dev/sda1 <<EOF
-- 
2.17.1