Merge lp:~brianaker/libmemcached/merge-1.0-april-2013 into lp:libmemcached
- merge-1.0-april-2013
- Merge into 1.2
Proposed by
Brian Aker
Status: | Merged |
---|---|
Merged at revision: | 1102 |
Proposed branch: | lp:~brianaker/libmemcached/merge-1.0-april-2013 |
Merge into: | lp:libmemcached |
Diff against target: |
1410 lines (+436/-154) 32 files modified
bootstrap.sh (+151/-23) clients/memflush.cc (+1/-1) clients/memping.cc (+1/-1) clients/memrm.cc (+1/-1) libmemcached/connect.cc (+5/-2) libtest/cmdline.cc (+27/-24) libtest/cmdline.h (+0/-3) libtest/common.h (+1/-1) libtest/dream.cc (+1/-1) libtest/drizzled.cc (+5/-5) libtest/framework.cc (+1/-1) libtest/framework.h (+1/-1) libtest/has.cc (+50/-4) libtest/has.hpp (+9/-1) libtest/include.am (+13/-2) libtest/lite.h (+2/-10) libtest/main.cc (+2/-3) libtest/memcached.cc (+5/-5) libtest/memcached.hpp (+1/-1) libtest/result.cc (+1/-0) libtest/run-ci.gdb (+1/-0) libtest/run.gdb (+1/-0) libtest/server_container.cc (+7/-5) libtest/signal.cc (+3/-7) libtest/unittest.cc (+9/-0) libtest/valgrind.h (+55/-0) libtest/vchar.cc (+5/-0) libtest/vchar.hpp (+3/-0) m4/ax_harden_compiler_flags.m4 (+66/-48) tests/keys.hpp (+3/-3) tests/libmemcached-1.0/mem_functions.cc (+1/-1) tests/libmemcached-1.0/sasl.cc (+4/-0) |
To merge this branch: | bzr merge lp:~brianaker/libmemcached/merge-1.0-april-2013 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Tangent Trunk | Pending | ||
Review via email: mp+159924@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'bootstrap.sh' | |||
2 | --- bootstrap.sh 2013-03-10 12:45:58 +0000 | |||
3 | +++ bootstrap.sh 2013-04-20 09:57:27 +0000 | |||
4 | @@ -151,7 +151,8 @@ | |||
5 | 151 | fi | 151 | fi |
6 | 152 | } | 152 | } |
7 | 153 | 153 | ||
9 | 154 | # Valid values are: darwin,fedora,rhel,ubuntu | 154 | # Validate the distribution name, or toss an erro |
10 | 155 | # values: darwin,fedora,rhel,ubuntu,debian,opensuse | ||
11 | 155 | function set_VENDOR_DISTRIBUTION () | 156 | function set_VENDOR_DISTRIBUTION () |
12 | 156 | { | 157 | { |
13 | 157 | local dist=`echo "$1" | tr '[A-Z]' '[a-z]'` | 158 | local dist=`echo "$1" | tr '[A-Z]' '[a-z]'` |
14 | @@ -165,9 +166,15 @@ | |||
15 | 165 | rhel) | 166 | rhel) |
16 | 166 | VENDOR_DISTRIBUTION='rhel' | 167 | VENDOR_DISTRIBUTION='rhel' |
17 | 167 | ;; | 168 | ;; |
18 | 169 | debian) | ||
19 | 170 | VENDOR_DISTRIBUTION='debian' | ||
20 | 171 | ;; | ||
21 | 168 | ubuntu) | 172 | ubuntu) |
22 | 169 | VENDOR_DISTRIBUTION='ubuntu' | 173 | VENDOR_DISTRIBUTION='ubuntu' |
23 | 170 | ;; | 174 | ;; |
24 | 175 | suse) | ||
25 | 176 | VENDOR_DISTRIBUTION='opensuse' | ||
26 | 177 | ;; | ||
27 | 171 | opensuse) | 178 | opensuse) |
28 | 172 | VENDOR_DISTRIBUTION='opensuse' | 179 | VENDOR_DISTRIBUTION='opensuse' |
29 | 173 | ;; | 180 | ;; |
30 | @@ -177,21 +184,49 @@ | |||
31 | 177 | esac | 184 | esac |
32 | 178 | } | 185 | } |
33 | 179 | 186 | ||
34 | 187 | # Validate a Vendor's release name/number | ||
35 | 180 | function set_VENDOR_RELEASE () | 188 | function set_VENDOR_RELEASE () |
36 | 181 | { | 189 | { |
37 | 182 | local release=`echo "$1" | tr '[A-Z]' '[a-z]'` | 190 | local release=`echo "$1" | tr '[A-Z]' '[a-z]'` |
38 | 183 | case "$VENDOR_DISTRIBUTION" in | 191 | case "$VENDOR_DISTRIBUTION" in |
39 | 184 | darwin) | 192 | darwin) |
41 | 185 | VENDOR_RELEASE='mountain' | 193 | case "$VENDOR_DISTRIBUTION" in |
42 | 194 | 10.6*) | ||
43 | 195 | VENDOR_RELEASE='snow_leopard' | ||
44 | 196 | ;; | ||
45 | 197 | 10.7*) | ||
46 | 198 | VENDOR_RELEASE='mountain' | ||
47 | 199 | ;; | ||
48 | 200 | mountain) | ||
49 | 201 | VENDOR_RELEASE='mountain' | ||
50 | 202 | ;; | ||
51 | 203 | 10.8*) | ||
52 | 204 | VENDOR_RELEASE='mountain_lion' | ||
53 | 205 | ;; | ||
54 | 206 | *) | ||
55 | 207 | VENDOR_RELEASE='unknown' | ||
56 | 208 | ;; | ||
57 | 209 | esac | ||
58 | 186 | ;; | 210 | ;; |
59 | 187 | fedora) | 211 | fedora) |
60 | 188 | VENDOR_RELEASE="$release" | 212 | VENDOR_RELEASE="$release" |
61 | 213 | if [[ "x$VENDOR_RELEASE" == '18' ]]; then | ||
62 | 214 | VENDOR_RELEASE='sphericalcow' | ||
63 | 215 | fi | ||
64 | 189 | ;; | 216 | ;; |
65 | 190 | rhel) | 217 | rhel) |
66 | 191 | VENDOR_RELEASE="$release" | 218 | VENDOR_RELEASE="$release" |
67 | 192 | ;; | 219 | ;; |
68 | 220 | debian) | ||
69 | 221 | VENDOR_RELEASE="$release" | ||
70 | 222 | ;; | ||
71 | 193 | ubuntu) | 223 | ubuntu) |
72 | 194 | VENDOR_RELEASE="$release" | 224 | VENDOR_RELEASE="$release" |
73 | 225 | if [[ "x$VENDOR_RELEASE" == 'x12.04' ]]; then | ||
74 | 226 | VENDOR_RELEASE="precise" | ||
75 | 227 | elif [[ "x$VENDOR_RELEASE" == 'x12.10' ]]; then | ||
76 | 228 | VENDOR_RELEASE="quantal" | ||
77 | 229 | fi | ||
78 | 195 | ;; | 230 | ;; |
79 | 196 | opensuse) | 231 | opensuse) |
80 | 197 | VENDOR_RELEASE="$release" | 232 | VENDOR_RELEASE="$release" |
81 | @@ -206,7 +241,7 @@ | |||
82 | 206 | } | 241 | } |
83 | 207 | 242 | ||
84 | 208 | 243 | ||
86 | 209 | # Valid values are: apple, redhat, centos, canonical | 244 | # Valid values are: apple, redhat, centos, canonical, oracle, suse |
87 | 210 | function set_VENDOR () | 245 | function set_VENDOR () |
88 | 211 | { | 246 | { |
89 | 212 | local vendor=`echo "$1" | tr '[A-Z]' '[a-z]'` | 247 | local vendor=`echo "$1" | tr '[A-Z]' '[a-z]'` |
90 | @@ -218,12 +253,30 @@ | |||
91 | 218 | redhat) | 253 | redhat) |
92 | 219 | VENDOR='redhat' | 254 | VENDOR='redhat' |
93 | 220 | ;; | 255 | ;; |
94 | 256 | fedora) | ||
95 | 257 | VENDOR='redhat' | ||
96 | 258 | ;; | ||
97 | 259 | redhat-release-server-*) | ||
98 | 260 | VENDOR='redhat' | ||
99 | 261 | ;; | ||
100 | 262 | enterprise-release-*) | ||
101 | 263 | VENDOR='oracle' | ||
102 | 264 | ;; | ||
103 | 221 | centos) | 265 | centos) |
104 | 222 | VENDOR='centos' | 266 | VENDOR='centos' |
105 | 223 | ;; | 267 | ;; |
106 | 224 | canonical) | 268 | canonical) |
107 | 225 | VENDOR='canonical' | 269 | VENDOR='canonical' |
108 | 226 | ;; | 270 | ;; |
109 | 271 | ubuntu) | ||
110 | 272 | VENDOR='canonical' | ||
111 | 273 | ;; | ||
112 | 274 | debian) | ||
113 | 275 | VENDOR='debian' | ||
114 | 276 | ;; | ||
115 | 277 | opensuse) | ||
116 | 278 | VENDOR='suse' | ||
117 | 279 | ;; | ||
118 | 227 | suse) | 280 | suse) |
119 | 228 | VENDOR='suse' | 281 | VENDOR='suse' |
120 | 229 | ;; | 282 | ;; |
121 | @@ -234,6 +287,27 @@ | |||
122 | 234 | 287 | ||
123 | 235 | set_VENDOR_DISTRIBUTION $2 | 288 | set_VENDOR_DISTRIBUTION $2 |
124 | 236 | set_VENDOR_RELEASE $3 | 289 | set_VENDOR_RELEASE $3 |
125 | 290 | |||
126 | 291 | # Set which vendor/versions we trust for autoreconf | ||
127 | 292 | case $VENDOR_DISTRIBUTION in | ||
128 | 293 | fedora) | ||
129 | 294 | if [[ "x$VENDOR_RELEASE" == 'x18' ]]; then | ||
130 | 295 | AUTORECONF_REBUILD_HOST=true | ||
131 | 296 | elif [[ "x$VENDOR_RELEASE" == 'xsphericalcow' ]]; then | ||
132 | 297 | AUTORECONF_REBUILD_HOST=true | ||
133 | 298 | elif [[ "x$VENDOR_RELEASE" == 'x19' ]]; then | ||
134 | 299 | AUTORECONF_REBUILD_HOST=true | ||
135 | 300 | fi | ||
136 | 301 | ;; | ||
137 | 302 | canonical) | ||
138 | 303 | if [[ "x$VENDOR_RELEASE" == 'xprecise' ]]; then | ||
139 | 304 | AUTORECONF_REBUILD_HOST=true | ||
140 | 305 | elif [[ "x$VENDOR_RELEASE" == 'xquantal' ]]; then | ||
141 | 306 | AUTORECONF_REBUILD_HOST=true | ||
142 | 307 | fi | ||
143 | 308 | ;; | ||
144 | 309 | esac | ||
145 | 310 | |||
146 | 237 | } | 311 | } |
147 | 238 | 312 | ||
148 | 239 | function determine_target_platform () | 313 | function determine_target_platform () |
149 | @@ -242,14 +316,14 @@ | |||
150 | 242 | UNAME_KERNEL=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown | 316 | UNAME_KERNEL=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown |
151 | 243 | UNAME_KERNEL_RELEASE=`(uname -r) 2>/dev/null` || UNAME_KERNEL_RELEASE=unknown | 317 | UNAME_KERNEL_RELEASE=`(uname -r) 2>/dev/null` || UNAME_KERNEL_RELEASE=unknown |
152 | 244 | 318 | ||
154 | 245 | if [[ $(uname) == 'Darwin' ]]; then | 319 | if [[ -x '/usr/bin/sw_vers' ]]; then |
155 | 320 | local _VERSION=`/usr/bin/sw_vers -productVersion` | ||
156 | 321 | set_VENDOR 'apple' 'darwin' $_VERSION | ||
157 | 322 | elif [[ $(uname) == 'Darwin' ]]; then | ||
158 | 246 | set_VENDOR 'apple' 'darwin' 'mountain' | 323 | set_VENDOR 'apple' 'darwin' 'mountain' |
159 | 247 | elif [[ -f '/etc/fedora-release' ]]; then | 324 | elif [[ -f '/etc/fedora-release' ]]; then |
160 | 248 | local fedora_version=`cat /etc/fedora-release | awk ' { print $3 } '` | 325 | local fedora_version=`cat /etc/fedora-release | awk ' { print $3 } '` |
161 | 249 | set_VENDOR 'redhat' 'fedora' $fedora_version | 326 | set_VENDOR 'redhat' 'fedora' $fedora_version |
162 | 250 | if [[ "x$VENDOR_RELEASE" == 'x17' ]]; then | ||
163 | 251 | AUTORECONF_REBUILD_HOST=true | ||
164 | 252 | fi | ||
165 | 253 | elif [[ -f '/etc/centos-release' ]]; then | 327 | elif [[ -f '/etc/centos-release' ]]; then |
166 | 254 | local centos_version=`cat /etc/centos-release | awk ' { print $7 } '` | 328 | local centos_version=`cat /etc/centos-release | awk ' { print $7 } '` |
167 | 255 | set_VENDOR 'centos' 'rhel' $centos_version | 329 | set_VENDOR 'centos' 'rhel' $centos_version |
168 | @@ -259,14 +333,18 @@ | |||
169 | 259 | set_VENDOR 'suse' $suse_distribution $suse_version | 333 | set_VENDOR 'suse' $suse_distribution $suse_version |
170 | 260 | elif [[ -f '/etc/redhat-release' ]]; then | 334 | elif [[ -f '/etc/redhat-release' ]]; then |
171 | 261 | local rhel_version=`cat /etc/redhat-release | awk ' { print $7 } '` | 335 | local rhel_version=`cat /etc/redhat-release | awk ' { print $7 } '` |
173 | 262 | set_VENDOR 'redhat' 'rhel' $rhel_version | 336 | local _vendor=`rpm -qf /etc/redhat-release` |
174 | 337 | set_VENDOR $_vendor 'rhel' $rhel_version | ||
175 | 338 | elif [[ -f '/etc/os-release' ]]; then | ||
176 | 339 | source '/etc/os-release' | ||
177 | 340 | set_VENDOR $ID $ID $VERSION_ID | ||
178 | 341 | elif [[ -x '/usr/bin/lsb_release' ]]; then | ||
179 | 342 | local _ID=`/usr/bin/lsb_release -s -i` | ||
180 | 343 | local _VERSION=`/usr/bin/lsb_release -s -r` | ||
181 | 344 | set_VENDOR $_ID $_ID $_VERSION_ID | ||
182 | 263 | elif [[ -f '/etc/lsb-release' ]]; then | 345 | elif [[ -f '/etc/lsb-release' ]]; then |
189 | 264 | local debian_DISTRIB_ID=`cat /etc/lsb-release | grep DISTRIB_ID | awk -F= ' { print $2 } '` | 346 | source '/etc/lsb-release' |
190 | 265 | local debian_version=`cat /etc/lsb-release | grep DISTRIB_CODENAME | awk -F= ' { print $2 } '` | 347 | set_VENDOR 'canonical' $DISTRIB_ID $DISTRIB_CODENAME |
185 | 266 | set_VENDOR 'canonical' $debian_DISTRIB_ID $debian_version | ||
186 | 267 | if [[ "x$VENDOR_RELEASE" == 'xprecise' ]]; then | ||
187 | 268 | AUTORECONF_REBUILD_HOST=true | ||
188 | 269 | fi | ||
191 | 270 | fi | 348 | fi |
192 | 271 | 349 | ||
193 | 272 | rebuild_host_os | 350 | rebuild_host_os |
194 | @@ -808,7 +886,7 @@ | |||
195 | 808 | 886 | ||
196 | 809 | make_install_system | 887 | make_install_system |
197 | 810 | ;; | 888 | ;; |
199 | 811 | *-ubuntu-quantal-*) | 889 | *-precise-*) |
200 | 812 | run_configure | 890 | run_configure |
201 | 813 | 891 | ||
202 | 814 | assert_exec_file 'configure' | 892 | assert_exec_file 'configure' |
203 | @@ -996,6 +1074,13 @@ | |||
204 | 996 | assert_file 'Makefile' 'configure did not produce a Makefile' | 1074 | assert_file 'Makefile' 'configure did not produce a Makefile' |
205 | 997 | } | 1075 | } |
206 | 998 | 1076 | ||
207 | 1077 | function run_make_maintainer_clean_if_possible () | ||
208 | 1078 | { | ||
209 | 1079 | if [ -f 'Makefile' ]; then | ||
210 | 1080 | make_maintainer_clean | ||
211 | 1081 | fi | ||
212 | 1082 | } | ||
213 | 1083 | |||
214 | 999 | function run_autoreconf_if_required () | 1084 | function run_autoreconf_if_required () |
215 | 1000 | { | 1085 | { |
216 | 1001 | if [ ! -x 'configure' ]; then | 1086 | if [ ! -x 'configure' ]; then |
217 | @@ -1003,6 +1088,7 @@ | |||
218 | 1003 | fi | 1088 | fi |
219 | 1004 | 1089 | ||
220 | 1005 | assert_exec_file 'configure' | 1090 | assert_exec_file 'configure' |
221 | 1091 | bash -n configure | ||
222 | 1006 | } | 1092 | } |
223 | 1007 | 1093 | ||
224 | 1008 | function run_autoreconf () | 1094 | function run_autoreconf () |
225 | @@ -1068,6 +1154,14 @@ | |||
226 | 1068 | ;; | 1154 | ;; |
227 | 1069 | h) # help | 1155 | h) # help |
228 | 1070 | echo "bootstrap.sh [options] optional_target ..." | 1156 | echo "bootstrap.sh [options] optional_target ..." |
229 | 1157 | echo " -a # Just run autoreconf"; | ||
230 | 1158 | echo " -p # Print ENV"; | ||
231 | 1159 | echo " -c # Just run configure"; | ||
232 | 1160 | echo " -m # Just run maintainer-clean"; | ||
233 | 1161 | echo " -t # Make target"; | ||
234 | 1162 | echo " -d # Enable debug"; | ||
235 | 1163 | echo " -h # Show help"; | ||
236 | 1164 | echo " -v # Be more verbose in output"; | ||
237 | 1071 | exit | 1165 | exit |
238 | 1072 | ;; | 1166 | ;; |
239 | 1073 | v) # verbose | 1167 | v) # verbose |
240 | @@ -1169,6 +1263,7 @@ | |||
241 | 1169 | 1263 | ||
242 | 1170 | if [[ -z "$BOOTSTRAP_LIBTOOLIZE" ]]; then | 1264 | if [[ -z "$BOOTSTRAP_LIBTOOLIZE" ]]; then |
243 | 1171 | echo "Couldn't find user supplied libtoolize, it is required" | 1265 | echo "Couldn't find user supplied libtoolize, it is required" |
244 | 1266 | return 1 | ||
245 | 1172 | fi | 1267 | fi |
246 | 1173 | else | 1268 | else |
247 | 1174 | # If we are using OSX, we first check to see glibtoolize is available | 1269 | # If we are using OSX, we first check to see glibtoolize is available |
248 | @@ -1177,12 +1272,14 @@ | |||
249 | 1177 | 1272 | ||
250 | 1178 | if [[ -z "$BOOTSTRAP_LIBTOOLIZE" ]]; then | 1273 | if [[ -z "$BOOTSTRAP_LIBTOOLIZE" ]]; then |
251 | 1179 | echo "Couldn't find glibtoolize, it is required on OSX" | 1274 | echo "Couldn't find glibtoolize, it is required on OSX" |
252 | 1275 | return 1 | ||
253 | 1180 | fi | 1276 | fi |
254 | 1181 | else | 1277 | else |
255 | 1182 | BOOTSTRAP_LIBTOOLIZE=`type -p libtoolize` | 1278 | BOOTSTRAP_LIBTOOLIZE=`type -p libtoolize` |
256 | 1183 | 1279 | ||
257 | 1184 | if [[ -z "$BOOTSTRAP_LIBTOOLIZE" ]]; then | 1280 | if [[ -z "$BOOTSTRAP_LIBTOOLIZE" ]]; then |
258 | 1185 | echo "Couldn't find libtoolize, it is required" | 1281 | echo "Couldn't find libtoolize, it is required" |
259 | 1282 | return 1 | ||
260 | 1186 | fi | 1283 | fi |
261 | 1187 | fi | 1284 | fi |
262 | 1188 | fi | 1285 | fi |
263 | @@ -1247,6 +1344,9 @@ | |||
264 | 1247 | echo 'BOOTSTRAP ENV' | 1344 | echo 'BOOTSTRAP ENV' |
265 | 1248 | echo "AUTORECONF=$AUTORECONF" | 1345 | echo "AUTORECONF=$AUTORECONF" |
266 | 1249 | echo "HOST_OS=$HOST_OS" | 1346 | echo "HOST_OS=$HOST_OS" |
267 | 1347 | echo "VENDOR=$VENDOR" | ||
268 | 1348 | echo "VENDOR_DISTRIBUTION=$VENDOR_DISTRIBUTION" | ||
269 | 1349 | echo "VENDOR_RELEASE=$VENDOR_RELEASE" | ||
270 | 1250 | 1350 | ||
271 | 1251 | echo "getopt()" | 1351 | echo "getopt()" |
272 | 1252 | if $AUTORECONF_OPTION; then | 1352 | if $AUTORECONF_OPTION; then |
273 | @@ -1384,18 +1484,21 @@ | |||
274 | 1384 | ;; | 1484 | ;; |
275 | 1385 | 'clang-analyzer') | 1485 | 'clang-analyzer') |
276 | 1386 | ;; | 1486 | ;; |
282 | 1387 | 'test-*') | 1487 | test-*) |
283 | 1388 | ;; | 1488 | ;; |
284 | 1389 | 'valgrind-*') | 1489 | valgrind-*) |
285 | 1390 | ;; | 1490 | ;; |
286 | 1391 | 'gdb-*') | 1491 | gdb-*) |
287 | 1392 | ;; | 1492 | ;; |
288 | 1393 | 'dist') | 1493 | 'dist') |
289 | 1394 | ;; | 1494 | ;; |
290 | 1395 | *) | 1495 | *) |
292 | 1396 | die "Unknown MAKE_TARGET option: $1" | 1496 | echo "Matched default" |
293 | 1497 | return 1 | ||
294 | 1397 | ;; | 1498 | ;; |
295 | 1398 | esac | 1499 | esac |
296 | 1500 | |||
297 | 1501 | return 0 | ||
298 | 1399 | } | 1502 | } |
299 | 1400 | 1503 | ||
300 | 1401 | function bootstrap () | 1504 | function bootstrap () |
301 | @@ -1406,7 +1509,9 @@ | |||
302 | 1406 | 1509 | ||
303 | 1407 | # Set up whatever we need to do to use autoreconf later | 1510 | # Set up whatever we need to do to use autoreconf later |
304 | 1408 | require_libtoolise | 1511 | require_libtoolise |
306 | 1409 | autoreconf_setup | 1512 | if ! autoreconf_setup; then |
307 | 1513 | return 1 | ||
308 | 1514 | fi | ||
309 | 1410 | 1515 | ||
310 | 1411 | if [ -z "$MAKE_TARGET" ]; then | 1516 | if [ -z "$MAKE_TARGET" ]; then |
311 | 1412 | MAKE_TARGET="make_default" | 1517 | MAKE_TARGET="make_default" |
312 | @@ -1441,8 +1546,14 @@ | |||
313 | 1441 | # If we are running inside of Jenkins, we want to only run some of the possible tests | 1546 | # If we are running inside of Jenkins, we want to only run some of the possible tests |
314 | 1442 | if $jenkins_build_environment; then | 1547 | if $jenkins_build_environment; then |
315 | 1443 | check_make_target $target | 1548 | check_make_target $target |
316 | 1549 | ret=$? | ||
317 | 1550 | if [ $ret -ne 0 ]; then | ||
318 | 1551 | die "Unknown MAKE_TARGET option: $target" | ||
319 | 1552 | fi | ||
320 | 1444 | fi | 1553 | fi |
321 | 1445 | 1554 | ||
322 | 1555 | local snapshot_run=false | ||
323 | 1556 | |||
324 | 1446 | case $target in | 1557 | case $target in |
325 | 1447 | 'self') | 1558 | 'self') |
326 | 1448 | self_test | 1559 | self_test |
327 | @@ -1500,6 +1611,7 @@ | |||
328 | 1500 | ;; | 1611 | ;; |
329 | 1501 | 'snapshot') | 1612 | 'snapshot') |
330 | 1502 | make_for_snapshot | 1613 | make_for_snapshot |
331 | 1614 | snapshot_run=true | ||
332 | 1503 | ;; | 1615 | ;; |
333 | 1504 | 'rpm') | 1616 | 'rpm') |
334 | 1505 | make_rpm | 1617 | make_rpm |
335 | @@ -1518,6 +1630,13 @@ | |||
336 | 1518 | make_target "$target" | 1630 | make_target "$target" |
337 | 1519 | ;; | 1631 | ;; |
338 | 1520 | esac | 1632 | esac |
339 | 1633 | |||
340 | 1634 | if $jenkins_build_environment; then | ||
341 | 1635 | if ! $snapshot_run; then | ||
342 | 1636 | run_make_maintainer_clean_if_possible | ||
343 | 1637 | fi | ||
344 | 1638 | fi | ||
345 | 1639 | |||
346 | 1521 | done | 1640 | done |
347 | 1522 | } | 1641 | } |
348 | 1523 | 1642 | ||
349 | @@ -1586,7 +1705,16 @@ | |||
350 | 1586 | # We don't want Jenkins overriding other variables, so we NULL them. | 1705 | # We don't want Jenkins overriding other variables, so we NULL them. |
351 | 1587 | if [ -z "$MAKE_TARGET" ]; then | 1706 | if [ -z "$MAKE_TARGET" ]; then |
352 | 1588 | if $jenkins_build_environment; then | 1707 | if $jenkins_build_environment; then |
354 | 1589 | MAKE_TARGET='jenkins' | 1708 | if [[ -n "$label" ]]; then |
355 | 1709 | check_make_target $label | ||
356 | 1710 | if [ $? -eq 0 ]; then | ||
357 | 1711 | MAKE_TARGET="$label" | ||
358 | 1712 | fi | ||
359 | 1713 | fi | ||
360 | 1714 | |||
361 | 1715 | if [ -z "$MAKE_TARGET" ]; then | ||
362 | 1716 | MAKE_TARGET='jenkins' | ||
363 | 1717 | fi | ||
364 | 1590 | fi | 1718 | fi |
365 | 1591 | fi | 1719 | fi |
366 | 1592 | 1720 | ||
367 | 1593 | 1721 | ||
368 | === modified file 'clients/memflush.cc' | |||
369 | --- clients/memflush.cc 2013-04-03 13:14:23 +0000 | |||
370 | +++ clients/memflush.cc 2013-04-20 09:57:27 +0000 | |||
371 | @@ -159,7 +159,7 @@ | |||
372 | 159 | opt_expire= (time_t)strtoll(optarg, (char **)NULL, 10); | 159 | opt_expire= (time_t)strtoll(optarg, (char **)NULL, 10); |
373 | 160 | if (errno != 0) | 160 | if (errno != 0) |
374 | 161 | { | 161 | { |
376 | 162 | std::cerr << "Incorrect value passed to --expire: `" << optarg << "`" << std::cerr; | 162 | std::cerr << "Incorrect value passed to --expire: `" << optarg << "`" << std::endl; |
377 | 163 | exit(EXIT_FAILURE); | 163 | exit(EXIT_FAILURE); |
378 | 164 | } | 164 | } |
379 | 165 | break; | 165 | break; |
380 | 166 | 166 | ||
381 | === modified file 'clients/memping.cc' | |||
382 | --- clients/memping.cc 2013-04-03 13:14:23 +0000 | |||
383 | +++ clients/memping.cc 2013-04-20 09:57:27 +0000 | |||
384 | @@ -160,7 +160,7 @@ | |||
385 | 160 | opt_expire= time_t(strtoll(optarg, (char **)NULL, 10)); | 160 | opt_expire= time_t(strtoll(optarg, (char **)NULL, 10)); |
386 | 161 | if (errno != 0) | 161 | if (errno != 0) |
387 | 162 | { | 162 | { |
389 | 163 | std::cerr << "Incorrect value passed to --expire: `" << optarg << "`" << std::cerr; | 163 | std::cerr << "Incorrect value passed to --expire: `" << optarg << "`" << std::endl; |
390 | 164 | exit(EXIT_FAILURE); | 164 | exit(EXIT_FAILURE); |
391 | 165 | } | 165 | } |
392 | 166 | break; | 166 | break; |
393 | 167 | 167 | ||
394 | === modified file 'clients/memrm.cc' | |||
395 | --- clients/memrm.cc 2013-04-03 13:14:23 +0000 | |||
396 | +++ clients/memrm.cc 2013-04-20 09:57:27 +0000 | |||
397 | @@ -214,7 +214,7 @@ | |||
398 | 214 | opt_expire= (time_t)strtoll(optarg, (char **)NULL, 10); | 214 | opt_expire= (time_t)strtoll(optarg, (char **)NULL, 10); |
399 | 215 | if (errno != 0) | 215 | if (errno != 0) |
400 | 216 | { | 216 | { |
402 | 217 | std::cerr << "Incorrect value passed to --expire: `" << optarg << "`" << std::cerr; | 217 | std::cerr << "Incorrect value passed to --expire: `" << optarg << "`" << std::endl; |
403 | 218 | exit(EXIT_FAILURE); | 218 | exit(EXIT_FAILURE); |
404 | 219 | } | 219 | } |
405 | 220 | break; | 220 | break; |
406 | 221 | 221 | ||
407 | === modified file 'libmemcached/connect.cc' | |||
408 | --- libmemcached/connect.cc 2013-03-31 23:24:29 +0000 | |||
409 | +++ libmemcached/connect.cc 2013-04-20 09:57:27 +0000 | |||
410 | @@ -186,9 +186,10 @@ | |||
411 | 186 | assert(server->type != MEMCACHED_CONNECTION_UNIX_SOCKET); | 186 | assert(server->type != MEMCACHED_CONNECTION_UNIX_SOCKET); |
412 | 187 | server->clear_addrinfo(); | 187 | server->clear_addrinfo(); |
413 | 188 | 188 | ||
415 | 189 | char str_port[MEMCACHED_NI_MAXSERV]; | 189 | char str_port[MEMCACHED_NI_MAXSERV]= { 0 }; |
416 | 190 | errno= 0; | ||
417 | 190 | int length= snprintf(str_port, MEMCACHED_NI_MAXSERV, "%u", uint32_t(server->port())); | 191 | int length= snprintf(str_port, MEMCACHED_NI_MAXSERV, "%u", uint32_t(server->port())); |
419 | 191 | if (length >= MEMCACHED_NI_MAXSERV or length <= 0) | 192 | if (length >= MEMCACHED_NI_MAXSERV or length <= 0 or errno != 0) |
420 | 192 | { | 193 | { |
421 | 193 | return memcached_set_error(*server, MEMCACHED_MEMORY_ALLOCATION_FAILURE, MEMCACHED_AT, | 194 | return memcached_set_error(*server, MEMCACHED_MEMORY_ALLOCATION_FAILURE, MEMCACHED_AT, |
422 | 194 | memcached_literal_param("snprintf(NI_MAXSERV)")); | 195 | memcached_literal_param("snprintf(NI_MAXSERV)")); |
423 | @@ -759,6 +760,7 @@ | |||
424 | 759 | case MEMCACHED_CONNECTION_TCP: | 760 | case MEMCACHED_CONNECTION_TCP: |
425 | 760 | rc= network_connect(server); | 761 | rc= network_connect(server); |
426 | 761 | 762 | ||
427 | 763 | #ifdef LIBMEMCACHED_WITH_SASL_SUPPORT | ||
428 | 762 | if (LIBMEMCACHED_WITH_SASL_SUPPORT) | 764 | if (LIBMEMCACHED_WITH_SASL_SUPPORT) |
429 | 763 | { | 765 | { |
430 | 764 | if (server->fd != INVALID_SOCKET and server->root->sasl.callbacks) | 766 | if (server->fd != INVALID_SOCKET and server->root->sasl.callbacks) |
431 | @@ -771,6 +773,7 @@ | |||
432 | 771 | } | 773 | } |
433 | 772 | } | 774 | } |
434 | 773 | } | 775 | } |
435 | 776 | #endif | ||
436 | 774 | break; | 777 | break; |
437 | 775 | 778 | ||
438 | 776 | case MEMCACHED_CONNECTION_UNIX_SOCKET: | 779 | case MEMCACHED_CONNECTION_UNIX_SOCKET: |
439 | 777 | 780 | ||
440 | === modified file 'libtest/cmdline.cc' | |||
441 | --- libtest/cmdline.cc 2013-01-25 02:26:50 +0000 | |||
442 | +++ libtest/cmdline.cc 2013-04-20 09:57:27 +0000 | |||
443 | @@ -2,7 +2,7 @@ | |||
444 | 2 | * | 2 | * |
445 | 3 | * Data Differential YATL (i.e. libtest) library | 3 | * Data Differential YATL (i.e. libtest) library |
446 | 4 | * | 4 | * |
448 | 5 | * Copyright (C) 2012 Data Differential, http://datadifferential.com/ | 5 | * Copyright (C) 2012-2013 Data Differential, http://datadifferential.com/ |
449 | 6 | * | 6 | * |
450 | 7 | * Redistribution and use in source and binary forms, with or without | 7 | * Redistribution and use in source and binary forms, with or without |
451 | 8 | * modification, are permitted provided that the following conditions are | 8 | * modification, are permitted provided that the following conditions are |
452 | @@ -412,7 +412,6 @@ | |||
453 | 412 | slurp(); | 412 | slurp(); |
454 | 413 | if (waited_pid == _pid and WIFEXITED(_status) == false) | 413 | if (waited_pid == _pid and WIFEXITED(_status) == false) |
455 | 414 | { | 414 | { |
456 | 415 | |||
457 | 416 | /* | 415 | /* |
458 | 417 | What we are looking for here is how the exit status happened. | 416 | What we are looking for here is how the exit status happened. |
459 | 418 | - 127 means that posix_spawn() itself had an error. | 417 | - 127 means that posix_spawn() itself had an error. |
460 | @@ -437,15 +436,18 @@ | |||
461 | 437 | { | 436 | { |
462 | 438 | if (WTERMSIG(_status) != SIGTERM and WTERMSIG(_status) != SIGHUP) | 437 | if (WTERMSIG(_status) != SIGTERM and WTERMSIG(_status) != SIGHUP) |
463 | 439 | { | 438 | { |
464 | 439 | slurp(); | ||
465 | 440 | _app_exit_state= Application::INVALID_POSIX_SPAWN; | 440 | _app_exit_state= Application::INVALID_POSIX_SPAWN; |
466 | 441 | std::string error_string(print_argv(built_argv)); | 441 | std::string error_string(print_argv(built_argv)); |
467 | 442 | error_string+= " was killed by signal "; | 442 | error_string+= " was killed by signal "; |
468 | 443 | error_string+= strsignal(WTERMSIG(_status)); | 443 | error_string+= strsignal(WTERMSIG(_status)); |
469 | 444 | |||
470 | 444 | if (stdout_result_length()) | 445 | if (stdout_result_length()) |
471 | 445 | { | 446 | { |
472 | 446 | error_string+= " stdout: "; | 447 | error_string+= " stdout: "; |
473 | 447 | error_string+= stdout_c_str(); | 448 | error_string+= stdout_c_str(); |
474 | 448 | } | 449 | } |
475 | 450 | |||
476 | 449 | if (stderr_result_length()) | 451 | if (stderr_result_length()) |
477 | 450 | { | 452 | { |
478 | 451 | error_string+= " stderr: "; | 453 | error_string+= " stderr: "; |
479 | @@ -479,8 +481,20 @@ | |||
480 | 479 | } | 481 | } |
481 | 480 | else if (waited_pid == -1) | 482 | else if (waited_pid == -1) |
482 | 481 | { | 483 | { |
483 | 484 | std::string error_string; | ||
484 | 485 | if (stdout_result_length()) | ||
485 | 486 | { | ||
486 | 487 | error_string+= " stdout: "; | ||
487 | 488 | error_string+= stdout_c_str(); | ||
488 | 489 | } | ||
489 | 490 | |||
490 | 491 | if (stderr_result_length()) | ||
491 | 492 | { | ||
492 | 493 | error_string+= " stderr: "; | ||
493 | 494 | error_string+= stderr_c_str(); | ||
494 | 495 | } | ||
495 | 496 | Error << "waitpid() returned errno:" << strerror(errno) << " " << error_string; | ||
496 | 482 | _app_exit_state= Application::UNKNOWN; | 497 | _app_exit_state= Application::UNKNOWN; |
497 | 483 | Error << "waitpid() returned errno:" << strerror(errno); | ||
498 | 484 | } | 498 | } |
499 | 485 | else | 499 | else |
500 | 486 | { | 500 | { |
501 | @@ -573,6 +587,7 @@ | |||
502 | 573 | void Application::Pipe::nonblock() | 587 | void Application::Pipe::nonblock() |
503 | 574 | { | 588 | { |
504 | 575 | int flags; | 589 | int flags; |
505 | 590 | do | ||
506 | 576 | { | 591 | { |
507 | 577 | flags= fcntl(_pipe_fd[READ], F_GETFL, 0); | 592 | flags= fcntl(_pipe_fd[READ], F_GETFL, 0); |
508 | 578 | } while (flags == -1 and (errno == EINTR or errno == EAGAIN)); | 593 | } while (flags == -1 and (errno == EINTR or errno == EAGAIN)); |
509 | @@ -601,23 +616,21 @@ | |||
510 | 601 | close(READ); | 616 | close(READ); |
511 | 602 | close(WRITE); | 617 | close(WRITE); |
512 | 603 | 618 | ||
514 | 604 | #if defined(HAVE_PIPE2) && HAVE_PIPE2 | 619 | #ifdef HAVE_PIPE2 |
515 | 605 | if (pipe2(_pipe_fd, O_NONBLOCK|O_CLOEXEC) == -1) | 620 | if (pipe2(_pipe_fd, O_NONBLOCK|O_CLOEXEC) == -1) |
516 | 606 | #else | ||
517 | 607 | if (pipe(_pipe_fd) == -1) | ||
518 | 608 | #endif | 621 | #endif |
519 | 609 | { | 622 | { |
521 | 610 | FATAL(strerror(errno)); | 623 | if (pipe(_pipe_fd) == -1) |
522 | 624 | { | ||
523 | 625 | FATAL(strerror(errno)); | ||
524 | 626 | } | ||
525 | 627 | |||
526 | 628 | // Since either pipe2() was not found/called we set the pipe directly | ||
527 | 629 | nonblock(); | ||
528 | 630 | cloexec(); | ||
529 | 611 | } | 631 | } |
530 | 612 | _open[0]= true; | 632 | _open[0]= true; |
531 | 613 | _open[1]= true; | 633 | _open[1]= true; |
532 | 614 | |||
533 | 615 | #if defined(HAVE_PIPE2) && HAVE_PIPE2 | ||
534 | 616 | { | ||
535 | 617 | nonblock(); | ||
536 | 618 | cloexec(); | ||
537 | 619 | } | ||
538 | 620 | #endif | ||
539 | 621 | } | 634 | } |
540 | 622 | 635 | ||
541 | 623 | void Application::Pipe::cloexec() | 636 | void Application::Pipe::cloexec() |
542 | @@ -817,14 +830,4 @@ | |||
543 | 817 | return int(app.join()); | 830 | return int(app.join()); |
544 | 818 | } | 831 | } |
545 | 819 | 832 | ||
546 | 820 | const char *gearmand_binary() | ||
547 | 821 | { | ||
548 | 822 | return GEARMAND_BINARY; | ||
549 | 823 | } | ||
550 | 824 | |||
551 | 825 | const char *drizzled_binary() | ||
552 | 826 | { | ||
553 | 827 | return DRIZZLED_BINARY; | ||
554 | 828 | } | ||
555 | 829 | |||
556 | 830 | } // namespace exec_cmdline | 833 | } // namespace exec_cmdline |
557 | 831 | 834 | ||
558 | === modified file 'libtest/cmdline.h' | |||
559 | --- libtest/cmdline.h 2013-01-25 02:26:50 +0000 | |||
560 | +++ libtest/cmdline.h 2013-04-20 09:57:27 +0000 | |||
561 | @@ -245,7 +245,4 @@ | |||
562 | 245 | 245 | ||
563 | 246 | int exec_cmdline(const std::string& executable, const char *args[], bool use_libtool= false); | 246 | int exec_cmdline(const std::string& executable, const char *args[], bool use_libtool= false); |
564 | 247 | 247 | ||
565 | 248 | const char *gearmand_binary(); | ||
566 | 249 | const char *drizzled_binary(); | ||
567 | 250 | |||
568 | 251 | } | 248 | } |
569 | 252 | 249 | ||
570 | === modified file 'libtest/common.h' | |||
571 | --- libtest/common.h 2013-02-04 01:35:06 +0000 | |||
572 | +++ libtest/common.h 2013-04-20 09:57:27 +0000 | |||
573 | @@ -69,7 +69,7 @@ | |||
574 | 69 | # include <arpa/inet.h> | 69 | # include <arpa/inet.h> |
575 | 70 | #endif | 70 | #endif |
576 | 71 | 71 | ||
578 | 72 | #if defined(_WIN32) | 72 | #if defined(WIN32) |
579 | 73 | # include "win32/wrappers.h" | 73 | # include "win32/wrappers.h" |
580 | 74 | # define get_socket_errno() WSAGetLastError() | 74 | # define get_socket_errno() WSAGetLastError() |
581 | 75 | #else | 75 | #else |
582 | 76 | 76 | ||
583 | === modified file 'libtest/dream.cc' | |||
584 | --- libtest/dream.cc 2013-02-04 01:35:06 +0000 | |||
585 | +++ libtest/dream.cc 2013-04-20 09:57:27 +0000 | |||
586 | @@ -41,7 +41,7 @@ | |||
587 | 41 | 41 | ||
588 | 42 | void dream(time_t tv_sec, long tv_nsec) | 42 | void dream(time_t tv_sec, long tv_nsec) |
589 | 43 | { | 43 | { |
591 | 44 | #if defined(_WIN32) | 44 | #if defined(WIN32) |
592 | 45 | if (tv_sec == 0 and tv_nsec) | 45 | if (tv_sec == 0 and tv_nsec) |
593 | 46 | { | 46 | { |
594 | 47 | tv_sec++; | 47 | tv_sec++; |
595 | 48 | 48 | ||
596 | === modified file 'libtest/drizzled.cc' | |||
597 | --- libtest/drizzled.cc 2013-01-24 11:17:17 +0000 | |||
598 | +++ libtest/drizzled.cc 2013-04-20 09:57:27 +0000 | |||
599 | @@ -74,11 +74,11 @@ | |||
600 | 74 | #if defined(HAVE_LIBDRIZZLE) && HAVE_LIBDRIZZLE | 74 | #if defined(HAVE_LIBDRIZZLE) && HAVE_LIBDRIZZLE |
601 | 75 | if (HAVE_LIBDRIZZLE) | 75 | if (HAVE_LIBDRIZZLE) |
602 | 76 | { | 76 | { |
608 | 77 | drizzle_st *drizzle= drizzle_create_tcp(getenv("MYSQL_SERVER"), | 77 | drizzle_st *drizzle= drizzle_create(getenv("MYSQL_SERVER"), |
609 | 78 | getenv("MYSQL_PORT") ? atoi("MYSQL_PORT") : DRIZZLE_DEFAULT_TCP_PORT, | 78 | getenv("MYSQL_PORT") ? atoi("MYSQL_PORT") : DRIZZLE_DEFAULT_TCP_PORT, |
610 | 79 | getenv("MYSQL_USER"), | 79 | getenv("MYSQL_USER"), |
611 | 80 | getenv("MYSQL_PASSWORD"), | 80 | getenv("MYSQL_PASSWORD"), |
612 | 81 | getenv("MYSQL_SCHEMA"), drizzle_options_t()); | 81 | getenv("MYSQL_SCHEMA"), 0); |
613 | 82 | 82 | ||
614 | 83 | if (drizzle == NULL) | 83 | if (drizzle == NULL) |
615 | 84 | { | 84 | { |
616 | 85 | 85 | ||
617 | === modified file 'libtest/framework.cc' | |||
618 | --- libtest/framework.cc 2013-01-24 11:17:17 +0000 | |||
619 | +++ libtest/framework.cc 2013-04-20 09:57:27 +0000 | |||
620 | @@ -68,7 +68,7 @@ | |||
621 | 68 | get_world(this); | 68 | get_world(this); |
622 | 69 | } | 69 | } |
623 | 70 | 70 | ||
625 | 71 | void Framework::collections(collection_st* collections_) | 71 | void Framework::collections(collection_st collections_[]) |
626 | 72 | { | 72 | { |
627 | 73 | for (collection_st *next= collections_; next and next->name; next++) | 73 | for (collection_st *next= collections_; next and next->name; next++) |
628 | 74 | { | 74 | { |
629 | 75 | 75 | ||
630 | === modified file 'libtest/framework.h' | |||
631 | --- libtest/framework.h 2013-01-24 11:17:17 +0000 | |||
632 | +++ libtest/framework.h 2013-04-20 09:57:27 +0000 | |||
633 | @@ -72,7 +72,7 @@ | |||
634 | 72 | _destroy= arg; | 72 | _destroy= arg; |
635 | 73 | } | 73 | } |
636 | 74 | 74 | ||
638 | 75 | void collections(collection_st* arg); | 75 | void collections(collection_st arg[]); |
639 | 76 | 76 | ||
640 | 77 | void set_on_error(test_callback_error_fn *arg) | 77 | void set_on_error(test_callback_error_fn *arg) |
641 | 78 | { | 78 | { |
642 | 79 | 79 | ||
643 | === modified file 'libtest/has.cc' | |||
644 | --- libtest/has.cc 2012-12-09 11:40:11 +0000 | |||
645 | +++ libtest/has.cc 2013-04-20 09:57:27 +0000 | |||
646 | @@ -2,7 +2,7 @@ | |||
647 | 2 | * | 2 | * |
648 | 3 | * Data Differential YATL (i.e. libtest) library | 3 | * Data Differential YATL (i.e. libtest) library |
649 | 4 | * | 4 | * |
651 | 5 | * Copyright (C) 2012 Data Differential, http://datadifferential.com/ | 5 | * Copyright (C) 2012-2013 Data Differential, http://datadifferential.com/ |
652 | 6 | * | 6 | * |
653 | 7 | * Redistribution and use in source and binary forms, with or without | 7 | * Redistribution and use in source and binary forms, with or without |
654 | 8 | * modification, are permitted provided that the following conditions are | 8 | * modification, are permitted provided that the following conditions are |
655 | @@ -37,6 +37,7 @@ | |||
656 | 37 | #include "libtest/yatlcon.h" | 37 | #include "libtest/yatlcon.h" |
657 | 38 | #include <libtest/common.h> | 38 | #include <libtest/common.h> |
658 | 39 | 39 | ||
659 | 40 | #include <cstdio> | ||
660 | 40 | #include <cstdlib> | 41 | #include <cstdlib> |
661 | 41 | #include <unistd.h> | 42 | #include <unistd.h> |
662 | 42 | 43 | ||
663 | @@ -138,14 +139,17 @@ | |||
664 | 138 | return false; | 139 | return false; |
665 | 139 | } | 140 | } |
666 | 140 | 141 | ||
668 | 141 | bool has_memcached() | 142 | static char memcached_binary_path[FILENAME_MAX]; |
669 | 143 | |||
670 | 144 | static void initialize_curl_startup() | ||
671 | 142 | { | 145 | { |
672 | 146 | memcached_binary_path[0]= NULL; | ||
673 | 147 | |||
674 | 143 | #if defined(HAVE_MEMCACHED_BINARY) && HAVE_MEMCACHED_BINARY | 148 | #if defined(HAVE_MEMCACHED_BINARY) && HAVE_MEMCACHED_BINARY |
675 | 144 | if (HAVE_MEMCACHED_BINARY) | 149 | if (HAVE_MEMCACHED_BINARY) |
676 | 145 | { | 150 | { |
677 | 146 | std::stringstream arg_buffer; | 151 | std::stringstream arg_buffer; |
678 | 147 | 152 | ||
679 | 148 | |||
680 | 149 | char *getenv_ptr; | 153 | char *getenv_ptr; |
681 | 150 | if (bool((getenv_ptr= getenv("PWD"))) and strcmp(MEMCACHED_BINARY, "memcached/memcached") == 0) | 154 | if (bool((getenv_ptr= getenv("PWD"))) and strcmp(MEMCACHED_BINARY, "memcached/memcached") == 0) |
682 | 151 | { | 155 | { |
683 | @@ -156,14 +160,46 @@ | |||
684 | 156 | 160 | ||
685 | 157 | if (access(arg_buffer.str().c_str(), X_OK) == 0) | 161 | if (access(arg_buffer.str().c_str(), X_OK) == 0) |
686 | 158 | { | 162 | { |
688 | 159 | return true; | 163 | strncpy(memcached_binary_path, arg_buffer.str().c_str(), FILENAME_MAX); |
689 | 160 | } | 164 | } |
690 | 161 | } | 165 | } |
691 | 162 | #endif | 166 | #endif |
692 | 167 | } | ||
693 | 168 | |||
694 | 169 | static pthread_once_t memcached_binary_once= PTHREAD_ONCE_INIT; | ||
695 | 170 | static void initialize_memcached_binary(void) | ||
696 | 171 | { | ||
697 | 172 | int ret; | ||
698 | 173 | if ((ret= pthread_once(&memcached_binary_once, initialize_curl_startup)) != 0) | ||
699 | 174 | { | ||
700 | 175 | FATAL(strerror(ret)); | ||
701 | 176 | } | ||
702 | 177 | } | ||
703 | 178 | |||
704 | 179 | bool has_memcached() | ||
705 | 180 | { | ||
706 | 181 | initialize_memcached_binary(); | ||
707 | 182 | |||
708 | 183 | if (memcached_binary_path[0]) | ||
709 | 184 | { | ||
710 | 185 | return true; | ||
711 | 186 | } | ||
712 | 163 | 187 | ||
713 | 164 | return false; | 188 | return false; |
714 | 165 | } | 189 | } |
715 | 166 | 190 | ||
716 | 191 | const char* memcached_binary() | ||
717 | 192 | { | ||
718 | 193 | initialize_memcached_binary(); | ||
719 | 194 | |||
720 | 195 | if (memcached_binary_path[0]) | ||
721 | 196 | { | ||
722 | 197 | return memcached_binary_path; | ||
723 | 198 | } | ||
724 | 199 | |||
725 | 200 | return NULL; | ||
726 | 201 | } | ||
727 | 202 | |||
728 | 167 | bool has_memcached_sasl() | 203 | bool has_memcached_sasl() |
729 | 168 | { | 204 | { |
730 | 169 | #if defined(HAVE_MEMCACHED_SASL_BINARY) && HAVE_MEMCACHED_SASL_BINARY | 205 | #if defined(HAVE_MEMCACHED_SASL_BINARY) && HAVE_MEMCACHED_SASL_BINARY |
731 | @@ -179,4 +215,14 @@ | |||
732 | 179 | return false; | 215 | return false; |
733 | 180 | } | 216 | } |
734 | 181 | 217 | ||
735 | 218 | const char *gearmand_binary() | ||
736 | 219 | { | ||
737 | 220 | return GEARMAND_BINARY; | ||
738 | 221 | } | ||
739 | 222 | |||
740 | 223 | const char *drizzled_binary() | ||
741 | 224 | { | ||
742 | 225 | return DRIZZLED_BINARY; | ||
743 | 226 | } | ||
744 | 227 | |||
745 | 182 | } // namespace libtest | 228 | } // namespace libtest |
746 | 183 | 229 | ||
747 | === modified file 'libtest/has.hpp' | |||
748 | --- libtest/has.hpp 2012-06-07 15:09:42 +0000 | |||
749 | +++ libtest/has.hpp 2013-04-20 09:57:27 +0000 | |||
750 | @@ -2,7 +2,7 @@ | |||
751 | 2 | * | 2 | * |
752 | 3 | * Data Differential YATL (i.e. libtest) library | 3 | * Data Differential YATL (i.e. libtest) library |
753 | 4 | * | 4 | * |
755 | 5 | * Copyright (C) 2012 Data Differential, http://datadifferential.com/ | 5 | * Copyright (C) 2012-2013 Data Differential, http://datadifferential.com/ |
756 | 6 | * | 6 | * |
757 | 7 | * Redistribution and use in source and binary forms, with or without | 7 | * Redistribution and use in source and binary forms, with or without |
758 | 8 | * modification, are permitted provided that the following conditions are | 8 | * modification, are permitted provided that the following conditions are |
759 | @@ -62,4 +62,12 @@ | |||
760 | 62 | LIBTEST_API | 62 | LIBTEST_API |
761 | 63 | bool has_mysqld(); | 63 | bool has_mysqld(); |
762 | 64 | 64 | ||
763 | 65 | LIBTEST_API | ||
764 | 66 | const char* memcached_binary(); | ||
765 | 67 | |||
766 | 68 | LIBTEST_API | ||
767 | 69 | const char *gearmand_binary(); | ||
768 | 70 | |||
769 | 71 | LIBTEST_API | ||
770 | 72 | const char *drizzled_binary(); | ||
771 | 65 | } // namespace libtest | 73 | } // namespace libtest |
772 | 66 | 74 | ||
773 | === modified file 'libtest/include.am' | |||
774 | --- libtest/include.am 2013-01-25 22:16:25 +0000 | |||
775 | +++ libtest/include.am 2013-04-20 09:57:27 +0000 | |||
776 | @@ -5,10 +5,12 @@ | |||
777 | 5 | # | 5 | # |
778 | 6 | 6 | ||
779 | 7 | LIBTOOL_COMMAND= ${abs_top_builddir}/libtool --mode=execute | 7 | LIBTOOL_COMMAND= ${abs_top_builddir}/libtool --mode=execute |
781 | 8 | VALGRIND_EXEC_COMMAND= $(LIBTOOL_COMMAND) valgrind --error-exitcode=1 --leak-check=yes --track-fds=yes --malloc-fill=A5 --free-fill=DE | 8 | VALGRIND_EXEC_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=memcheck --error-exitcode=1 --leak-check=yes --track-fds=yes --malloc-fill=A5 --free-fill=DE |
782 | 9 | SGCHECK_EXEC_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=exp-sgcheck --error-exitcode=1 | ||
783 | 9 | VALGRIND_COMMAND= TESTS_ENVIRONMENT="valgrind" $(VALGRIND_EXEC_COMMAND) | 10 | VALGRIND_COMMAND= TESTS_ENVIRONMENT="valgrind" $(VALGRIND_EXEC_COMMAND) |
784 | 10 | HELGRIND_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=helgrind --read-var-info=yes --error-exitcode=1 --read-var-info=yes | 11 | HELGRIND_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=helgrind --read-var-info=yes --error-exitcode=1 --read-var-info=yes |
786 | 11 | DRD_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=drd | 12 | DRD_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=drd --error-exitcode=1 |
787 | 13 | SGCHECK_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=exp-sgcheck --error-exitcode=1 | ||
788 | 12 | MASSIF_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=massif | 14 | MASSIF_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=massif |
789 | 13 | GDB_COMMAND= $(LIBTOOL_COMMAND) gdb -f -x libtest/run.gdb | 15 | GDB_COMMAND= $(LIBTOOL_COMMAND) gdb -f -x libtest/run.gdb |
790 | 14 | PTRCHECK_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=exp-ptrcheck --error-exitcode=1 | 16 | PTRCHECK_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=exp-ptrcheck --error-exitcode=1 |
791 | @@ -19,11 +21,15 @@ | |||
792 | 19 | export VALGRIND_COMMAND | 21 | export VALGRIND_COMMAND |
793 | 20 | export HELGRIND_COMMAND | 22 | export HELGRIND_COMMAND |
794 | 21 | export DRD_COMMAND | 23 | export DRD_COMMAND |
795 | 24 | export SGCHECK_COMMAND | ||
796 | 22 | export GDB_COMMAND | 25 | export GDB_COMMAND |
797 | 23 | 26 | ||
798 | 24 | valgrind: | 27 | valgrind: |
799 | 25 | @echo make check TESTS_ENVIRONMENT="\"$(VALGRIND_EXEC_COMMAND)\"" | 28 | @echo make check TESTS_ENVIRONMENT="\"$(VALGRIND_EXEC_COMMAND)\"" |
800 | 26 | 29 | ||
801 | 30 | sgcheck: | ||
802 | 31 | @echo make check TESTS_ENVIRONMENT="\"$(SGCHECK_EXEC_COMMAND)\"" | ||
803 | 32 | |||
804 | 27 | valgrind-supressions: | 33 | valgrind-supressions: |
805 | 28 | @echo make check TESTS_ENVIRONMENT="\"$(VALGRIND_SUPRESSION)\"" | 34 | @echo make check TESTS_ENVIRONMENT="\"$(VALGRIND_SUPRESSION)\"" |
806 | 29 | 35 | ||
807 | @@ -96,6 +102,7 @@ | |||
808 | 96 | noinst_HEADERS+= libtest/thread.hpp | 102 | noinst_HEADERS+= libtest/thread.hpp |
809 | 97 | noinst_HEADERS+= libtest/tmpfile.hpp | 103 | noinst_HEADERS+= libtest/tmpfile.hpp |
810 | 98 | noinst_HEADERS+= libtest/lite.h | 104 | noinst_HEADERS+= libtest/lite.h |
811 | 105 | noinst_HEADERS+= libtest/valgrind.h | ||
812 | 99 | noinst_HEADERS+= libtest/vchar.hpp | 106 | noinst_HEADERS+= libtest/vchar.hpp |
813 | 100 | noinst_HEADERS+= libtest/version.h | 107 | noinst_HEADERS+= libtest/version.h |
814 | 101 | noinst_HEADERS+= libtest/visibility.h | 108 | noinst_HEADERS+= libtest/visibility.h |
815 | @@ -204,6 +211,10 @@ | |||
816 | 204 | drd-unittest: libtest/unittest | 211 | drd-unittest: libtest/unittest |
817 | 205 | @$(DRD_COMMAND) libtest/unittest | 212 | @$(DRD_COMMAND) libtest/unittest |
818 | 206 | 213 | ||
819 | 214 | sgcheck-unittest: libtest/unittest | ||
820 | 215 | echo $(SGCHECK_COMMAND) | ||
821 | 216 | @$(SGCHECK_COMMAND) libtest/unittest | ||
822 | 217 | |||
823 | 207 | libtest_skiptest_LDADD= libtest/libtest.la | 218 | libtest_skiptest_LDADD= libtest/libtest.la |
824 | 208 | libtest_skiptest_SOURCES= libtest/skiptest.cc | 219 | libtest_skiptest_SOURCES= libtest/skiptest.cc |
825 | 209 | check_PROGRAMS+= libtest/skiptest | 220 | check_PROGRAMS+= libtest/skiptest |
826 | 210 | 221 | ||
827 | === modified file 'libtest/lite.h' | |||
828 | --- libtest/lite.h 2013-02-23 21:43:42 +0000 | |||
829 | +++ libtest/lite.h 2013-04-20 09:57:27 +0000 | |||
830 | @@ -51,7 +51,7 @@ | |||
831 | 51 | # include <string.h> | 51 | # include <string.h> |
832 | 52 | #endif | 52 | #endif |
833 | 53 | 53 | ||
835 | 54 | #if defined(_WIN32) | 54 | #if defined(WIN32) |
836 | 55 | # include <malloc.h> | 55 | # include <malloc.h> |
837 | 56 | #else | 56 | #else |
838 | 57 | # include <alloca.h> | 57 | # include <alloca.h> |
839 | @@ -77,15 +77,7 @@ | |||
840 | 77 | # define SKIP(__message_format, ...) | 77 | # define SKIP(__message_format, ...) |
841 | 78 | #endif | 78 | #endif |
842 | 79 | 79 | ||
852 | 80 | static inline bool valgrind_is_caller(void) | 80 | #include <libtest/valgrind.h> |
844 | 81 | { | ||
845 | 82 | if (getenv("TESTS_ENVIRONMENT") && strstr(getenv("TESTS_ENVIRONMENT"), "valgrind")) | ||
846 | 83 | { | ||
847 | 84 | return true; | ||
848 | 85 | } | ||
849 | 86 | |||
850 | 87 | return false; | ||
851 | 88 | } | ||
853 | 89 | 81 | ||
854 | 90 | static inline size_t yatl_strlen(const char *s) | 82 | static inline size_t yatl_strlen(const char *s) |
855 | 91 | { | 83 | { |
856 | 92 | 84 | ||
857 | === modified file 'libtest/main.cc' | |||
858 | --- libtest/main.cc 2013-02-23 10:17:33 +0000 | |||
859 | +++ libtest/main.cc 2013-04-20 09:57:27 +0000 | |||
860 | @@ -165,7 +165,6 @@ | |||
861 | 165 | Error << "unknown value passed to --repeat: `" << optarg << "`"; | 165 | Error << "unknown value passed to --repeat: `" << optarg << "`"; |
862 | 166 | exit(EXIT_FAILURE); | 166 | exit(EXIT_FAILURE); |
863 | 167 | } | 167 | } |
864 | 168 | |||
865 | 169 | break; | 168 | break; |
866 | 170 | 169 | ||
867 | 171 | case OPT_LIBYATL_MATCH_COLLECTION: | 170 | case OPT_LIBYATL_MATCH_COLLECTION: |
868 | @@ -383,9 +382,9 @@ | |||
869 | 383 | std::cerr << "std::exception:" << e.what() << std::endl; | 382 | std::cerr << "std::exception:" << e.what() << std::endl; |
870 | 384 | exit_code= EXIT_FAILURE; | 383 | exit_code= EXIT_FAILURE; |
871 | 385 | } | 384 | } |
873 | 386 | catch (char const*) | 385 | catch (char const* s) |
874 | 387 | { | 386 | { |
876 | 388 | std::cerr << "Exception:" << std::endl; | 387 | std::cerr << "Exception:" << s << std::endl; |
877 | 389 | exit_code= EXIT_FAILURE; | 388 | exit_code= EXIT_FAILURE; |
878 | 390 | } | 389 | } |
879 | 391 | catch (...) | 390 | catch (...) |
880 | 392 | 391 | ||
881 | === modified file 'libtest/memcached.cc' | |||
882 | --- libtest/memcached.cc 2013-01-28 22:51:05 +0000 | |||
883 | +++ libtest/memcached.cc 2013-04-20 09:57:27 +0000 | |||
884 | @@ -75,14 +75,14 @@ | |||
885 | 75 | const std::string& username_arg, | 75 | const std::string& username_arg, |
886 | 76 | const std::string& password_arg) : | 76 | const std::string& password_arg) : |
887 | 77 | libtest::Server(host_arg, port_arg, | 77 | libtest::Server(host_arg, port_arg, |
889 | 78 | MEMCACHED_BINARY, false, is_socket_arg), | 78 | memcached_binary(), false, is_socket_arg), |
890 | 79 | _username(username_arg), | 79 | _username(username_arg), |
891 | 80 | _password(password_arg) | 80 | _password(password_arg) |
892 | 81 | { } | 81 | { } |
893 | 82 | 82 | ||
894 | 83 | Memcached(const std::string& host_arg, const in_port_t port_arg, const bool is_socket_arg) : | 83 | Memcached(const std::string& host_arg, const in_port_t port_arg, const bool is_socket_arg) : |
895 | 84 | libtest::Server(host_arg, port_arg, | 84 | libtest::Server(host_arg, port_arg, |
897 | 85 | MEMCACHED_BINARY, false, is_socket_arg) | 85 | memcached_binary(), false, is_socket_arg) |
898 | 86 | { | 86 | { |
899 | 87 | set_pid_file(); | 87 | set_pid_file(); |
900 | 88 | } | 88 | } |
901 | @@ -134,7 +134,7 @@ | |||
902 | 134 | 134 | ||
903 | 135 | const char *executable() | 135 | const char *executable() |
904 | 136 | { | 136 | { |
906 | 137 | return MEMCACHED_BINARY; | 137 | return memcached_binary(); |
907 | 138 | } | 138 | } |
908 | 139 | 139 | ||
909 | 140 | bool is_libtool() | 140 | bool is_libtool() |
910 | @@ -221,7 +221,7 @@ | |||
911 | 221 | 221 | ||
912 | 222 | libtest::Server *build_memcached(const std::string& hostname, const in_port_t try_port) | 222 | libtest::Server *build_memcached(const std::string& hostname, const in_port_t try_port) |
913 | 223 | { | 223 | { |
915 | 224 | if (HAVE_MEMCACHED_BINARY) | 224 | if (has_memcached()) |
916 | 225 | { | 225 | { |
917 | 226 | return new Memcached(hostname, try_port, false); | 226 | return new Memcached(hostname, try_port, false); |
918 | 227 | } | 227 | } |
919 | @@ -231,7 +231,7 @@ | |||
920 | 231 | 231 | ||
921 | 232 | libtest::Server *build_memcached_socket(const std::string& socket_file, const in_port_t try_port) | 232 | libtest::Server *build_memcached_socket(const std::string& socket_file, const in_port_t try_port) |
922 | 233 | { | 233 | { |
924 | 234 | if (HAVE_MEMCACHED_BINARY) | 234 | if (has_memcached()) |
925 | 235 | { | 235 | { |
926 | 236 | return new Memcached(socket_file, try_port, true); | 236 | return new Memcached(socket_file, try_port, true); |
927 | 237 | } | 237 | } |
928 | 238 | 238 | ||
929 | === modified file 'libtest/memcached.hpp' | |||
930 | --- libtest/memcached.hpp 2013-02-23 21:43:42 +0000 | |||
931 | +++ libtest/memcached.hpp 2013-04-20 09:57:27 +0000 | |||
932 | @@ -39,7 +39,7 @@ | |||
933 | 39 | #if defined(HAVE_LIBMEMCACHED) && HAVE_LIBMEMCACHED | 39 | #if defined(HAVE_LIBMEMCACHED) && HAVE_LIBMEMCACHED |
934 | 40 | inline bool operator== (const memcached_st& memc, const memcached_return_t rc) | 40 | inline bool operator== (const memcached_st& memc, const memcached_return_t rc) |
935 | 41 | { | 41 | { |
937 | 42 | if (memcached_last_error(&memc) == rc) | 42 | if (memcached_last_error(const_cast<memcached_st *>(&memc)) == rc) |
938 | 43 | { | 43 | { |
939 | 44 | return true; | 44 | return true; |
940 | 45 | } | 45 | } |
941 | 46 | 46 | ||
942 | === modified file 'libtest/result.cc' | |||
943 | --- libtest/result.cc 2013-01-24 11:17:17 +0000 | |||
944 | +++ libtest/result.cc 2013-04-20 09:57:27 +0000 | |||
945 | @@ -69,6 +69,7 @@ | |||
946 | 69 | } | 69 | } |
947 | 70 | 70 | ||
948 | 71 | __test_result::__test_result(const __test_result& other) : | 71 | __test_result::__test_result(const __test_result& other) : |
949 | 72 | std::exception(), | ||
950 | 72 | _line(other._line), | 73 | _line(other._line), |
951 | 73 | _file(other._file), | 74 | _file(other._file), |
952 | 74 | _func(other._func), | 75 | _func(other._func), |
953 | 75 | 76 | ||
954 | === modified file 'libtest/run-ci.gdb' | |||
955 | --- libtest/run-ci.gdb 2012-06-03 00:05:52 +0000 | |||
956 | +++ libtest/run-ci.gdb 2013-04-20 09:57:27 +0000 | |||
957 | @@ -1,6 +1,7 @@ | |||
958 | 1 | set logging on | 1 | set logging on |
959 | 2 | set logging overwrite on | 2 | set logging overwrite on |
960 | 3 | set environment LIBTEST_IN_GDB=1 | 3 | set environment LIBTEST_IN_GDB=1 |
961 | 4 | set ASAN_OPTIONS=abort_on_error=1 | ||
962 | 4 | run | 5 | run |
963 | 5 | thread apply all bt | 6 | thread apply all bt |
964 | 6 | quit | 7 | quit |
965 | 7 | 8 | ||
966 | === modified file 'libtest/run.gdb' | |||
967 | --- libtest/run.gdb 2012-03-26 01:08:09 +0000 | |||
968 | +++ libtest/run.gdb 2013-04-20 09:57:27 +0000 | |||
969 | @@ -1,5 +1,6 @@ | |||
970 | 1 | set logging on | 1 | set logging on |
971 | 2 | set logging overwrite on | 2 | set logging overwrite on |
972 | 3 | set environment LIBTEST_IN_GDB=1 | 3 | set environment LIBTEST_IN_GDB=1 |
973 | 4 | #set ASAN_OPTIONS=abort_on_error=1 | ||
974 | 4 | run | 5 | run |
975 | 5 | thread apply all bt | 6 | thread apply all bt |
976 | 6 | 7 | ||
977 | === modified file 'libtest/server_container.cc' | |||
978 | --- libtest/server_container.cc 2013-01-24 11:17:17 +0000 | |||
979 | +++ libtest/server_container.cc 2013-04-20 09:57:27 +0000 | |||
980 | @@ -215,9 +215,9 @@ | |||
981 | 215 | } | 215 | } |
982 | 216 | else if (server_type.compare("drizzled") == 0) | 216 | else if (server_type.compare("drizzled") == 0) |
983 | 217 | { | 217 | { |
985 | 218 | if (DRIZZLED_BINARY) | 218 | if (has_drizzled()) |
986 | 219 | { | 219 | { |
988 | 220 | if (HAVE_LIBDRIZZLE) | 220 | if (has_libdrizzle()) |
989 | 221 | { | 221 | { |
990 | 222 | server= build_drizzled("localhost", try_port); | 222 | server= build_drizzled("localhost", try_port); |
991 | 223 | } | 223 | } |
992 | @@ -225,8 +225,9 @@ | |||
993 | 225 | } | 225 | } |
994 | 226 | else if (server_type.compare("blobslap_worker") == 0) | 226 | else if (server_type.compare("blobslap_worker") == 0) |
995 | 227 | { | 227 | { |
997 | 228 | if (GEARMAND_BINARY) | 228 | if (has_gearmand()) |
998 | 229 | { | 229 | { |
999 | 230 | #ifdef GEARMAND_BLOBSLAP_WORKER | ||
1000 | 230 | if (GEARMAND_BLOBSLAP_WORKER) | 231 | if (GEARMAND_BLOBSLAP_WORKER) |
1001 | 231 | { | 232 | { |
1002 | 232 | if (HAVE_LIBGEARMAN) | 233 | if (HAVE_LIBGEARMAN) |
1003 | @@ -234,11 +235,12 @@ | |||
1004 | 234 | server= build_blobslap_worker(try_port); | 235 | server= build_blobslap_worker(try_port); |
1005 | 235 | } | 236 | } |
1006 | 236 | } | 237 | } |
1007 | 238 | #endif // GEARMAND_BLOBSLAP_WORKER | ||
1008 | 237 | } | 239 | } |
1009 | 238 | } | 240 | } |
1010 | 239 | else if (server_type.compare("memcached") == 0) | 241 | else if (server_type.compare("memcached") == 0) |
1011 | 240 | { | 242 | { |
1013 | 241 | if (HAVE_MEMCACHED_BINARY) | 243 | if (has_memcached()) |
1014 | 242 | { | 244 | { |
1015 | 243 | server= build_memcached("localhost", try_port); | 245 | server= build_memcached("localhost", try_port); |
1016 | 244 | } | 246 | } |
1017 | @@ -327,7 +329,7 @@ | |||
1018 | 327 | else | 329 | else |
1019 | 328 | { | 330 | { |
1020 | 329 | { | 331 | { |
1022 | 330 | #if defined(DEBUG) | 332 | #ifdef DEBUG |
1023 | 331 | if (DEBUG) | 333 | if (DEBUG) |
1024 | 332 | { | 334 | { |
1025 | 333 | Outn(); | 335 | Outn(); |
1026 | 334 | 336 | ||
1027 | === modified file 'libtest/signal.cc' | |||
1028 | --- libtest/signal.cc 2013-01-24 11:17:17 +0000 | |||
1029 | +++ libtest/signal.cc 2013-04-20 09:57:27 +0000 | |||
1030 | @@ -153,17 +153,13 @@ | |||
1031 | 153 | switch (sig) | 153 | switch (sig) |
1032 | 154 | { | 154 | { |
1033 | 155 | case SIGALRM: | 155 | case SIGALRM: |
1035 | 156 | Error << "SIGALRM"; | 156 | case SIGVTALRM: |
1036 | 157 | Error << strsignal(sig); | ||
1037 | 157 | if (gdb_is_caller()) | 158 | if (gdb_is_caller()) |
1038 | 158 | { | 159 | { |
1039 | 159 | abort(); | 160 | abort(); |
1040 | 160 | } | 161 | } |
1047 | 161 | exit(EXIT_SKIP); | 162 | exit(EXIT_FAILURE); |
1042 | 162 | |||
1043 | 163 | case SIGVTALRM: | ||
1044 | 164 | Error << "SIGVTALRM was called"; | ||
1045 | 165 | context->unblock(); | ||
1046 | 166 | raise(SIGVTALRM); | ||
1048 | 167 | 163 | ||
1049 | 168 | case SIGABRT: | 164 | case SIGABRT: |
1050 | 169 | case SIGUSR2: | 165 | case SIGUSR2: |
1051 | 170 | 166 | ||
1052 | === modified file 'libtest/unittest.cc' | |||
1053 | --- libtest/unittest.cc 2013-02-26 12:25:42 +0000 | |||
1054 | +++ libtest/unittest.cc 2013-04-20 09:57:27 +0000 | |||
1055 | @@ -181,6 +181,11 @@ | |||
1056 | 181 | } | 181 | } |
1057 | 182 | #pragma GCC diagnostic ignored "-Wstack-protector" | 182 | #pragma GCC diagnostic ignored "-Wstack-protector" |
1058 | 183 | 183 | ||
1059 | 184 | #ifdef __clang__ | ||
1060 | 185 | # pragma GCC diagnostic push | ||
1061 | 186 | # pragma GCC diagnostic ignored "-Wformat-security" | ||
1062 | 187 | #endif | ||
1063 | 188 | |||
1064 | 184 | static test_return_t ASSERT_FALSE__TEST(void *) | 189 | static test_return_t ASSERT_FALSE__TEST(void *) |
1065 | 185 | { | 190 | { |
1066 | 186 | try { | 191 | try { |
1067 | @@ -199,6 +204,10 @@ | |||
1068 | 199 | return TEST_FAILURE; | 204 | return TEST_FAILURE; |
1069 | 200 | } | 205 | } |
1070 | 201 | 206 | ||
1071 | 207 | #ifdef __clang__ | ||
1072 | 208 | # pragma GCC diagnostic pop | ||
1073 | 209 | #endif | ||
1074 | 210 | |||
1075 | 202 | static test_return_t ASSERT_NEQ_FAIL_TEST(void *) | 211 | static test_return_t ASSERT_NEQ_FAIL_TEST(void *) |
1076 | 203 | { | 212 | { |
1077 | 204 | try { | 213 | try { |
1078 | 205 | 214 | ||
1079 | === added file 'libtest/valgrind.h' | |||
1080 | --- libtest/valgrind.h 1970-01-01 00:00:00 +0000 | |||
1081 | +++ libtest/valgrind.h 2013-04-20 09:57:27 +0000 | |||
1082 | @@ -0,0 +1,55 @@ | |||
1083 | 1 | /* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: | ||
1084 | 2 | * | ||
1085 | 3 | * Data Differential YATL (i.e. libtest) library | ||
1086 | 4 | * | ||
1087 | 5 | * Copyright (C) 2012-2013 Data Differential, http://datadifferential.com/ | ||
1088 | 6 | * | ||
1089 | 7 | * Redistribution and use in source and binary forms, with or without | ||
1090 | 8 | * modification, are permitted provided that the following conditions are | ||
1091 | 9 | * met: | ||
1092 | 10 | * | ||
1093 | 11 | * * Redistributions of source code must retain the above copyright | ||
1094 | 12 | * notice, this list of conditions and the following disclaimer. | ||
1095 | 13 | * | ||
1096 | 14 | * * Redistributions in binary form must reproduce the above | ||
1097 | 15 | * copyright notice, this list of conditions and the following disclaimer | ||
1098 | 16 | * in the documentation and/or other materials provided with the | ||
1099 | 17 | * distribution. | ||
1100 | 18 | * | ||
1101 | 19 | * * The names of its contributors may not be used to endorse or | ||
1102 | 20 | * promote products derived from this software without specific prior | ||
1103 | 21 | * written permission. | ||
1104 | 22 | * | ||
1105 | 23 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
1106 | 24 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
1107 | 25 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
1108 | 26 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
1109 | 27 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
1110 | 28 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
1111 | 29 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
1112 | 30 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
1113 | 31 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
1114 | 32 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
1115 | 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
1116 | 34 | * | ||
1117 | 35 | */ | ||
1118 | 36 | |||
1119 | 37 | #pragma once | ||
1120 | 38 | |||
1121 | 39 | static inline bool valgrind_is_caller(void) | ||
1122 | 40 | { | ||
1123 | 41 | if (getenv("TESTS_ENVIRONMENT") && strstr(getenv("TESTS_ENVIRONMENT"), "valgrind")) | ||
1124 | 42 | { | ||
1125 | 43 | if (strstr(getenv("TESTS_ENVIRONMENT"), "--tool") == NULL) | ||
1126 | 44 | { | ||
1127 | 45 | return true; | ||
1128 | 46 | } | ||
1129 | 47 | |||
1130 | 48 | if (strstr(getenv("TESTS_ENVIRONMENT"), "--tool=memcheck")) | ||
1131 | 49 | { | ||
1132 | 50 | return true; | ||
1133 | 51 | } | ||
1134 | 52 | } | ||
1135 | 53 | |||
1136 | 54 | return false; | ||
1137 | 55 | } | ||
1138 | 0 | 56 | ||
1139 | === modified file 'libtest/vchar.cc' | |||
1140 | --- libtest/vchar.cc 2013-01-24 11:17:17 +0000 | |||
1141 | +++ libtest/vchar.cc 2013-04-20 09:57:27 +0000 | |||
1142 | @@ -50,6 +50,11 @@ | |||
1143 | 50 | 50 | ||
1144 | 51 | namespace libtest { | 51 | namespace libtest { |
1145 | 52 | 52 | ||
1146 | 53 | int random_alpha_num(void) | ||
1147 | 54 | { | ||
1148 | 55 | return ALPHANUMERICS[get_alpha_num()]; | ||
1149 | 56 | } | ||
1150 | 57 | |||
1151 | 53 | static std::string printer(const char *str, size_t length) | 58 | static std::string printer(const char *str, size_t length) |
1152 | 54 | { | 59 | { |
1153 | 55 | std::ostringstream buf; | 60 | std::ostringstream buf; |
1154 | 56 | 61 | ||
1155 | === modified file 'libtest/vchar.hpp' | |||
1156 | --- libtest/vchar.hpp 2013-01-08 01:03:28 +0000 | |||
1157 | +++ libtest/vchar.hpp 2013-04-20 09:57:27 +0000 | |||
1158 | @@ -44,6 +44,8 @@ | |||
1159 | 44 | 44 | ||
1160 | 45 | namespace libtest { | 45 | namespace libtest { |
1161 | 46 | 46 | ||
1162 | 47 | int random_alpha_num(void); | ||
1163 | 48 | |||
1164 | 47 | typedef std::vector<char*> vchar_ptr_t; | 49 | typedef std::vector<char*> vchar_ptr_t; |
1165 | 48 | typedef std::vector<char> vchar_t; | 50 | typedef std::vector<char> vchar_t; |
1166 | 49 | 51 | ||
1167 | @@ -61,6 +63,7 @@ | |||
1168 | 61 | } // namespace vchar | 63 | } // namespace vchar |
1169 | 62 | 64 | ||
1170 | 63 | #define vchar_param(__arg) (&__arg[0]), (__arg.size()) | 65 | #define vchar_param(__arg) (&__arg[0]), (__arg.size()) |
1171 | 66 | #define vchar_printf(__arg) int(__arg.size()), (&__arg[0]) | ||
1172 | 64 | 67 | ||
1173 | 65 | std::ostream& operator<<(std::ostream& output, const libtest::vchar_t& arg); | 68 | std::ostream& operator<<(std::ostream& output, const libtest::vchar_t& arg); |
1174 | 66 | 69 | ||
1175 | 67 | 70 | ||
1176 | === modified file 'm4/ax_harden_compiler_flags.m4' | |||
1177 | --- m4/ax_harden_compiler_flags.m4 2013-02-12 05:44:21 +0000 | |||
1178 | +++ m4/ax_harden_compiler_flags.m4 2013-04-20 09:57:27 +0000 | |||
1179 | @@ -53,7 +53,7 @@ | |||
1180 | 53 | # ? _APPEND_COMPILE_FLAGS_ERROR([-Wlong-long]) -- Don't turn on for | 53 | # ? _APPEND_COMPILE_FLAGS_ERROR([-Wlong-long]) -- Don't turn on for |
1181 | 54 | # compatibility issues memcached_stat_st | 54 | # compatibility issues memcached_stat_st |
1182 | 55 | 55 | ||
1184 | 56 | #serial 8 | 56 | #serial 9 |
1185 | 57 | 57 | ||
1186 | 58 | AC_DEFUN([_WARNINGS_AS_ERRORS], | 58 | AC_DEFUN([_WARNINGS_AS_ERRORS], |
1187 | 59 | [AC_CACHE_CHECK([if all warnings into errors],[ac_cv_warnings_as_errors], | 59 | [AC_CACHE_CHECK([if all warnings into errors],[ac_cv_warnings_as_errors], |
1188 | @@ -92,9 +92,12 @@ | |||
1189 | 92 | _APPEND_COMPILE_FLAGS_ERROR([-H]) | 92 | _APPEND_COMPILE_FLAGS_ERROR([-H]) |
1190 | 93 | _APPEND_COMPILE_FLAGS_ERROR([-ggdb]) | 93 | _APPEND_COMPILE_FLAGS_ERROR([-ggdb]) |
1191 | 94 | _APPEND_COMPILE_FLAGS_ERROR([-g]) | 94 | _APPEND_COMPILE_FLAGS_ERROR([-g]) |
1195 | 95 | _APPEND_COMPILE_FLAGS_ERROR([-O0])], | 95 | _APPEND_COMPILE_FLAGS_ERROR([-O0]), |
1196 | 96 | [_APPEND_COMPILE_FLAGS_ERROR([-g]) | 96 | _APPEND_COMPILE_FLAGS_ERROR([-fno-omit-frame-pointer]) |
1197 | 97 | _APPEND_COMPILE_FLAGS_ERROR([-O2])]) | 97 | ],[ |
1198 | 98 | _APPEND_COMPILE_FLAGS_ERROR([-g]) | ||
1199 | 99 | _APPEND_COMPILE_FLAGS_ERROR([-O2]) | ||
1200 | 100 | ]) | ||
1201 | 98 | 101 | ||
1202 | 99 | AS_IF([test "x$ac_cv_vcs_checkout" = xyes], | 102 | AS_IF([test "x$ac_cv_vcs_checkout" = xyes], |
1203 | 100 | [_APPEND_COMPILE_FLAGS_ERROR([-fstack-check]) | 103 | [_APPEND_COMPILE_FLAGS_ERROR([-fstack-check]) |
1204 | @@ -155,26 +158,31 @@ | |||
1205 | 155 | _APPEND_COMPILE_FLAGS_ERROR([-Wundef]) | 158 | _APPEND_COMPILE_FLAGS_ERROR([-Wundef]) |
1206 | 156 | _APPEND_COMPILE_FLAGS_ERROR([-Wunsafe-loop-optimizations]) | 159 | _APPEND_COMPILE_FLAGS_ERROR([-Wunsafe-loop-optimizations]) |
1207 | 157 | _APPEND_COMPILE_FLAGS_ERROR([-funsafe-loop-optimizations]) | 160 | _APPEND_COMPILE_FLAGS_ERROR([-funsafe-loop-optimizations]) |
1228 | 158 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=address]) | 161 | AS_IF([test "x$ac_cv_vcs_checkout" = xyes],[ |
1229 | 159 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=integer]) | 162 | _APPEND_COMPILE_FLAGS_ERROR([-fno-omit-frame-pointer]) |
1230 | 160 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=thread]) | 163 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=address]) |
1231 | 161 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=memory]) | 164 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=integer]) |
1232 | 162 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=alignment]) | 165 | AS_IF([test "x$enable_shared" = "xyes"],[ |
1233 | 163 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=bool]) | 166 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=thread]) |
1234 | 164 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=bounds]) | 167 | ]) |
1235 | 165 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=enum]) | 168 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=memory]) |
1236 | 166 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=float-cast-overflow]) | 169 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=alignment]) |
1237 | 167 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=float-divide-by-zero]) | 170 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=bool]) |
1238 | 168 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=integer-divide-by-zero]) | 171 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=bounds]) |
1239 | 169 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=null]) | 172 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=enum]) |
1240 | 170 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=object-size]) | 173 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=float-cast-overflow]) |
1241 | 171 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=return]) | 174 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=float-divide-by-zero]) |
1242 | 172 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=shift]) | 175 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=integer-divide-by-zero]) |
1243 | 173 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=signed-integer-overflow]) | 176 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=null]) |
1244 | 174 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=unreachable]) | 177 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=object-size]) |
1245 | 175 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=unsigned-integer-overflow]) | 178 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=return]) |
1246 | 176 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=vla-bound]) | 179 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=shift]) |
1247 | 177 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=vptr]) | 180 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=signed-integer-overflow]) |
1248 | 181 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=unreachable]) | ||
1249 | 182 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=unsigned-integer-overflow]) | ||
1250 | 183 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=vla-bound]) | ||
1251 | 184 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=vptr]) | ||
1252 | 185 | ]) | ||
1253 | 178 | _APPEND_COMPILE_FLAGS_ERROR([-Wclobbered]) | 186 | _APPEND_COMPILE_FLAGS_ERROR([-Wclobbered]) |
1254 | 179 | _APPEND_COMPILE_FLAGS_ERROR([-Wunused]) | 187 | _APPEND_COMPILE_FLAGS_ERROR([-Wunused]) |
1255 | 180 | _APPEND_COMPILE_FLAGS_ERROR([-Wunused-result]) | 188 | _APPEND_COMPILE_FLAGS_ERROR([-Wunused-result]) |
1256 | @@ -186,6 +194,7 @@ | |||
1257 | 186 | _APPEND_COMPILE_FLAGS_ERROR([-fwrapv]) | 194 | _APPEND_COMPILE_FLAGS_ERROR([-fwrapv]) |
1258 | 187 | _APPEND_COMPILE_FLAGS_ERROR([-fmudflapt]) | 195 | _APPEND_COMPILE_FLAGS_ERROR([-fmudflapt]) |
1259 | 188 | _APPEND_COMPILE_FLAGS_ERROR([-pipe]) | 196 | _APPEND_COMPILE_FLAGS_ERROR([-pipe]) |
1260 | 197 | _APPEND_COMPILE_FLAGS_ERROR([-Wsizeof-pointer-memaccess]) | ||
1261 | 189 | 198 | ||
1262 | 190 | AS_IF([test "x$ax_enable_debug" = xno], | 199 | AS_IF([test "x$ax_enable_debug" = xno], |
1263 | 191 | [AS_IF([test "x$ac_cv_vcs_checkout" = xyes], | 200 | [AS_IF([test "x$ac_cv_vcs_checkout" = xyes], |
1264 | @@ -213,9 +222,12 @@ | |||
1265 | 213 | _APPEND_COMPILE_FLAGS_ERROR([-H]) | 222 | _APPEND_COMPILE_FLAGS_ERROR([-H]) |
1266 | 214 | _APPEND_COMPILE_FLAGS_ERROR([-ggdb]) | 223 | _APPEND_COMPILE_FLAGS_ERROR([-ggdb]) |
1267 | 215 | _APPEND_COMPILE_FLAGS_ERROR([-g]) | 224 | _APPEND_COMPILE_FLAGS_ERROR([-g]) |
1271 | 216 | _APPEND_COMPILE_FLAGS_ERROR([-O0])], | 225 | _APPEND_COMPILE_FLAGS_ERROR([-O0]), |
1272 | 217 | [_APPEND_COMPILE_FLAGS_ERROR([-g]) | 226 | _APPEND_COMPILE_FLAGS_ERROR([-fno-omit-frame-pointer]) |
1273 | 218 | _APPEND_COMPILE_FLAGS_ERROR([-O2])]) | 227 | ],[ |
1274 | 228 | _APPEND_COMPILE_FLAGS_ERROR([-g]) | ||
1275 | 229 | _APPEND_COMPILE_FLAGS_ERROR([-O2]) | ||
1276 | 230 | ]) | ||
1277 | 219 | 231 | ||
1278 | 220 | AS_IF([test "x$ac_cv_vcs_checkout" = xyes], | 232 | AS_IF([test "x$ac_cv_vcs_checkout" = xyes], |
1279 | 221 | [_APPEND_COMPILE_FLAGS_ERROR([-fstack-check]) | 233 | [_APPEND_COMPILE_FLAGS_ERROR([-fstack-check]) |
1280 | @@ -268,27 +280,32 @@ | |||
1281 | 268 | _APPEND_COMPILE_FLAGS_ERROR([-funsafe-loop-optimizations]) | 280 | _APPEND_COMPILE_FLAGS_ERROR([-funsafe-loop-optimizations]) |
1282 | 269 | _APPEND_COMPILE_FLAGS_ERROR([-Wc++11-compat]) | 281 | _APPEND_COMPILE_FLAGS_ERROR([-Wc++11-compat]) |
1283 | 270 | # _APPEND_COMPILE_FLAGS_ERROR([-Weffc++]) | 282 | # _APPEND_COMPILE_FLAGS_ERROR([-Weffc++]) |
1305 | 271 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=address]) | 283 | AS_IF([test "x$ac_cv_vcs_checkout" = xyes],[ |
1306 | 272 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=integer]) | 284 | _APPEND_COMPILE_FLAGS_ERROR([-fno-omit-frame-pointer]) |
1307 | 273 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=thread]) | 285 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=address]) |
1308 | 274 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=memory]) | 286 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=integer]) |
1309 | 275 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=alignment]) | 287 | AS_IF([test "x$enable_shared" = "xyes"],[ |
1310 | 276 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=bool]) | 288 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=thread]) |
1311 | 277 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=bounds]) | 289 | ]) |
1312 | 278 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=enum]) | 290 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=memory]) |
1313 | 279 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=float-cast-overflow]) | 291 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=alignment]) |
1314 | 280 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=float-divide-by-zero]) | 292 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=bool]) |
1315 | 281 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=integer-divide-by-zero]) | 293 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=bounds]) |
1316 | 282 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=null]) | 294 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=enum]) |
1317 | 283 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=object-size]) | 295 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=float-cast-overflow]) |
1318 | 284 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=return]) | 296 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=float-divide-by-zero]) |
1319 | 285 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=shift]) | 297 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=integer-divide-by-zero]) |
1320 | 286 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=signed-integer-overflow]) | 298 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=null]) |
1321 | 287 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=unreachable]) | 299 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=object-size]) |
1322 | 288 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=unsigned-integer-overflow]) | 300 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=return]) |
1323 | 289 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=vla-bound]) | 301 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=shift]) |
1324 | 290 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=vptr]) | 302 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=signed-integer-overflow]) |
1325 | 291 | # _APPEND_COMPILE_FLAGS_ERROR([-Wold-style-cast]) | 303 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=unreachable]) |
1326 | 304 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=unsigned-integer-overflow]) | ||
1327 | 305 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=vla-bound]) | ||
1328 | 306 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=vptr]) | ||
1329 | 307 | ]) | ||
1330 | 308 | # _APPEND_COMPILE_FLAGS_ERROR([-Wold-style-cast]) | ||
1331 | 292 | _APPEND_COMPILE_FLAGS_ERROR([-Wclobbered]) | 309 | _APPEND_COMPILE_FLAGS_ERROR([-Wclobbered]) |
1332 | 293 | _APPEND_COMPILE_FLAGS_ERROR([-Wunused]) | 310 | _APPEND_COMPILE_FLAGS_ERROR([-Wunused]) |
1333 | 294 | _APPEND_COMPILE_FLAGS_ERROR([-Wunused-result]) | 311 | _APPEND_COMPILE_FLAGS_ERROR([-Wunused-result]) |
1334 | @@ -301,6 +318,7 @@ | |||
1335 | 301 | _APPEND_COMPILE_FLAGS_ERROR([-fwrapv]) | 318 | _APPEND_COMPILE_FLAGS_ERROR([-fwrapv]) |
1336 | 302 | _APPEND_COMPILE_FLAGS_ERROR([-fmudflapt]) | 319 | _APPEND_COMPILE_FLAGS_ERROR([-fmudflapt]) |
1337 | 303 | _APPEND_COMPILE_FLAGS_ERROR([-pipe]) | 320 | _APPEND_COMPILE_FLAGS_ERROR([-pipe]) |
1338 | 321 | _APPEND_COMPILE_FLAGS_ERROR([-Wsizeof-pointer-memaccess]) | ||
1339 | 304 | 322 | ||
1340 | 305 | AS_IF([test "x$ax_enable_debug" = xno], | 323 | AS_IF([test "x$ax_enable_debug" = xno], |
1341 | 306 | [AS_IF([test "x$ac_cv_vcs_checkout" = xyes], | 324 | [AS_IF([test "x$ac_cv_vcs_checkout" = xyes], |
1342 | 307 | 325 | ||
1343 | === modified file 'tests/keys.hpp' | |||
1344 | --- tests/keys.hpp 2012-09-17 11:41:20 +0000 | |||
1345 | +++ tests/keys.hpp 2013-04-20 09:57:27 +0000 | |||
1346 | @@ -2,7 +2,7 @@ | |||
1347 | 2 | * | 2 | * |
1348 | 3 | * Libmemcached library | 3 | * Libmemcached library |
1349 | 4 | * | 4 | * |
1351 | 5 | * Copyright (C) 2012 Data Differential, http://datadifferential.com/ | 5 | * Copyright (C) 2012-2013 Data Differential, http://datadifferential.com/ |
1352 | 6 | * | 6 | * |
1353 | 7 | * Redistribution and use in source and binary forms, with or without | 7 | * Redistribution and use in source and binary forms, with or without |
1354 | 8 | * modification, are permitted provided that the following conditions are | 8 | * modification, are permitted provided that the following conditions are |
1355 | @@ -62,18 +62,18 @@ | |||
1356 | 62 | key_buffer.resize(padding +1); | 62 | key_buffer.resize(padding +1); |
1357 | 63 | memset(&key_buffer[0], 'x', padding); | 63 | memset(&key_buffer[0], 'x', padding); |
1358 | 64 | 64 | ||
1359 | 65 | #if defined(HAVE_UUID_UUID_H) && HAVE_UUID_UUID_H | ||
1360 | 65 | if (HAVE_UUID_UUID_H) | 66 | if (HAVE_UUID_UUID_H) |
1361 | 66 | { | 67 | { |
1362 | 67 | #if defined(HAVE_UUID_UUID_H) && HAVE_UUID_UUID_H | ||
1363 | 68 | uuid_t out; | 68 | uuid_t out; |
1364 | 69 | uuid_generate(out); | 69 | uuid_generate(out); |
1365 | 70 | 70 | ||
1366 | 71 | uuid_unparse(out, &key_buffer[0]); | 71 | uuid_unparse(out, &key_buffer[0]); |
1367 | 72 | _keys[x]= strdup(&key_buffer[0]); | 72 | _keys[x]= strdup(&key_buffer[0]); |
1368 | 73 | (_keys[x])[UUID_STRING_MAXLENGTH]= 'x'; | 73 | (_keys[x])[UUID_STRING_MAXLENGTH]= 'x'; |
1369 | 74 | #endif | ||
1370 | 75 | } | 74 | } |
1371 | 76 | else // We just use a number and pad the string if UUID is not available | 75 | else // We just use a number and pad the string if UUID is not available |
1372 | 76 | #endif | ||
1373 | 77 | { | 77 | { |
1374 | 78 | char int_buffer[MEMCACHED_MAXIMUM_INTEGER_DISPLAY_LENGTH +1]; | 78 | char int_buffer[MEMCACHED_MAXIMUM_INTEGER_DISPLAY_LENGTH +1]; |
1375 | 79 | int key_length= snprintf(int_buffer, sizeof(int_buffer), "%u", uint32_t(x)); | 79 | int key_length= snprintf(int_buffer, sizeof(int_buffer), "%u", uint32_t(x)); |
1376 | 80 | 80 | ||
1377 | === modified file 'tests/libmemcached-1.0/mem_functions.cc' | |||
1378 | --- tests/libmemcached-1.0/mem_functions.cc 2013-04-03 13:14:23 +0000 | |||
1379 | +++ tests/libmemcached-1.0/mem_functions.cc 2013-04-20 09:57:27 +0000 | |||
1380 | @@ -2839,7 +2839,7 @@ | |||
1381 | 2839 | 2839 | ||
1382 | 2840 | test_compare(memcached_behavior_set(&memc, MEMCACHED_BEHAVIOR_KETAMA_HASH, MEMCACHED_HASH_MD5), MEMCACHED_SUCCESS); | 2840 | test_compare(memcached_behavior_set(&memc, MEMCACHED_BEHAVIOR_KETAMA_HASH, MEMCACHED_HASH_MD5), MEMCACHED_SUCCESS); |
1383 | 2841 | 2841 | ||
1385 | 2842 | test_compare(memcached_behavior_get(&memc, MEMCACHED_BEHAVIOR_KETAMA_HASH), MEMCACHED_HASH_MD5); | 2842 | test_compare(memcached_hash_t(memcached_behavior_get(&memc, MEMCACHED_BEHAVIOR_KETAMA_HASH)), MEMCACHED_HASH_MD5); |
1386 | 2843 | 2843 | ||
1387 | 2844 | test_compare(memcached_behavior_set_distribution(&memc, MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA_SPY), MEMCACHED_SUCCESS); | 2844 | test_compare(memcached_behavior_set_distribution(&memc, MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA_SPY), MEMCACHED_SUCCESS); |
1388 | 2845 | 2845 | ||
1389 | 2846 | 2846 | ||
1390 | === modified file 'tests/libmemcached-1.0/sasl.cc' | |||
1391 | --- tests/libmemcached-1.0/sasl.cc 2013-01-08 05:00:21 +0000 | |||
1392 | +++ tests/libmemcached-1.0/sasl.cc 2013-04-20 09:57:27 +0000 | |||
1393 | @@ -64,6 +64,7 @@ | |||
1394 | 64 | */ | 64 | */ |
1395 | 65 | static test_return_t sasl_auth_test(memcached_st *memc) | 65 | static test_return_t sasl_auth_test(memcached_st *memc) |
1396 | 66 | { | 66 | { |
1397 | 67 | #ifdef LIBMEMCACHED_WITH_SASL_SUPPORT | ||
1398 | 67 | if (LIBMEMCACHED_WITH_SASL_SUPPORT) | 68 | if (LIBMEMCACHED_WITH_SASL_SUPPORT) |
1399 | 68 | { | 69 | { |
1400 | 69 | test_compare(MEMCACHED_SUCCESS, memcached_set(memc, "foo", 3, "bar", 3, (time_t)0, (uint32_t)0)); | 70 | test_compare(MEMCACHED_SUCCESS, memcached_set(memc, "foo", 3, "bar", 3, (time_t)0, (uint32_t)0)); |
1401 | @@ -80,6 +81,9 @@ | |||
1402 | 80 | memcached_quit(memc); | 81 | memcached_quit(memc); |
1403 | 81 | return TEST_SUCCESS; | 82 | return TEST_SUCCESS; |
1404 | 82 | } | 83 | } |
1405 | 84 | #else | ||
1406 | 85 | (void)memc; | ||
1407 | 86 | #endif | ||
1408 | 83 | 87 | ||
1409 | 84 | return TEST_SKIPPED; | 88 | return TEST_SKIPPED; |
1410 | 85 | } | 89 | } |