Skip to content

Commit 8b9b324

Browse files
author
Rodrigo OSORIO
committed
Expand xattr tests for #766
When a file have many xattrs that the sum of all attribute names is larger than 1024, rsync will fail.
1 parent 9994933 commit 8b9b324

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

testsuite/xattrs.test

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,14 @@ echo else >"$fromdir/file2"
8080
echo deep >"$fromdir/foo/file3"
8181
echo normal >"$fromdir/file4"
8282
echo deeper >"$fromdir/foo/bar/file5"
83+
echo longxattrname >"$fromdir/file7"
8384

8485
makepath "$chkdir/foo"
8586
echo wow >"$chkdir/file1"
8687
cp_touch "$fromdir/foo/file3" "$chkdir/foo"
8788

8889
dirs='foo foo/bar'
89-
files='file0 file1 file2 foo/file3 file4 foo/bar/file5'
90+
files='file0 file1 file2 foo/file3 file4 foo/bar/file5 file7'
9091

9192
uid_gid=`"$TOOLDIR/tls" "$fromdir/foo" | sed 's/^.* \([0-9][0-9]*\)\.\([0-9][0-9]*\) .*/\1:\2/'`
9293

@@ -125,6 +126,14 @@ xset user.extra 'remove me' "$chkdir/file1"
125126
xset user.foo 'old foo' "$chkdir/foo/file3"
126127
xset $RUSR.equal 'this long attribute should remain the same and not need to be transferred' "$chkdir/foo/file3"
127128

129+
# Generate xattr names
130+
xset `seq 0 87 | tr "\n" "_"` 'first xattr' file7
131+
xset `seq 1 87 | tr "\n" "_"` 'second xattr' file7
132+
xset `seq 2 87 | tr "\n" "_"` 'third xattr' file7
133+
xset `seq 4 87 | tr "\n" "_"` 'another xattr' file7
134+
xset `seq 5 87 | tr "\n" "_"` 'final xattr' file7
135+
136+
128137
case $0 in
129138
*hlink*)
130139
ln foo/bar/file5 foo/bar/file6 || test_skipped "Can't create hardlink"

0 commit comments

Comments
 (0)