test/bin-test/test-dav-sync-metadata1.sh

Sat, 20 Apr 2024 13:01:58 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Sat, 20 Apr 2024 13:01:58 +0200
changeset 815
1f40ca07ae1b
parent 812
5fe4453fc025
child 817
22257f6d06a3
permissions
-rwxr-xr-x

add more xattr malloc checks

661
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
1 #!/bin/sh
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
2 #
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
4 #
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
5 # Copyright 2019 Olaf Wintermann. All rights reserved.
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
6 #
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
7 # Redistribution and use in source and binary forms, with or without
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
8 # modification, are permitted provided that the following conditions are met:
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
9 #
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
10 # 1. Redistributions of source code must retain the above copyright
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
11 # notice, this list of conditions and the following disclaimer.
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
12 #
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
13 # 2. Redistributions in binary form must reproduce the above copyright
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
14 # notice, this list of conditions and the following disclaimer in the
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
15 # documentation and/or other materials provided with the distribution.
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
16 #
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
17 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
18 # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
19 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
20 # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
21 # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
22 # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
23 # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
24 # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
25 # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
26 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
27 # POSSIBILITY OF SUCH DAMAGE.
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
28 #
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
29
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
30 if [ -z "$DAV_BIN" ];
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
31 then
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
32 echo "DAV_BIN variable not set"
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
33 exit 1
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
34 fi
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
35 if [ -z "$DAV_SYNC_BIN" ];
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
36 then
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
37 echo "DAV_BIN variable not set"
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
38 exit 1
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
39 fi
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
40
736
40be8db6fe45 fix dav-sync push creating finfo elements without using the mempool, which could lead to crashes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 671
diff changeset
41 TEST=`uname | grep BSD`
40be8db6fe45 fix dav-sync push creating finfo elements without using the mempool, which could lead to crashes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 671
diff changeset
42 if [ $? -eq 0 ];
40be8db6fe45 fix dav-sync push creating finfo elements without using the mempool, which could lead to crashes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 671
diff changeset
43 then
40be8db6fe45 fix dav-sync push creating finfo elements without using the mempool, which could lead to crashes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 671
diff changeset
44 alias stat_="stat -f %m"
40be8db6fe45 fix dav-sync push creating finfo elements without using the mempool, which could lead to crashes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 671
diff changeset
45 else
40be8db6fe45 fix dav-sync push creating finfo elements without using the mempool, which could lead to crashes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 671
diff changeset
46 alias stat_="stat -c %Y"
40be8db6fe45 fix dav-sync push creating finfo elements without using the mempool, which could lead to crashes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 671
diff changeset
47 fi
40be8db6fe45 fix dav-sync push creating finfo elements without using the mempool, which could lead to crashes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 671
diff changeset
48
763
fc24d1d1d695 fix dav-sync pull not storing finfo metadata correctly in the database
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 736
diff changeset
49 XATTR=../../build/bin/xattrtool
663
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
50
661
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
51 # checks if tmp-sync/out.txt contains a specific text
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
52 # arg1: pattern
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
53 # arg2: errormsg
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
54 check_tmpout()
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
55 {
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
56 TEST=`cat tmp-sync/out.txt | grep "$1"`
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
57 if [ $? -ne 0 ];
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
58 then
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
59 echo "$2"
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
60 exit 2
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
61 fi
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
62 }
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
63
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
64 # do dav-sync push and check return value
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
65 # arg1: dir
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
66 # arg2: errormsg
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
67 dav_sync_push()
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
68 {
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
69 $DAV_SYNC_BIN push $1 > tmp-sync/out.txt
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
70 if [ $? -ne 0 ];
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
71 then
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
72 echo "$2"
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
73 exit 2
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
74 fi
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
75 }
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
76 # do dav-sync pull and check return value
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
77 # arg1: dir
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
78 # arg2: errormsg
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
79 dav_sync_pull()
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
80 {
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
81 $DAV_SYNC_BIN pull $1 > tmp-sync/out.txt
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
82 if [ $? -ne 0 ];
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
83 then
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
84 echo "$2"
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
85 exit 2
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
86 fi
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
87 }
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
88
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
89 rm -f .dav/dav-sync-tests-test4a-db.xml
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
90 rm -f .dav/dav-sync-tests-test4b-db.xml
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
91
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
92 $DAV_BIN rm dav-test-repo/sync/test4 2> /dev/null
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
93
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
94 $DAV_BIN mkcol dav-test-repo/sync/test4 2> /dev/null
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
95
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
96 # tmp sync dir
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
97 rm -Rf tmp-sync
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
98 mkdir tmp-sync
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
99 mkdir tmp-sync/test4a
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
100 mkdir tmp-sync/test4b
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
101
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
102 # ----------------------------------------------------------------------------
662
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
103 # test 1: sync executable file and check if it can be executed
661
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
104 # expected result: exec works
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
105
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
106 echo "#!/bin/sh" > tmp-sync/test4a/script.sh
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
107 echo "echo itworks" >> tmp-sync/test4a/script.sh
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
108
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
109 chmod +x tmp-sync/test4a/script.sh
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
110
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
111 dav_sync_push test4a "test 1: push failed"
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
112 check_tmpout "1 file pushed" "test 1: wrong push counter"
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
113 check_tmpout "0 conflicts" "test 1: wrong conflict counter (push)"
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
114 check_tmpout "0 errors" "test 1: wrong error counter (push)"
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
115
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
116 dav_sync_pull test4b "test 1: pull failed"
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
117 check_tmpout "1 file pulled" "test 1: wrong pull counter"
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
118 check_tmpout "0 conflicts" "test 1: wrong conflict counter (pull)"
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
119 check_tmpout "0 errors" "test 1: wrong error counter (pull)"
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
120
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
121 # test if script in test4a works, if not, shell scripts are unsupported
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
122 # on this platform
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
123 ./tmp-sync/test4a/script.sh > /dev/null 2>&1
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
124 if [ $? -eq 0 ]; then
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
125 # shell scripts work
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
126
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
127 # test synced script
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
128 ./tmp-sync/test4b/script.sh > /dev/null 2>&1
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
129 if [ $? -ne 0 ]; then
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
130 echo "script not executable"
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
131 exit 2
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
132 fi
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
133 OUT=`./tmp-sync/test4b/script.sh 2> /dev/null`
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
134 if [ $OUT != "itworks" ]; then
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
135 echo "script.sh has wrong output"
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
136 exit 2
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
137 fi
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
138 fi
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
139
662
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
140 # ----------------------------------------------------------------------------
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
141 # test 2: set mtime to specific date and sync the file
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
142 # expected result: mtime the same on both sides
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
143
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
144 mkdir tmp-sync/test4a/dir1
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
145
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
146 cp synctest/file1 tmp-sync/test4a/
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
147 cp synctest/file2 tmp-sync/test4a/dir1/
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
148
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
149 touch -t 01011200 tmp-sync/test4a/file1
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
150 touch -t 02021200 tmp-sync/test4a/dir1/file2
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
151
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
152 dav_sync_push test4a "test 2: push failed"
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
153 check_tmpout "2 files pushed" "test 2: wrong push counter"
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
154 check_tmpout "0 conflicts" "test 2: wrong conflict counter (push)"
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
155 check_tmpout "0 errors" "test 2: wrong error counter (push)"
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
156
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
157 dav_sync_pull test4b "test 2: pull failed"
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
158 check_tmpout "2 files pulled" "test 2: wrong pull counter"
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
159 check_tmpout "0 conflicts" "test 2: wrong conflict counter (pull)"
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
160 check_tmpout "0 errors" "test 2: wrong error counter (pull)"
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
161
736
40be8db6fe45 fix dav-sync push creating finfo elements without using the mempool, which could lead to crashes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 671
diff changeset
162 MTIMEA1=`stat_ tmp-sync/test4a/file1`
40be8db6fe45 fix dav-sync push creating finfo elements without using the mempool, which could lead to crashes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 671
diff changeset
163 MTIMEB1=`stat_ tmp-sync/test4b/file1`
662
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
164
736
40be8db6fe45 fix dav-sync push creating finfo elements without using the mempool, which could lead to crashes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 671
diff changeset
165 MTIMEA2=`stat_ tmp-sync/test4a/dir1/file2`
40be8db6fe45 fix dav-sync push creating finfo elements without using the mempool, which could lead to crashes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 671
diff changeset
166 MTIMEB2=`stat_ tmp-sync/test4b/dir1/file2`
662
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
167
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
168 if [ $MTIMEA1 != $MTIMEB1 ]; then
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
169 echo "file1: mtime not synced"
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
170 exit 2
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
171 fi
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
172 if [ $MTIMEA2 != $MTIMEB2 ]; then
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
173 echo "file2: mtime not synced"
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
174 exit 2
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
175 fi
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
176
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
177 # ----------------------------------------------------------------------------
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
178 # test 3: modify file1 and push/pull
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
179 # expected result: file content synced, mtime also synced
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
180
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
181 echo "test3-mod1" >> tmp-sync/test4a/file1
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
182
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
183 dav_sync_push test4a "test 3: push failed"
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
184 check_tmpout "1 file pushed" "test 3: wrong push counter"
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
185 check_tmpout "0 conflicts" "test 3: wrong conflict counter (push)"
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
186 check_tmpout "0 errors" "test 3: wrong error counter (push)"
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
187
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
188 dav_sync_pull test4b "test 3: pull failed"
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
189 check_tmpout "1 file pulled" "test 3: wrong pull counter"
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
190 check_tmpout "0 conflicts" "test 3: wrong conflict counter (pull)"
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
191 check_tmpout "0 errors" "test 3: wrong error counter (pull)"
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
192
736
40be8db6fe45 fix dav-sync push creating finfo elements without using the mempool, which could lead to crashes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 671
diff changeset
193 MTIMEA1=`stat_ tmp-sync/test4a/file1`
40be8db6fe45 fix dav-sync push creating finfo elements without using the mempool, which could lead to crashes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 671
diff changeset
194 MTIMEB1=`stat_ tmp-sync/test4b/file1`
662
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
195
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
196 if [ $MTIMEA1 != $MTIMEB1 ]; then
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
197 echo "file1: mtime not synced"
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
198 exit 2
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
199 fi
663
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
200
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
201 # ----------------------------------------------------------------------------
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
202 # test 4: add xattr to files, push/pull
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
203 # expected result: xattr synced
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
204
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
205 # test if xattr are supported
763
fc24d1d1d695 fix dav-sync pull not storing finfo metadata correctly in the database
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 736
diff changeset
206 $XATTR set tmp-sync/test4a/file1 attr1 testv 2> /dev/null
fc24d1d1d695 fix dav-sync pull not storing finfo metadata correctly in the database
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 736
diff changeset
207 ATTR_TEST=`../../build/bin/xattrtool get tmp-sync/test4a/file1 attr1 2> /dev/null`
663
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
208 if [ $ATTR_TEST != "testv" ]; then
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
209 echo "xattr unsupported, skip"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
210 exit 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
211 fi
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
212
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
213 sleep 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
214
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
215 # add xattr to file without content modification
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
216 $XATTR set tmp-sync/test4a/file1 attr2 value2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
217 $XATTR set tmp-sync/test4a/file1 attr3 hello
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
218 $XATTR set tmp-sync/test4a/file1 attr4 hello
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
219 touch tmp-sync/test4a/file1
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
220
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
221 # modify file and add xattr
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
222 echo "test4-mod1" >> tmp-sync/test4a/dir1/file2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
223 $XATTR set tmp-sync/test4a/dir1/file2 msg helloworld
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
224
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
225 # create new file with extended attributes
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
226 echo "newfile" > tmp-sync/test4a/file3
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
227 $XATTR set tmp-sync/test4a/file3 msg helloworld
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
228
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
229 dav_sync_push test4a "test 4: push failed"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
230 check_tmpout "0 conflicts" "test 4: wrong conflict counter (push)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
231 check_tmpout "0 errors" "test 4: wrong error counter (push)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
232 check_tmpout "put: /file3" "test 4: file 3 not pushed"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
233 check_tmpout "put: /dir1/file2" "test 4: file 2 not pushed"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
234 check_tmpout "update: /file1" "test 4: file 1 not pushed"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
235
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
236 dav_sync_pull test4b "test 4: pull failed"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
237 check_tmpout "0 conflicts" "test 4: wrong conflict counter (pull)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
238 check_tmpout "0 errors" "test 4: wrong error counter (pull)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
239 check_tmpout "get: /file3" "test 4: file 3 not pulled"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
240 check_tmpout "get: /dir1/file2" "test 4: file 2 not pulled"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
241 check_tmpout "update: /file1" "test 4: file 1 not pulled"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
242
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
243 FILE1_ATTR2=`$XATTR get tmp-sync/test4b/file1 attr2 2> /dev/null`
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
244 FILE1_ATTR3=`$XATTR get tmp-sync/test4b/file1 attr3 2> /dev/null`
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
245 FILE1_ATTR4=`$XATTR get tmp-sync/test4b/file1 attr4 2> /dev/null`
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
246
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
247 FILE2_ATTR0=`$XATTR get tmp-sync/test4b/dir1/file2 msg 2> /dev/null`
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
248
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
249 FILE3_ATTR0=`$XATTR get tmp-sync/test4b/file3 msg 2> /dev/null`
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
250
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
251
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
252 if [ "$FILE1_ATTR2" != "value2" ]; then
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
253 echo "file1 attr2 has wrong value: $FILE1_ATTR2"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
254 exit 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
255 fi
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
256 if [ "$FILE1_ATTR3" != "hello" ]; then
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
257 echo "file1 attr3 has wrong value: $FILE1_ATTR3"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
258 exit 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
259 fi
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
260 if [ "$FILE1_ATTR4" != "hello" ]; then
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
261 echo "file1 attr4 has wrong value: $FILE1_ATTR4"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
262 exit 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
263 fi
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
264
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
265 if [ "$FILE2_ATTR0" != "helloworld" ]; then
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
266 echo "file2 attr has wrong value: $FILE2_ATTR0"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
267 exit 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
268 fi
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
269
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
270 if [ "$FILE3_ATTR0" != "helloworld" ]; then
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
271 echo "file3 attr has wrong value: $FILE3_ATTR0"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
272 exit 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
273 fi
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
274
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
275 # ----------------------------------------------------------------------------
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
276 # test 5: do nothing, push/pull
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
277 # expected result: no update, no files pushed/pulled
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
278
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
279 sleep 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
280
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
281 dav_sync_push test4a "test 5: push failed"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
282 check_tmpout "0 files pushed" "test 5: wrong push counter"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
283 check_tmpout "0 conflicts" "test 5: wrong conflict counter (push)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
284 check_tmpout "0 errors" "test 5: wrong error counter (push)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
285 LN=`cat tmp-sync/out.txt | wc -l`
671
5256d7eb69e7 fix test system on solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 667
diff changeset
286 if [ $LN -ne 1 ]; then
663
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
287 echo "test 5: wrong output (push)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
288 exit 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
289 fi
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
290
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
291 dav_sync_pull test4b "test 5: pull failed"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
292 check_tmpout "0 files pulled" "test 5: wrong pull counter"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
293 check_tmpout "0 conflicts" "test 5: wrong conflict counter (pull)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
294 check_tmpout "0 errors" "test 5: wrong error counter (pull)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
295 LN=`cat tmp-sync/out.txt | wc -l`
812
5fe4453fc025 make sure a LocalResource path has never a trailing path separator, fixes multiple dav-sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 763
diff changeset
296
671
5256d7eb69e7 fix test system on solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 667
diff changeset
297 if [ $LN -ne 1 ]; then
663
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
298 echo "test 5: wrong output (pull)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
299 exit 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
300 fi
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
301
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
302 # ----------------------------------------------------------------------------
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
303 # test 6: add additional xattr to files, push/pull
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
304 # expected result: xattr synced
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
305
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
306 sleep 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
307
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
308 $XATTR set tmp-sync/test4a/file1 test5 f1value5
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
309
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
310 echo "test6-mod1" >> tmp-sync/test4a/file3
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
311 $XATTR set tmp-sync/test4a/file3 test5 f3value5
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
312
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
313 dav_sync_push test4a "test 6: push failed"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
314 check_tmpout "0 conflicts" "test 6: wrong conflict counter (push)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
315 check_tmpout "0 errors" "test 6: wrong error counter (push)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
316 check_tmpout "put: /file3" "test 6: file 3 not pushed"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
317 check_tmpout "update: /file1" "test 6: file 1 not pushed"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
318
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
319 dav_sync_pull test4b "test 6: pull failed"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
320 check_tmpout "0 conflicts" "test 6: wrong conflict counter (pull)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
321 check_tmpout "0 errors" "test 6: wrong error counter (pull)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
322 check_tmpout "get: /file3" "test 6: file 3 not pulled"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
323 check_tmpout "update: /file1" "test 6: file 1 not pulled"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
324
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
325 TEST5=`$XATTR get tmp-sync/test4b/file1 test5 2> /dev/null`
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
326 if [ "$TEST5" != "f1value5" ]; then
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
327 echo "test 6: file1 attr has wrong value"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
328 exit 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
329 fi
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
330 TEST5=`$XATTR get tmp-sync/test4b/file3 test5 2> /dev/null`
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
331 if [ "$TEST5" != "f3value5" ]; then
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
332 echo "test 6: file3 attr has wrong value"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
333 exit 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
334 fi
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
335
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
336
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
337 # ----------------------------------------------------------------------------
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
338 # test 7: do nothing, push/pull
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
339 # expected result: no update, no files pushed/pulled
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
340
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
341 sleep 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
342
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
343 dav_sync_push test4a "test 7: push failed"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
344 check_tmpout "0 files pushed" "test 7: wrong push counter"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
345 check_tmpout "0 conflicts" "test 7: wrong conflict counter (push)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
346 check_tmpout "0 errors" "test 7: wrong error counter (push)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
347 LN=`cat tmp-sync/out.txt | wc -l`
671
5256d7eb69e7 fix test system on solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 667
diff changeset
348 if [ $LN -ne 1 ]; then
663
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
349 echo "test 7: wrong output (push)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
350 exit 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
351 fi
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
352
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
353 dav_sync_pull test4b "test 7: pull failed"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
354 check_tmpout "0 files pulled" "test 7: wrong pull counter"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
355 check_tmpout "0 conflicts" "test 7: wrong conflict counter (pull)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
356 check_tmpout "0 errors" "test 7: wrong error counter (pull)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
357 LN=`cat tmp-sync/out.txt | wc -l`
671
5256d7eb69e7 fix test system on solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 667
diff changeset
358 if [ $LN -ne 1 ]; then
663
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
359 echo "test 7: wrong output (pull)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
360 exit 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
361 fi
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
362
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
363
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
364 # ----------------------------------------------------------------------------
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
365 # test 8: remove xattr
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
366 # expected result: xattr removed in test4b
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
367
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
368 $XATTR remove tmp-sync/test4a/dir1/file2 msg
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
369 if [ $? -ne 0 ]; then
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
370 echo "test 8: xattrtool remove failed"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
371 exit 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
372 fi
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
373
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
374 touch tmp-sync/test4a/dir1/file2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
375
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
376 dav_sync_push test4a "test 8: push failed"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
377 check_tmpout "0 conflicts" "test 8: wrong conflict counter (push)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
378 check_tmpout "0 errors" "test 8: wrong error counter (push)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
379 check_tmpout "update: /dir1/file2" "test 8: file 1 not pushed"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
380
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
381 dav_sync_pull test4b "test 8: pull failed"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
382 check_tmpout "0 conflicts" "test 8: wrong conflict counter (pull)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
383 check_tmpout "0 errors" "test 8: wrong error counter (pull)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
384 check_tmpout "update: /dir1/file2" "test 8: file 1 not pulled"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
385
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
386 TEST6=`$XATTR get tmp-sync/test4b/dir1/file2 msg 2> /dev/null`
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
387 if [ "$TEST6" != "" ]; then
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
388 echo "test 8: xattr msg not removed"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
389 exit 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
390 fi
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
391
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
392
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
393 # ----------------------------------------------------------------------------
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
394 # test 9: do nothing, push/pull
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
395 # expected result: no update, no files pushed/pulled
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
396
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
397 sleep 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
398
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
399 dav_sync_push test4a "test 9: push failed"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
400 check_tmpout "0 files pushed" "test 9: wrong push counter"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
401 check_tmpout "0 conflicts" "test 9: wrong conflict counter (push)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
402 check_tmpout "0 errors" "test 9: wrong error counter (push)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
403 LN=`cat tmp-sync/out.txt | wc -l`
671
5256d7eb69e7 fix test system on solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 667
diff changeset
404 if [ $LN -ne 1 ]; then
667
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
405 echo "test 9: wrong output (push)"
663
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
406 exit 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
407 fi
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
408
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
409 dav_sync_pull test4b "test 9: pull failed"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
410 check_tmpout "0 files pulled" "test 9: wrong pull counter"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
411 check_tmpout "0 conflicts" "test 9: wrong conflict counter (pull)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
412 check_tmpout "0 errors" "test 9: wrong error counter (pull)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
413 LN=`cat tmp-sync/out.txt | wc -l`
671
5256d7eb69e7 fix test system on solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 667
diff changeset
414 if [ $LN -ne 1 ]; then
663
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
415 echo "test 9: wrong output (pull)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
416 exit 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
417 fi
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
418
667
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
419
665
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
420 # ----------------------------------------------------------------------------
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
421 # test 10: add tags to files and sync
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
422 # expected result: tags synced
663
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
423
665
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
424 touch tmp-sync/test4a/file1
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
425 echo "test10-mod1" >> tmp-sync/test4a/dir1/file2
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
426 echo "test10-new" >> tmp-sync/test4a/file4
663
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
427
665
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
428 $DAV_SYNC_BIN add-tag -s test4a tmp-sync/test4a/file1 test
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
429 if [ $? -ne 0 ]; then
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
430 echo "test 10: add-tag failed"
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
431 exit 2
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
432 fi
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
433 $DAV_SYNC_BIN add-tag -s test4a tmp-sync/test4a/dir1/file2 test
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
434 $DAV_SYNC_BIN add-tag -s test4a tmp-sync/test4a/file4 test
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
435
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
436 dav_sync_push test4a "test 10: push failed"
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
437 check_tmpout "0 conflicts" "test 10: wrong conflict counter (push)"
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
438 check_tmpout "0 errors" "test 10: wrong error counter (push)"
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
439 check_tmpout "put: /file4" "test 10: file 4 not pushed"
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
440 check_tmpout "put: /dir1/file2" "test 10: file 2 not pushed"
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
441 check_tmpout "update: /file1" "test 10: file 1 not pushed"
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
442
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
443 dav_sync_pull test4b "test 10: pull failed"
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
444 check_tmpout "0 conflicts" "test 10: wrong conflict counter (pull)"
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
445 check_tmpout "0 errors" "test 10: wrong error counter (pull)"
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
446 check_tmpout "get: /file4" "test 10: file 4 not pulled"
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
447 check_tmpout "get: /dir1/file2" "test 10: file 2 not pulled"
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
448 check_tmpout "update: /file1" "test 10: file 1 not pulled"
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
449
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
450 $DAV_SYNC_BIN list-tags -s test4b tmp-sync/test4b/file1 > tmp-sync/out.txt
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
451 check_tmpout "test" "test 10: file1 missing tag"
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
452 $DAV_SYNC_BIN list-tags -s test4b tmp-sync/test4b/file4 > tmp-sync/out.txt
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
453 check_tmpout "test" "test 10: file3 missing tag"
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
454 $DAV_SYNC_BIN list-tags -s test4b tmp-sync/test4b/dir1/file2 > tmp-sync/out.txt
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
455 check_tmpout "test" "test 10: file2 missing tag"
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
456
667
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
457
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
458 # ----------------------------------------------------------------------------
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
459 # test 11: check if double update happens
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
460 # expected result: nothing happens
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
461
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
462 dav_sync_push test4a "test 11: push failed"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
463 check_tmpout "0 files pushed" "test 11: wrong push counter"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
464 check_tmpout "0 conflicts" "test 11: wrong conflict counter (push)"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
465 check_tmpout "0 errors" "test 11: wrong error counter (push)"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
466 LN=`cat tmp-sync/out.txt | wc -l`
671
5256d7eb69e7 fix test system on solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 667
diff changeset
467 if [ $LN -ne 1 ]; then
667
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
468 echo "test 11: wrong output (push)"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
469 exit 2
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
470 fi
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
471
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
472 dav_sync_pull test4b "test 11: pull failed"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
473 check_tmpout "0 files pulled" "test 11: wrong pull counter"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
474 check_tmpout "0 conflicts" "test 11: wrong conflict counter (pull)"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
475 check_tmpout "0 errors" "test 11: wrong error counter (pull)"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
476 LN=`cat tmp-sync/out.txt | wc -l`
671
5256d7eb69e7 fix test system on solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 667
diff changeset
477 if [ $LN -ne 1 ]; then
667
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
478 echo "test 11: wrong output (pull)"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
479 exit 2
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
480 fi
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
481
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
482
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
483 # ----------------------------------------------------------------------------
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
484 # test 12: add tag, push test4a and pull test4a
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
485 # expected result: tags pushed, nothing pulled
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
486
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
487 $DAV_SYNC_BIN add-tag -s test4a tmp-sync/test4a/file1 work
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
488 touch -t 03011100 tmp-sync/test4a/file1
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
489
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
490 dav_sync_push test4a "test 12: push failed"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
491 check_tmpout "0 conflicts" "test 12: wrong conflict counter (push)"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
492 check_tmpout "0 errors" "test 12: wrong error counter (push)"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
493 check_tmpout "update: /file1" "test 12: file 1 not pushed"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
494
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
495 dav_sync_pull test4a "test 12: pull failed"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
496 check_tmpout "0 files pulled" "test 12: wrong pull counter"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
497 check_tmpout "0 conflicts" "test 12: wrong conflict counter (pull)"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
498 check_tmpout "0 errors" "test 12: wrong error counter (pull)"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
499 LN=`cat tmp-sync/out.txt | wc -l`
812
5fe4453fc025 make sure a LocalResource path has never a trailing path separator, fixes multiple dav-sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 763
diff changeset
500
671
5256d7eb69e7 fix test system on solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 667
diff changeset
501 if [ $LN -ne 1 ]; then
667
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
502 echo "test 12: wrong output (pull)"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
503 exit 2
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
504 fi
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
505
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
506
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
507 # ----------------------------------------------------------------------------
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
508 # test 13: pull test4b
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
509 # expected result: update file1, sync tags
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
510
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
511 dav_sync_pull test4b "test 13: pull failed"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
512 check_tmpout "0 conflicts" "test 13: wrong conflict counter (pull)"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
513 check_tmpout "0 errors" "test 13: wrong error counter (pull)"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
514 check_tmpout "update: /file1" "test 13: file 1 not pulled"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
515
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
516 $DAV_SYNC_BIN list-tags -s test4b tmp-sync/test4b/file1 > tmp-sync/out.txt
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
517 check_tmpout "test" "test 13: file1 missing tag 'test'"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
518 check_tmpout "work" "test 13: file1 missing tag 'work'"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
519
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
520
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
521 # ----------------------------------------------------------------------------
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
522 # test 14: remove tags from file4 and sync
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
523 # expected result: tags removed
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
524
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
525 $DAV_SYNC_BIN remove-tag -s test4a tmp-sync/test4a/file4 test
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
526 touch -t 04011100 tmp-sync/test4a/file4
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
527
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
528 dav_sync_push test4a "test 14: push failed"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
529 check_tmpout "0 conflicts" "test 14: wrong conflict counter (push)"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
530 check_tmpout "0 errors" "test 14: wrong error counter (push)"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
531 check_tmpout "update: /file4" "test 14: file 4 not pushed"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
532
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
533 dav_sync_pull test4b "test 14: pull failed"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
534 check_tmpout "0 conflicts" "test 14: wrong conflict counter (pull)"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
535 check_tmpout "0 errors" "test 14: wrong error counter (pull)"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
536 check_tmpout "update: /file4" "test 14: file 4 not pulled"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
537
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
538 LN=`$DAV_SYNC_BIN list-tags -s test4b tmp-sync/test4b/file4 | wc -l`
671
5256d7eb69e7 fix test system on solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 667
diff changeset
539 if [ $LN -ne 0 ]; then
667
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
540 echo "test 14: wrong tag count"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
541 exit 2
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
542 fi
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
543

mercurial