Fixed the destination path check so that it cannot exclude a
[rsync/rsync.git] / testsuite / daemon.test
CommitLineData
232ce2b2
MP
1#!/bin/sh
2
3# Copyright (C) 2001 by Martin Pool <mbp@samba.org>
4
5# This program is distributable under the terms of the GNU GPL (see
6# COPYING)
7
8fef0245
MP
8# We don't really want to start the server listening, because that
9# might interfere with the security or operation of the test machine.
10# Instead we use the fake-connect feature to dynamically assign a pair
11# of ports.
232ce2b2
MP
12
13# Having started the server we try some basic operations against it:
14
15# getting a list of module
16# listing files in a module
17# retrieving a module
18# uploading to a module
19# checking the log file
20# password authentication
21
22# TODO: Put the common framework in a common file, so that we can have
23# subtests fail and keep going.
24
c13ad7ec 25. "$suitedir/rsync.fns"
232ce2b2 26
276cc455 27SSH="src/support/lsh --no-cd"
d1c06c21 28
3aae15ec 29build_rsyncd_conf
232ce2b2 30
d1c06c21
WD
31cd "$scratchdir"
32
33ln -s test-rsyncd.conf rsyncd.conf
34
09ad9053
WD
35confopt=''
36case `id -u` in
370)
38 # Root needs to specify the config file, or it uses /etc/rsyncd.conf.
39 echo "Forcing --config=$conf"
40 confopt=" --config=$conf"
41 ;;
42esac
43
276cc455 44$RSYNC -ve "$SSH" --rsync-path="$RSYNC$confopt" localhost::
d1c06c21 45
06464f55 46RSYNC_CONNECT_PROG="$RSYNC --config=$conf --daemon"
6cd7888e 47export RSYNC_CONNECT_PROG
232ce2b2 48
06464f55 49$RSYNC -v localhost::