List /etc instead of /, but only if it exists and is readable.
[rsync/rsync.git] / testsuite / longdir.test
... / ...
CommitLineData
1#!/bin/sh
2
3# Copyright (C) 1998,1999 Philip Hands <phil@hands.com>
4# Copyright (C) 2001 by Martin Pool <mbp@samba.org>
5#
6# This program is distributable under the terms of the GNU GPL (see COPYING)
7
8. "$suitedir/rsync.fns"
9
10set -x
11
12hands_setup
13
14longname=This-is-a-directory-with-a-stupidly-long-name-created-in-an-attempt-to-provoke-an-error-found-in-2.0.11-that-should-hopefully-never-appear-again-if-this-test-does-its-job
15longdir="$fromdir/$longname/$longname/$longname"
16
17makepath "$longdir" || test_skipped "unable to create long directory"
18touch "$longdir/1" || test_skipped "unable to create files in long directory"
19date > "$longdir/1"
20if [ -r /etc ]; then
21 ls -la /etc >"$longdir/2"
22else
23 ls -la / >"$longdir/2"
24fi
25checkit "$RSYNC --delete -avH \"$fromdir/\" \"$todir\"" "$fromdir/" "$todir"
26
27# The script would have aborted on error, so getting here means we've won.
28exit 0