xref: /openbsd-src/regress/usr.bin/rsync/test6_perms.test (revision 932b7127be46854fb6d1ab69a58afbd62992e1ab)
13a0ab0b7Sclaudio#! /bin/sh
23a0ab0b7Sclaudio
33a0ab0b7Sclaudio. ${tstdir-.}/lib.sh
43a0ab0b7Sclaudio. ${tstdir-.}/conf.sh
53a0ab0b7Sclaudio
63a0ab0b7Sclaudiorm -rf dir1 dir2 dir3
73a0ab0b7Sclaudio# make the copy-from-here tree
83a0ab0b7Sclaudiomkdir dir1
93a0ab0b7Sclaudiocd dir1
103a0ab0b7Sclaudiogenerate_tree_1
113a0ab0b7Sclaudio# make the tree we want to compare to
123a0ab0b7Sclaudiomkdir ../dir2
133a0ab0b7Sclaudiocd ../dir2
143a0ab0b7Sclaudiogenerate_tree_1
153a0ab0b7Sclaudio
163a0ab0b7Sclaudio# Also make the target tree and mess up some permissions in there.
173a0ab0b7Sclaudio# We expect rsync to reset this to what dir1 has.
183a0ab0b7Sclaudiomkdir ../dir3
193a0ab0b7Sclaudiocd ../dir3
203a0ab0b7Sclaudiogenerate_tree_1
213a0ab0b7Sclaudiochmod 600 foo/bar/baz/one.txt
22dd258625Santontouch -m -t 199901020405 foo/bar/baz/one.txt
23*932b7127Sbluhmchmod 470 foo/bar/baz/one2.txt
24dd258625Santontouch -m -t 199901020405 foo/bar/baz/one2.txt
253a0ab0b7Sclaudio
263a0ab0b7Sclaudiocd ..
273a0ab0b7Sclaudio$rsync -a dir1/ dir3
283a0ab0b7Sclaudiocompare_trees dir2 dir3
29