diff options
author | Martin Pool <mbp@samba.org> | 2002-01-25 10:56:43 +0000 |
---|---|---|
committer | Martin Pool <mbp@samba.org> | 2002-01-25 10:56:43 +0000 |
commit | 355b8bcd73745553449c6666abf92326590af9a4 (patch) | |
tree | 093be729f249e1248f94b0da193062316ef27a46 | |
parent | d58e4c273c6a8d770c4e0cd80d5f1b70270eb229 (diff) | |
download | rsync-355b8bcd73745553449c6666abf92326590af9a4.tar.gz |
Add test case for device nodes. This test will be skipped unless you
run "make check" as root.
-rw-r--r-- | testsuite/devices.test | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/testsuite/devices.test b/testsuite/devices.test new file mode 100644 index 00000000..89eec0b0 --- /dev/null +++ b/testsuite/devices.test @@ -0,0 +1,29 @@ +#! /bin/sh + +# Copyright (C) 2002 by Martin Pool <mbp@samba.org> + +# This program is distributable under the terms of the GNU GPL (see +# COPYING). + +# Test rsync handling of devices. This can only run if you're root. + +. $srcdir/testsuite/rsync.fns + +set -x + +# Build some hardlinks + +fromdir="$scratchdir/from" +todir="$scratchdir/to" + +# TODO: Need to test whether hardlinks are possible on this OS/filesystem + +mkdir "$fromdir" +mknod "$fromdir/char" c 42 69 || test_skipped "Can't create char device node?" +mknod "$fromdir/block" b 42 69 || test_skipped "Can't create block device node?" + +checkit "rsync -aHvv \"$fromdir/\" \"$todir/\"" "$fromdir" "$todir" + +exit 0 +# last [] may have failed but if we get here then we've won + |