|
|
ffd6ed |
From dd3263f82d6ee73808c31896136b795643cd24c4 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
|
|
|
0d20ef |
index 53fcab8..793d59d 100755
|
|
|
0d20ef |
--- a/tests/rsync/test-rsync.sh
|
|
|
0d20ef |
+++ b/tests/rsync/test-rsync.sh
|
|
|
0d20ef |
@@ -33,33 +33,10 @@ if ! rsync --help >/dev/null 2>&1; then
|
|
|
0d20ef |
exit 77
|
|
|
0d20ef |
fi
|
|
|
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 |
|
|
|
0d20ef |
# If rsync is not available, bail.
|
|
|
0d20ef |
if ! guestfish -a /dev/null run : available rsync; then
|
|
|
0d20ef |
@@ -79,7 +56,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]
|
|
|
0d20ef |
@@ -103,6 +80,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 |
--
|
|
|
0d20ef |
1.8.3.1
|
|
|
0d20ef |
|