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

Thu, 20 Jul 2023 21:16:19 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Thu, 20 Jul 2023 21:16:19 +0200
changeset 782
3cfe65695a8c
parent 763
fc24d1d1d695
child 812
5fe4453fc025
permissions
-rwxr-xr-x

open logfile in relevant dav-sync commands

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
663
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
177
662
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
178 # ----------------------------------------------------------------------------
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
179 # test 3: modify file1 and push/pull
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
180 # expected result: file content synced, mtime also synced
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
181
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
182 echo "test3-mod1" >> tmp-sync/test4a/file1
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
183
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
184 dav_sync_push test4a "test 3: push failed"
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
185 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
186 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
187 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
188
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
189 dav_sync_pull test4b "test 3: pull failed"
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
190 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
191 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
192 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
193
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
194 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
195 MTIMEB1=`stat_ tmp-sync/test4b/file1`
662
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
196
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
197 if [ $MTIMEA1 != $MTIMEB1 ]; then
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
198 echo "file1: mtime not synced"
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
199 exit 2
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
200 fi
663
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
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
203 # ----------------------------------------------------------------------------
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
204 # test 4: add xattr to files, push/pull
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
205 # expected result: xattr synced
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
206
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
207 # 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
208 $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
209 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
210 if [ $ATTR_TEST != "testv" ]; then
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
211 echo "xattr unsupported, skip"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
212 exit 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
213 fi
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 sleep 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
216
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
217 # add xattr to file without content modification
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
218 $XATTR set tmp-sync/test4a/file1 attr2 value2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
219 $XATTR set tmp-sync/test4a/file1 attr3 hello
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
220 $XATTR set tmp-sync/test4a/file1 attr4 hello
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
221 touch tmp-sync/test4a/file1
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
222
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
223 # modify file and add xattr
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
224 echo "test4-mod1" >> tmp-sync/test4a/dir1/file2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
225 $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
226
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
227 # create new file with extended attributes
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
228 echo "newfile" > tmp-sync/test4a/file3
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
229 $XATTR set tmp-sync/test4a/file3 msg helloworld
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
230
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
231 dav_sync_push test4a "test 4: push failed"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
232 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
233 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
234 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
235 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
236 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
237
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
238 dav_sync_pull test4b "test 4: pull failed"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
239 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
240 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
241 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
242 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
243 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
244
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
245 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
246 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
247 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
248
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
249 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
250
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
251 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
252
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
253
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
254 if [ "$FILE1_ATTR2" != "value2" ]; then
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
255 echo "file1 attr2 has wrong value: $FILE1_ATTR2"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
256 exit 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
257 fi
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
258 if [ "$FILE1_ATTR3" != "hello" ]; then
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
259 echo "file1 attr3 has wrong value: $FILE1_ATTR3"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
260 exit 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
261 fi
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
262 if [ "$FILE1_ATTR4" != "hello" ]; then
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
263 echo "file1 attr4 has wrong value: $FILE1_ATTR4"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
264 exit 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
265 fi
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
266
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
267 if [ "$FILE2_ATTR0" != "helloworld" ]; then
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
268 echo "file2 attr has wrong value: $FILE2_ATTR0"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
269 exit 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
270 fi
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
271
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
272 if [ "$FILE3_ATTR0" != "helloworld" ]; then
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
273 echo "file3 attr has wrong value: $FILE3_ATTR0"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
274 exit 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
275 fi
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
276
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
277
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 # test 5: do nothing, push/pull
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
280 # expected result: no update, no files pushed/pulled
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
281
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
282 sleep 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
283
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
284 dav_sync_push test4a "test 5: push failed"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
285 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
286 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
287 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
288 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
289 if [ $LN -ne 1 ]; then
663
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
290 echo "test 5: wrong output (push)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
291 exit 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
292 fi
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
293
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
294 dav_sync_pull test4b "test 5: pull failed"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
295 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
296 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
297 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
298 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
299 if [ $LN -ne 1 ]; then
663
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
300 echo "test 5: wrong output (pull)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
301 exit 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
302 fi
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
303
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
304
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 # 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
307 # expected result: xattr synced
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
308
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
309 sleep 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
310
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
311 $XATTR set tmp-sync/test4a/file1 test5 f1value5
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 echo "test6-mod1" >> tmp-sync/test4a/file3
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
314 $XATTR set tmp-sync/test4a/file3 test5 f3value5
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
315
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
316 dav_sync_push test4a "test 6: push failed"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
317 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
318 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
319 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
320 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
321
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
322 dav_sync_pull test4b "test 6: pull failed"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
323 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
324 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
325 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
326 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
327
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
328 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
329 if [ "$TEST5" != "f1value5" ]; then
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
330 echo "test 6: file1 attr has wrong value"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
331 exit 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
332 fi
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
333 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
334 if [ "$TEST5" != "f3value5" ]; then
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
335 echo "test 6: file3 attr has wrong value"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
336 exit 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
337 fi
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
338
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
339
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 # test 7: do nothing, push/pull
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
342 # expected result: no update, no files pushed/pulled
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
343
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
344 sleep 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
345
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
346 dav_sync_push test4a "test 7: push failed"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
347 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
348 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
349 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
350 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
351 if [ $LN -ne 1 ]; then
663
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
352 echo "test 7: wrong output (push)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
353 exit 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
354 fi
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
355
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
356 dav_sync_pull test4b "test 7: pull failed"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
357 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
358 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
359 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
360 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
361 if [ $LN -ne 1 ]; then
663
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
362 echo "test 7: wrong output (pull)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
363 exit 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
364 fi
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
365
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
366
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 # test 8: remove xattr
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
369 # expected result: xattr removed in test4b
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
370
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
371 $XATTR remove tmp-sync/test4a/dir1/file2 msg
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
372 if [ $? -ne 0 ]; then
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
373 echo "test 8: xattrtool remove failed"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
374 exit 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
375 fi
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
376
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
377 touch tmp-sync/test4a/dir1/file2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
378
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
379 dav_sync_push test4a "test 8: push failed"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
380 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
381 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
382 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
383
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
384 dav_sync_pull test4b "test 8: pull failed"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
385 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
386 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
387 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
388
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
389 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
390 if [ "$TEST6" != "" ]; then
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
391 echo "test 8: xattr msg not removed"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
392 exit 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
393 fi
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
394
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
395
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 # test 9: do nothing, push/pull
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
398 # expected result: no update, no files pushed/pulled
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
399
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
400 sleep 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
401
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
402 dav_sync_push test4a "test 9: push failed"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
403 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
404 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
405 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
406 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
407 if [ $LN -ne 1 ]; then
667
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
408 echo "test 9: wrong output (push)"
663
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
409 exit 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
410 fi
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
411
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
412 dav_sync_pull test4b "test 9: pull failed"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
413 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
414 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
415 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
416 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
417 if [ $LN -ne 1 ]; then
663
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
418 echo "test 9: wrong output (pull)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
419 exit 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
420 fi
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
421
667
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
422
665
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
423 # ----------------------------------------------------------------------------
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
424 # test 10: add tags to files and sync
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
425 # expected result: tags synced
663
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
426
665
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
427 touch tmp-sync/test4a/file1
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
428 echo "test10-mod1" >> tmp-sync/test4a/dir1/file2
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
429 echo "test10-new" >> tmp-sync/test4a/file4
663
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
430
665
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
431 $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
432 if [ $? -ne 0 ]; then
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
433 echo "test 10: add-tag failed"
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
434 exit 2
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
435 fi
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
436 $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
437 $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
438
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
439 dav_sync_push test4a "test 10: push failed"
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
440 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
441 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
442 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
443 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
444 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
445
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
446 dav_sync_pull test4b "test 10: pull failed"
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
447 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
448 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
449 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
450 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
451 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
452
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
453 $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
454 check_tmpout "test" "test 10: file1 missing tag"
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
455 $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
456 check_tmpout "test" "test 10: file3 missing tag"
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
457 $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
458 check_tmpout "test" "test 10: file2 missing tag"
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
459
667
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
460
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 # test 11: check if double update happens
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
463 # expected result: nothing happens
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
464
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
465 dav_sync_push test4a "test 11: push failed"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
466 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
467 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
468 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
469 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
470 if [ $LN -ne 1 ]; then
667
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
471 echo "test 11: wrong output (push)"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
472 exit 2
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
473 fi
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
474
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
475 dav_sync_pull test4b "test 11: pull failed"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
476 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
477 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
478 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
479 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
480 if [ $LN -ne 1 ]; then
667
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
481 echo "test 11: wrong output (pull)"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
482 exit 2
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
483 fi
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
484
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
485
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 # 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
488 # expected result: tags pushed, nothing pulled
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_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
491 touch -t 03011100 tmp-sync/test4a/file1
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
492
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
493 dav_sync_push test4a "test 12: push failed"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
494 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
495 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
496 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
497
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
498 dav_sync_pull test4a "test 12: pull failed"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
499 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
500 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
501 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
502 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
503 if [ $LN -ne 1 ]; then
667
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
504 echo "test 12: wrong output (pull)"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
505 exit 2
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
506 fi
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
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
509 # ----------------------------------------------------------------------------
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
510 # test 13: pull test4b
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
511 # expected result: update file1, sync tags
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
512
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
513 dav_sync_pull test4b "test 13: pull failed"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
514 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
515 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
516 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
517
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
518 $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
519 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
520 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
521
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
522
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
523 # ----------------------------------------------------------------------------
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
524 # test 14: remove tags from file4 and sync
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
525 # expected result: tags removed
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
526
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
527 $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
528 touch -t 04011100 tmp-sync/test4a/file4
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
529
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
530 dav_sync_push test4a "test 14: push failed"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
531 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
532 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
533 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
534
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
535 dav_sync_pull test4b "test 14: pull failed"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
536 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
537 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
538 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
539
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
540 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
541 if [ $LN -ne 0 ]; then
667
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
542 echo "test 14: wrong tag count"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
543 exit 2
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
544 fi
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
545

mercurial