Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liblongpath-rsync
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liblongpath
liblongpath-rsync
Commits
844810d6
Commit
844810d6
authored
Jun 17, 2008
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid problems with timestamp rounding that cp -p and touch -r may do.
parent
67347196
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
39 additions
and
15 deletions
+39
-15
backup.test
testsuite/backup.test
+1
-1
devices.test
testsuite/devices.test
+2
-1
exclude.test
testsuite/exclude.test
+3
-3
fuzzy.test
testsuite/fuzzy.test
+1
-1
merge.test
testsuite/merge.test
+8
-8
rsync.fns
testsuite/rsync.fns
+23
-0
xattrs.test
testsuite/xattrs.test
+1
-1
No files found.
testsuite/backup.test
View file @
844810d6
...
...
@@ -36,7 +36,7 @@ for fn in deep/name1 deep/name2; do
done
echo
deleted
-
file
>
"
$todir
/dname"
cp
-
p
"
$todir
/dname"
"
$chkdir
"
cp
_touch
"
$todir
/dname"
"
$chkdir
"
checkit
"
$RSYNC
-avv --no-whole-file --delete-delay \
--backup --backup-dir='
$bakdir
' '
$fromdir
/' '
$todir
/'"
"
$fromdir
"
"
$todir
"
\
...
...
testsuite/devices.test
View file @
844810d6
...
...
@@ -76,7 +76,8 @@ mknod "$fromdir/block2" b 42 73 || test_skipped "Can't create block device node"
mknod
"
$fromdir
/block3"
b
105
73
||
test_skipped
"Can't create block device node"
ln
"
$fromdir
/block3"
"
$fromdir
/block2.5"
||
echo
"Skipping hard-linked device test..."
mkfifo
"
$fromdir
/fifo"
||
mknod
"
$fromdir
/fifo"
p
||
test_skipped
"Can't run mkfifo"
touch
-
r
"
$fromdir
/block"
"
$fromdir
/block2"
# Work around time rounding/truncating issue by touching both files.
touch
-
r
"
$fromdir
/block"
"
$fromdir
/block"
"
$fromdir
/block2"
$RSYNC
-
ai
"
$fromdir
/block"
"
$todir
/block2"
\
|
tee
"
$outfile
"
...
...
testsuite/exclude.test
View file @
844810d6
...
...
@@ -153,13 +153,13 @@ checkit "$RSYNC -avvC --filter='merge $excl' --delete-excluded \
rm "
$chkdir
"/foo/file1
rm "
$chkdir
"/bar/down/to/bar/baz/*.deep
cp
-p
"
$fromdir
"/bar/down/to/foo/*.junk "
$chkdir
"/bar/down/to/foo
cp
-p
"
$fromdir
"/bar/down/to/foo/to "
$chkdir
"/bar/down/to/foo
cp
_touch
"
$fromdir
"/bar/down/to/foo/*.junk "
$chkdir
"/bar/down/to/foo
cp
_touch
"
$fromdir
"/bar/down/to/foo/to "
$chkdir
"/bar/down/to/foo
$RSYNC
-av --existing -f 'show .filt*' -f 'hide,! */' --del "
$fromdir
/
" "
$todir
/
"
echo retained >"
$todir
"/bar/down/to/bar/baz/nodel.deep
cp
-p
"
$todir
"/bar/down/to/bar/baz/nodel.deep "
$chkdir
"/bar/down/to/bar/baz
cp
_touch
"
$todir
"/bar/down/to/bar/baz/nodel.deep "
$chkdir
"/bar/down/to/bar/baz
$RSYNC
-av --existing --filter='-! */' "
$fromdir
/
" "
$chkdir
/
"
...
...
testsuite/fuzzy.test
View file @
844810d6
...
...
@@ -13,7 +13,7 @@ mkdir "$fromdir"
mkdir
"
$todir
"
cp
-
p
"
$srcdir
"
/
rsync
.
c
"
$fromdir
"
/
rsync
.
c
cp
-
p
"
$fromdir
"
/
rsync
.
c
"
$todir
"
/
rsync2
.
c
cp
_touch
"
$fromdir
"
/
rsync
.
c
"
$todir
"
/
rsync2
.
c
sleep
1
# Let's do it!
...
...
testsuite/merge.test
View file @
844810d6
...
...
@@ -19,15 +19,15 @@ mkdir from2/sub1 from3/sub1
mkdir
from3
/
sub2
from1
/
dir
-
and
-
not
-
dir
mkdir
chk
chk
/
sub1
chk
/
sub2
chk
/
dir
-
and
-
not
-
dir
echo
"one"
>
from1
/
one
cp
-
p
from1
/
one
from2
/
one
cp
-
p
from1
/
one
from3
/
one
cp
_touch
from1
/
one
from2
/
one
cp
_touch
from1
/
one
from3
/
one
echo
"two"
>
from1
/
two
echo
"three"
>
from2
/
three
echo
"four"
>
from3
/
four
echo
"five"
>
from1
/
five
echo
"six"
>
from3
/
six
echo
"sub1"
>
from2
/
sub1
/
uno
cp
-
p
from2
/
sub1
/
uno
from3
/
sub1
/
uno
cp
_touch
from2
/
sub1
/
uno
from3
/
sub1
/
uno
echo
"sub2"
>
from3
/
sub1
/
dos
echo
"sub3"
>
from2
/
sub1
/
tres
echo
"subby"
>
from3
/
sub2
/
subby
...
...
@@ -36,11 +36,11 @@ echo "not-dir" >from3/dir-and-not-dir
echo
"arg-test"
>
deep
/
arg
-
test
echo
"shallow"
>
shallow
cp
-
p
from1
/
one
from1
/
two
from2
/
three
from3
/
four
from1
/
five
from3
/
six
chk
cp
-
p
deep
/
arg
-
test
shallow
chk
cp
-
p
from1
/
dir
-
and
-
not
-
dir
/
inside
chk
/
dir
-
and
-
not
-
dir
cp
-
p
from2
/
sub1
/
uno
from3
/
sub1
/
dos
from2
/
sub1
/
tres
chk
/
sub1
cp
-
p
from3
/
sub2
/
subby
chk
/
sub2
cp
_touch
from1
/
one
from1
/
two
from2
/
three
from3
/
four
from1
/
five
from3
/
six
chk
cp
_touch
deep
/
arg
-
test
shallow
chk
cp
_touch
from1
/
dir
-
and
-
not
-
dir
/
inside
chk
/
dir
-
and
-
not
-
dir
cp
_touch
from2
/
sub1
/
uno
from3
/
sub1
/
dos
from2
/
sub1
/
tres
chk
/
sub1
cp
_touch
from3
/
sub2
/
subby
chk
/
sub2
# Make sure that time has moved on.
sleep
1
...
...
testsuite/rsync.fns
View file @
844810d6
...
...
@@ -52,6 +52,29 @@ runtest() {
fi
}
set_cp_destdir
()
{
while
test
$#
-gt
1
;
do
shift
done
destdir
=
"
$1
"
}
# Perform a "cp -p", making sure that timestamps are really the same,
# even if the copy rounded microsecond times on the destination file.
cp_touch
()
{
cp
-p
"
${
@
}
"
||
test_fail
"cp -p failed"
if
test
$#
-gt
2
-o
-d
"
$2
"
;
then
set_cp_destdir
"
${
@
}
"
# sets destdir var
while
test
$#
-gt
1
;
do
destname
=
"
$destdir
/
`
basename
$1
`
"
touch
-r
"
$destname
"
"
$1
"
"
$destname
"
shift
done
else
touch
-r
"
$2
"
"
$1
"
"
$2
"
fi
}
# Call this if you want to filter out verbose messages (-v or -vv) from
# the output of an rsync run (whittling the output down to just the file
# messages). This isn't needed if you use -i without -v.
...
...
testsuite/xattrs.test
View file @
844810d6
...
...
@@ -46,7 +46,7 @@ echo deeper >"$fromdir/foo/bar/file5"
makepath
"
$chkdir
/foo"
echo
wow
>
"
$chkdir
/file1"
cp
-
p
"
$fromdir
/foo/file3"
"
$chkdir
/foo"
cp
_touch
"
$fromdir
/foo/file3"
"
$chkdir
/foo"
files
=
'foo file0 file1 file2 foo/file3 file4 foo/bar/file5'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment