summaryrefslogtreecommitdiff
path: root/net/rsync/files/patch-testsuite_xattrs.test
blob: 95a1a285d96b8a2ee5809d436c56611dd3b55519 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
--- a/testsuite/xattrs.test.orig	2022-10-20 16:09:26.000000000 +0000
+++ b/testsuite/xattrs.test	2025-06-29 07:49:45.880992000 +0000
@@ -10,7 +10,14 @@
 
 $RSYNC -VV | grep '"xattrs": true' >/dev/null || test_skipped "Rsync is configured without xattr support"
 
+CYGWIN=0
+
 case "$HOST_OS" in
+cygwin*)
+    CYGWIN=1
+esac
+
+case "$HOST_OS" in
 darwin*)
     xset() {
 	xnam="$1"
@@ -80,6 +87,9 @@
 echo deep >"$fromdir/foo/file3"
 echo normal >"$fromdir/file4"
 echo deeper >"$fromdir/foo/bar/file5"
+if [ $CYGWIN -eq 0 ]; then
+    echo longxattrname >"$fromdir/file7"
+fi
 
 makepath "$chkdir/foo"
 echo wow >"$chkdir/file1"
@@ -87,6 +97,10 @@
 
 dirs='foo foo/bar'
 files='file0 file1 file2 foo/file3 file4 foo/bar/file5'
+if [ $CYGWIN -eq 0 ]
+then
+        files="$files file7"
+fi
 
 uid_gid=`"$TOOLDIR/tls" "$fromdir/foo" | sed 's/^.* \([0-9][0-9]*\)\.\([0-9][0-9]*\) .*/\1:\2/'`
 
@@ -125,6 +139,16 @@
 xset user.foo 'old foo' "$chkdir/foo/file3"
 xset $RUSR.equal 'this long attribute should remain the same and not need to be transferred' "$chkdir/foo/file3"
 
+if [ $CYGWIN -eq 0 ] ; then
+# Generate xattr names
+SEQ=`seq 1 200`
+xset user."`printf -- 'A%0.s' $SEQ`" 'first xattr' file7
+xset user."`printf -- 'B%0.s' $SEQ`" 'second xattr' file7
+xset user."`printf -- 'C%0.s' $SEQ`" 'third xattr' file7
+xset user."`printf -- 'D%0.s' $SEQ`" 'another xattr' file7
+xset user."`printf -- 'E%0.s' $SEQ`" 'final xattr' file7
+fi
+
 case $0 in
 *hlink*)
     ln foo/bar/file5 foo/bar/file6 || test_skipped "Can't create hardlink"
@@ -234,6 +258,11 @@
 
 cd "$todir"
 xls file1 file2 | diff $diffopt "$scratchdir/xattrs.txt" -
+
+cd "$fromdir"
+rm -rf "$todir"
+mkfifo fifo1
+checktee "$RSYNC -avX --specials  $XFILT $dashH --super . '$chkdir/'" "$fromdir" "$chkdir"
 
 # The script would have aborted on error, so getting here means we've won.
 exit 0