]> git.sur5r.net Git - openldap/blob - tests/scripts/defines.sh
ITS#8153 - olcTimeLimit should be Single Value
[openldap] / tests / scripts / defines.sh
1 #! /bin/sh
2 # $OpenLDAP$
3 ## This work is part of OpenLDAP Software <http://www.openldap.org/>.
4 ##
5 ## Copyright 1998-2017 The OpenLDAP Foundation.
6 ## All rights reserved.
7 ##
8 ## Redistribution and use in source and binary forms, with or without
9 ## modification, are permitted only as authorized by the OpenLDAP
10 ## Public License.
11 ##
12 ## A copy of this license is available in the file LICENSE in the
13 ## top-level directory of the distribution or, alternatively, at
14 ## <http://www.OpenLDAP.org/license.html>.
15
16 umask 077
17
18 TESTWD=`pwd`
19
20 # backends
21 MONITORDB=${AC_monitor-no}
22 BACKLDAP=${AC_ldap-ldapno}
23 BACKMETA=${AC_meta-metano}
24 BACKRELAY=${AC_relay-relayno}
25 BACKSQL=${AC_sql-sqlno}
26         RDBMS=${SLAPD_USE_SQL-rdbmsno}
27         RDBMSWRITE=${SLAPD_USE_SQLWRITE-no}
28
29 # overlays
30 ACCESSLOG=${AC_accesslog-accesslogno}
31 AUTOCA=${AC_autoca-autocano}
32 CONSTRAINT=${AC_constraint-constraintno}
33 DDS=${AC_dds-ddsno}
34 DYNLIST=${AC_dynlist-dynlistno}
35 MEMBEROF=${AC_memberof-memberofno}
36 PROXYCACHE=${AC_pcache-pcacheno}
37 PPOLICY=${AC_ppolicy-ppolicyno}
38 REFINT=${AC_refint-refintno}
39 RETCODE=${AC_retcode-retcodeno}
40 RWM=${AC_rwm-rwmno}
41 SYNCPROV=${AC_syncprov-syncprovno}
42 TRANSLUCENT=${AC_translucent-translucentno}
43 UNIQUE=${AC_unique-uniqueno}
44 VALSORT=${AC_valsort-valsortno}
45
46 # misc
47 WITH_SASL=${AC_WITH_SASL-no}
48 USE_SASL=${SLAPD_USE_SASL-no}
49 ACI=${AC_ACI_ENABLED-acino}
50 THREADS=${AC_THREADS-threadsno}
51 SLEEP0=${SLEEP0-1}
52 SLEEP1=${SLEEP1-7}
53 SLEEP2=${SLEEP2-15}
54
55 # dirs
56 PROGDIR=./progs
57 DATADIR=${USER_DATADIR-./testdata}
58 TESTDIR=${USER_TESTDIR-$TESTWD/testrun}
59 SCHEMADIR=${USER_SCHEMADIR-./schema}
60 case "$SCHEMADIR" in
61 .*)     ABS_SCHEMADIR="$TESTWD/$SCHEMADIR" ;;
62 *)  ABS_SCHEMADIR="$SCHEMADIR" ;;
63 esac
64
65 DBDIR1A=$TESTDIR/db.1.a
66 DBDIR1B=$TESTDIR/db.1.b
67 DBDIR1C=$TESTDIR/db.1.c
68 DBDIR1=$DBDIR1A
69 DBDIR2A=$TESTDIR/db.2.a
70 DBDIR2B=$TESTDIR/db.2.b
71 DBDIR2C=$TESTDIR/db.2.c
72 DBDIR2=$DBDIR2A
73 DBDIR3=$TESTDIR/db.3.a
74 DBDIR4=$TESTDIR/db.4.a
75 DBDIR5=$TESTDIR/db.5.a
76 DBDIR6=$TESTDIR/db.6.a
77 SQLCONCURRENCYDIR=$DATADIR/sql-concurrency
78
79 CLIENTDIR=../clients/tools
80 #CLIENTDIR=/usr/local/bin
81
82 # conf
83 CONF=$DATADIR/slapd.conf
84 CONFTWO=$DATADIR/slapd2.conf
85 CONF2DB=$DATADIR/slapd-2db.conf
86 MCONF=$DATADIR/slapd-master.conf
87 COMPCONF=$DATADIR/slapd-component.conf
88 PWCONF=$DATADIR/slapd-pw.conf
89 WHOAMICONF=$DATADIR/slapd-whoami.conf
90 ACLCONF=$DATADIR/slapd-acl.conf
91 RCONF=$DATADIR/slapd-referrals.conf
92 SRMASTERCONF=$DATADIR/slapd-syncrepl-master.conf
93 DSRMASTERCONF=$DATADIR/slapd-deltasync-master.conf
94 DSRSLAVECONF=$DATADIR/slapd-deltasync-slave.conf
95 PPOLICYCONF=$DATADIR/slapd-ppolicy.conf
96 PROXYCACHECONF=$DATADIR/slapd-proxycache.conf
97 PROXYAUTHZCONF=$DATADIR/slapd-proxyauthz.conf
98 CACHEMASTERCONF=$DATADIR/slapd-cache-master.conf
99 PROXYAUTHZMASTERCONF=$DATADIR/slapd-cache-master-proxyauthz.conf
100 R1SRSLAVECONF=$DATADIR/slapd-syncrepl-slave-refresh1.conf
101 R2SRSLAVECONF=$DATADIR/slapd-syncrepl-slave-refresh2.conf
102 P1SRSLAVECONF=$DATADIR/slapd-syncrepl-slave-persist1.conf
103 P2SRSLAVECONF=$DATADIR/slapd-syncrepl-slave-persist2.conf
104 P3SRSLAVECONF=$DATADIR/slapd-syncrepl-slave-persist3.conf
105 REFSLAVECONF=$DATADIR/slapd-ref-slave.conf
106 SCHEMACONF=$DATADIR/slapd-schema.conf
107 GLUECONF=$DATADIR/slapd-glue.conf
108 REFINTCONF=$DATADIR/slapd-refint.conf
109 RETCODECONF=$DATADIR/slapd-retcode.conf
110 UNIQUECONF=$DATADIR/slapd-unique.conf
111 LIMITSCONF=$DATADIR/slapd-limits.conf
112 DNCONF=$DATADIR/slapd-dn.conf
113 EMPTYDNCONF=$DATADIR/slapd-emptydn.conf
114 IDASSERTCONF=$DATADIR/slapd-idassert.conf
115 LDAPGLUECONF1=$DATADIR/slapd-ldapglue.conf
116 LDAPGLUECONF2=$DATADIR/slapd-ldapgluepeople.conf
117 LDAPGLUECONF3=$DATADIR/slapd-ldapgluegroups.conf
118 RELAYCONF=$DATADIR/slapd-relay.conf
119 CHAINCONF1=$DATADIR/slapd-chain1.conf
120 CHAINCONF2=$DATADIR/slapd-chain2.conf
121 GLUESYNCCONF1=$DATADIR/slapd-glue-syncrepl1.conf
122 GLUESYNCCONF2=$DATADIR/slapd-glue-syncrepl2.conf
123 SQLCONF=$DATADIR/slapd-sql.conf
124 SQLSRMASTERCONF=$DATADIR/slapd-sql-syncrepl-master.conf
125 TRANSLUCENTLOCALCONF=$DATADIR/slapd-translucent-local.conf
126 TRANSLUCENTREMOTECONF=$DATADIR/slapd-translucent-remote.conf
127 METACONF=$DATADIR/slapd-meta.conf
128 METACONF1=$DATADIR/slapd-meta-target1.conf
129 METACONF2=$DATADIR/slapd-meta-target2.conf
130 GLUELDAPCONF=$DATADIR/slapd-glue-ldap.conf
131 ACICONF=$DATADIR/slapd-aci.conf
132 VALSORTCONF=$DATADIR/slapd-valsort.conf
133 DYNLISTCONF=$DATADIR/slapd-dynlist.conf
134 RSLAVECONF=$DATADIR/slapd-repl-slave-remote.conf
135 PLSRSLAVECONF=$DATADIR/slapd-syncrepl-slave-persist-ldap.conf
136 PLSRMASTERCONF=$DATADIR/slapd-syncrepl-multiproxy.conf
137 DDSCONF=$DATADIR/slapd-dds.conf
138 PASSWDCONF=$DATADIR/slapd-passwd.conf
139 UNDOCONF=$DATADIR/slapd-config-undo.conf
140 NAKEDCONF=$DATADIR/slapd-config-naked.conf
141 VALREGEXCONF=$DATADIR/slapd-valregex.conf
142
143 DYNAMICCONF=$DATADIR/slapd-dynamic.ldif
144
145 # generated files
146 CONF1=$TESTDIR/slapd.1.conf
147 CONF2=$TESTDIR/slapd.2.conf
148 CONF3=$TESTDIR/slapd.3.conf
149 CONF4=$TESTDIR/slapd.4.conf
150 CONF5=$TESTDIR/slapd.5.conf
151 CONF6=$TESTDIR/slapd.6.conf
152 ADDCONF=$TESTDIR/slapadd.conf
153 CONFLDIF=$TESTDIR/slapd-dynamic.ldif
154
155 LOG1=$TESTDIR/slapd.1.log
156 LOG2=$TESTDIR/slapd.2.log
157 LOG3=$TESTDIR/slapd.3.log
158 LOG4=$TESTDIR/slapd.4.log
159 LOG5=$TESTDIR/slapd.5.log
160 LOG6=$TESTDIR/slapd.6.log
161 SLAPADDLOG1=$TESTDIR/slapadd.1.log
162 SLURPLOG=$TESTDIR/slurp.log
163
164 CONFIGPWF=$TESTDIR/configpw
165
166 # args
167 TOOLARGS="-x $LDAP_TOOLARGS"
168 TOOLPROTO="-P 3"
169
170 # cmds
171 CONFFILTER=$SRCDIR/scripts/conf.sh
172
173 MONITORDATA=$SRCDIR/scripts/monitor_data.sh
174
175 SLAPADD="$TESTWD/../servers/slapd/slapd -Ta -d 0 $LDAP_VERBOSE"
176 SLAPCAT="$TESTWD/../servers/slapd/slapd -Tc -d 0 $LDAP_VERBOSE"
177 SLAPINDEX="$TESTWD/../servers/slapd/slapd -Ti -d 0 $LDAP_VERBOSE"
178 SLAPMODIFY="$TESTWD/../servers/slapd/slapd -Tm -d 0 $LDAP_VERBOSE"
179 SLAPPASSWD="$TESTWD/../servers/slapd/slapd -Tpasswd"
180
181 unset DIFF_OPTIONS
182 # NOTE: -u/-c is not that portable...
183 DIFF="diff -i"
184 CMP="diff -i"
185 BCMP="diff -iB"
186 CMPOUT=/dev/null
187 SLAPD="$TESTWD/../servers/slapd/slapd -s0"
188 LDAPPASSWD="$CLIENTDIR/ldappasswd $TOOLARGS"
189 LDAPSASLSEARCH="$CLIENTDIR/ldapsearch $TOOLPROTO $LDAP_TOOLARGS -LLL"
190 LDAPSEARCH="$CLIENTDIR/ldapsearch $TOOLPROTO $TOOLARGS -LLL"
191 LDAPRSEARCH="$CLIENTDIR/ldapsearch $TOOLPROTO $TOOLARGS"
192 LDAPDELETE="$CLIENTDIR/ldapdelete $TOOLPROTO $TOOLARGS"
193 LDAPMODIFY="$CLIENTDIR/ldapmodify $TOOLPROTO $TOOLARGS"
194 LDAPADD="$CLIENTDIR/ldapmodify -a $TOOLPROTO $TOOLARGS"
195 LDAPMODRDN="$CLIENTDIR/ldapmodrdn $TOOLPROTO $TOOLARGS"
196 LDAPWHOAMI="$CLIENTDIR/ldapwhoami $TOOLARGS"
197 LDAPCOMPARE="$CLIENTDIR/ldapcompare $TOOLARGS"
198 LDAPEXOP="$CLIENTDIR/ldapexop $TOOLARGS"
199 SLAPDTESTER=$PROGDIR/slapd-tester
200 LDIFFILTER=$PROGDIR/ldif-filter
201 SLAPDMTREAD=$PROGDIR/slapd-mtread
202 LVL=${SLAPD_DEBUG-0x4105}
203 LOCALHOST=localhost
204 BASEPORT=${SLAPD_BASEPORT-9010}
205 PORT1=`expr $BASEPORT + 1`
206 PORT2=`expr $BASEPORT + 2`
207 PORT3=`expr $BASEPORT + 3`
208 PORT4=`expr $BASEPORT + 4`
209 PORT5=`expr $BASEPORT + 5`
210 PORT6=`expr $BASEPORT + 6`
211 URI1="ldap://${LOCALHOST}:$PORT1/"
212 URI2="ldap://${LOCALHOST}:$PORT2/"
213 URI3="ldap://${LOCALHOST}:$PORT3/"
214 URI4="ldap://${LOCALHOST}:$PORT4/"
215 URI5="ldap://${LOCALHOST}:$PORT5/"
216 URI6="ldap://${LOCALHOST}:$PORT6/"
217
218 # LDIF
219 LDIF=$DATADIR/test.ldif
220 LDIFADD1=$DATADIR/do_add.1
221 LDIFGLUED=$DATADIR/test-glued.ldif
222 LDIFORDERED=$DATADIR/test-ordered.ldif
223 LDIFORDEREDCP=$DATADIR/test-ordered-cp.ldif
224 LDIFORDEREDNOCP=$DATADIR/test-ordered-nocp.ldif
225 LDIFBASE=$DATADIR/test-base.ldif
226 LDIFPASSWD=$DATADIR/passwd.ldif
227 LDIFWHOAMI=$DATADIR/test-whoami.ldif
228 LDIFPASSWDOUT=$DATADIR/passwd-out.ldif
229 LDIFPPOLICY=$DATADIR/ppolicy.ldif
230 LDIFLANG=$DATADIR/test-lang.ldif
231 LDIFLANGOUT=$DATADIR/lang-out.ldif
232 LDIFREF=$DATADIR/referrals.ldif
233 LDIFREFINT=$DATADIR/test-refint.ldif
234 LDIFUNIQUE=$DATADIR/test-unique.ldif
235 LDIFLIMITS=$DATADIR/test-limits.ldif
236 LDIFDN=$DATADIR/test-dn.ldif
237 LDIFEMPTYDN1=$DATADIR/test-emptydn1.ldif
238 LDIFEMPTYDN2=$DATADIR/test-emptydn2.ldif
239 LDIFIDASSERT1=$DATADIR/test-idassert1.ldif
240 LDIFIDASSERT2=$DATADIR/test-idassert2.ldif
241 LDIFLDAPGLUE1=$DATADIR/test-ldapglue.ldif
242 LDIFLDAPGLUE2=$DATADIR/test-ldapgluepeople.ldif
243 LDIFLDAPGLUE3=$DATADIR/test-ldapgluegroups.ldif
244 LDIFCOMPMATCH=$DATADIR/test-compmatch.ldif
245 LDIFCHAIN1=$DATADIR/test-chain1.ldif
246 LDIFCHAIN2=$DATADIR/test-chain2.ldif
247 LDIFTRANSLUCENTDATA=$DATADIR/test-translucent-data.ldif
248 LDIFTRANSLUCENTCONFIG=$DATADIR/test-translucent-config.ldif
249 LDIFTRANSLUCENTADD=$DATADIR/test-translucent-add.ldif
250 LDIFTRANSLUCENTMERGED=$DATADIR/test-translucent-merged.ldif
251 LDIFMETA=$DATADIR/test-meta.ldif
252 LDIFVALSORT=$DATADIR/test-valsort.ldif
253 SQLADD=$DATADIR/sql-add.ldif
254 LDIFUNORDERED=$DATADIR/test-unordered.ldif
255 LDIFREORDERED=$DATADIR/test-reordered.ldif
256 LDIFMODIFY=$DATADIR/test-modify.ldif
257
258 # strings
259 MONITOR=""
260 REFDN="c=US"
261 BASEDN="dc=example,dc=com"
262 MANAGERDN="cn=Manager,$BASEDN"
263 UPDATEDN="cn=Replica,$BASEDN"
264 PASSWD=secret
265 BABSDN="cn=Barbara Jensen,ou=Information Technology DivisioN,ou=People,$BASEDN"
266 BJORNSDN="cn=Bjorn Jensen,ou=Information Technology DivisioN,ou=People,$BASEDN"
267 JAJDN="cn=James A Jones 1,ou=Alumni Association,ou=People,$BASEDN"
268 JOHNDDN="cn=John Doe,ou=Information Technology Division,ou=People,$BASEDN"
269 MELLIOTDN="cn=Mark Elliot,ou=Alumni Association,ou=People,$BASEDN"
270 REFINTDN="cn=Manager,o=refint"
271 RETCODEDN="ou=RetCodes,$BASEDN"
272 UNIQUEDN="cn=Manager,o=unique"
273 EMPTYDNDN="cn=Manager,c=US"
274 TRANSLUCENTROOT="o=translucent"
275 TRANSLUCENTUSER="ou=users,o=translucent"
276 TRANSLUCENTDN="uid=binder,o=translucent"
277 TRANSLUCENTPASSWD="bindtest"
278 METABASEDN="ou=Meta,$BASEDN"
279 METAMANAGERDN="cn=Manager,$METABASEDN"
280 VALSORTDN="cn=Manager,o=valsort"
281 VALSORTBASEDN="o=valsort"
282 MONITORDN="cn=Monitor"
283 OPERATIONSMONITORDN="cn=Operations,$MONITORDN"
284 CONNECTIONSMONITORDN="cn=Connections,$MONITORDN"
285 DATABASESMONITORDN="cn=Databases,$MONITORDN"
286 STATISTICSMONITORDN="cn=Statistics,$MONITORDN"
287
288 # generated outputs
289 SEARCHOUT=$TESTDIR/ldapsearch.out
290 SEARCHOUT2=$TESTDIR/ldapsearch2.out
291 SEARCHFLT=$TESTDIR/ldapsearch.flt
292 SEARCHFLT2=$TESTDIR/ldapsearch2.flt
293 LDIFFLT=$TESTDIR/ldif.flt
294 LDIFFLT2=$TESTDIR/ldif2.flt
295 TESTOUT=$TESTDIR/test.out
296 INITOUT=$TESTDIR/init.out
297 VALSORTOUT1=$DATADIR/valsort1.out
298 VALSORTOUT2=$DATADIR/valsort2.out
299 VALSORTOUT3=$DATADIR/valsort3.out
300 MONITOROUT1=$DATADIR/monitor1.out
301 MONITOROUT2=$DATADIR/monitor2.out
302 MONITOROUT3=$DATADIR/monitor3.out
303 MONITOROUT4=$DATADIR/monitor4.out
304
305 SERVER1OUT=$TESTDIR/server1.out
306 SERVER1FLT=$TESTDIR/server1.flt
307 SERVER2OUT=$TESTDIR/server2.out
308 SERVER2FLT=$TESTDIR/server2.flt
309 SERVER3OUT=$TESTDIR/server3.out
310 SERVER3FLT=$TESTDIR/server3.flt
311 SERVER4OUT=$TESTDIR/server4.out
312 SERVER4FLT=$TESTDIR/server4.flt
313 SERVER5OUT=$TESTDIR/server5.out
314 SERVER5FLT=$TESTDIR/server5.flt
315 SERVER6OUT=$TESTDIR/server6.out
316 SERVER6FLT=$TESTDIR/server6.flt
317
318 MASTEROUT=$SERVER1OUT
319 MASTERFLT=$SERVER1FLT
320 SLAVEOUT=$SERVER2OUT
321 SLAVE2OUT=$SERVER3OUT
322 SLAVEFLT=$SERVER2FLT
323 SLAVE2FLT=$SERVER3FLT
324
325 MTREADOUT=$TESTDIR/mtread.out
326
327 # original outputs for cmp
328 PROXYCACHEOUT=$DATADIR/proxycache.out
329 REFERRALOUT=$DATADIR/referrals.out
330 SEARCHOUTMASTER=$DATADIR/search.out.master
331 SEARCHOUTX=$DATADIR/search.out.xsearch
332 COMPSEARCHOUT=$DATADIR/compsearch.out
333 MODIFYOUTMASTER=$DATADIR/modify.out.master
334 ADDDELOUTMASTER=$DATADIR/adddel.out.master
335 MODRDNOUTMASTER0=$DATADIR/modrdn.out.master.0
336 MODRDNOUTMASTER1=$DATADIR/modrdn.out.master.1
337 MODRDNOUTMASTER2=$DATADIR/modrdn.out.master.2
338 MODRDNOUTMASTER3=$DATADIR/modrdn.out.master.3
339 ACLOUTMASTER=$DATADIR/acl.out.master
340 REPLOUTMASTER=$DATADIR/repl.out.master
341 MODSRCHFILTERS=$DATADIR/modify.search.filters
342 CERTIFICATETLS=$DATADIR/certificate.tls
343 CERTIFICATEOUT=$DATADIR/certificate.out
344 DNOUT=$DATADIR/dn.out
345 EMPTYDNOUT1=$DATADIR/emptydn.out.slapadd
346 EMPTYDNOUT2=$DATADIR/emptydn.out
347 IDASSERTOUT=$DATADIR/idassert.out
348 LDAPGLUEOUT=$DATADIR/ldapglue.out
349 LDAPGLUEANONYMOUSOUT=$DATADIR/ldapglueanonymous.out
350 RELAYOUT=$DATADIR/relay.out
351 CHAINOUT=$DATADIR/chain.out
352 CHAINREFOUT=$DATADIR/chainref.out
353 CHAINMODOUT=$DATADIR/chainmod.out
354 GLUESYNCOUT=$DATADIR/gluesync.out
355 SQLREAD=$DATADIR/sql-read.out
356 SQLWRITE=$DATADIR/sql-write.out
357 TRANSLUCENTOUT=$DATADIR/translucent.search.out
358 METAOUT=$DATADIR/meta.out
359 METACONCURRENCYOUT=$DATADIR/metaconcurrency.out
360 MANAGEOUT=$DATADIR/manage.out
361 SUBTREERENAMEOUT=$DATADIR/subtree-rename.out
362 ACIOUT=$DATADIR/aci.out
363 DYNLISTOUT=$DATADIR/dynlist.out
364 DDSOUT=$DATADIR/dds.out
365 MEMBEROFOUT=$DATADIR/memberof.out
366 MEMBEROFREFINTOUT=$DATADIR/memberof-refint.out
367 SHTOOL="$SRCDIR/../build/shtool"
368