==== bootstrap ==== doas -n pkill ldapd *** Error 1 in target 'kill' (ignored) [ -z "doas -n" ] || doas -n true rm -f ldapd1.conf ldapd.log doas -n install -m 600 -o root /home/src/regress/usr.sbin/ldapd/ldapd.conf ldapd1.conf doas -n ldapd -n -r /home/src/regress/usr.sbin/ldapd/obj -f /home/src/regress/usr.sbin/ldapd/obj/ldapd1.conf configuration ok doas -n ldapd -dvv -r /home/src/regress/usr.sbin/ldapd/obj -f /home/src/regress/usr.sbin/ldapd/obj/ldapd1.conf >ldapd.log 2>&1 & # wait up to 10 seconds for startup for i in `jot 100`; do if grep -q 'ldape: entering event loop' ldapd.log; then break; fi; sleep .1; done grep 'ldape: entering event loop' ldapd.log ldape: entering event loop ==== connect ==== ldapsearch -x -H ldapi://%2ftmp%2fldapi | diff - /home/src/regress/usr.sbin/ldapd/out/empty.log ldapsearch -x -H ldap://localhost:6639 2>&1 | diff - /home/src/regress/usr.sbin/ldapd/out/empty.log ldapsearch -x -H ldap://localhost:6636 2>&1 | diff - /home/src/regress/usr.sbin/ldapd/out/empty.log ==== import ==== ldapadd -f /home/src/regress/usr.sbin/ldapd/dit-example.ldif -Dcn=admin,dc=example,dc=com -x -w secret -H ldap://localhost:6639 | diff - /home/src/regress/usr.sbin/ldapd/out/adding.log ldapsearch -x -b dc=example,dc=com -H ldap://localhost:6639 | diff - /home/src/regress/usr.sbin/ldapd/out/example.log ldapsearch -x -D cn=admin,dc=example,dc=com -w secret -b dc=example,dc=com -H ldap://localhost:6639 | diff - /home/src/regress/usr.sbin/ldapd/out/example.log ==== perl ==== perl /home/src/regress/usr.sbin/ldapd/run-tests.pl 1 ldap entries cn=admin,dc=example,dc=com ==== purge ==== ldapdelete -Dcn=admin,dc=example,dc=com -x -w secret -H ldap://localhost:6639 -r dc=example,dc=com ldapsearch -x -H ldap://localhost:6639 2>&1 | diff - /home/src/regress/usr.sbin/ldapd/out/empty.log ==== kill ==== doas -n pkill ldapd