From 1fdfa8fbc3b8ccd12baa5a752cb083f35501a85b Mon Sep 17 00:00:00 2001 From: anton Date: Wed, 12 Jul 2023 18:36:06 +0000 Subject: [PATCH] Add test which consistently triggers the problem with test6_perms, omitting all other irrelevant files. --- regress/usr.bin/rsync/test13_perms.test | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 regress/usr.bin/rsync/test13_perms.test diff --git a/regress/usr.bin/rsync/test13_perms.test b/regress/usr.bin/rsync/test13_perms.test new file mode 100644 index 00000000000..79a010367be --- /dev/null +++ b/regress/usr.bin/rsync/test13_perms.test @@ -0,0 +1,23 @@ +#! /bin/sh + +. ${tstdir-.}/lib.sh +. ${tstdir-.}/conf.sh + +generate_tree() { + mkdirfile "${1}/one.txt" +} + +rm -rf dir1 dir2 dir3 +# make the copy-from-here tree +generate_tree dir1 +# make the tree we want to compare to +generate_tree dir2 + +# Also make the target tree and mess up some permissions in there. +# We expect rsync to reset this to what dir1 has. +generate_tree dir3 +chmod 070 dir3/one.txt +touch -m -t 199901020405 dir3/one.txt + +$rsync -a dir1/ dir3 +compare_trees dir2 dir3 -- 2.20.1