1#! /bin/sh 2## $OpenLDAP$ 3## This work is part of OpenLDAP Software <http://www.openldap.org/>. 4## 5## Copyright 2016-2021 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## ACKNOWLEDGEMENTS: 17## This module was written in 2016 by Ond��ej Kuzn��k for Symas Corp. 18 19echo "running defines.sh" 20. $SRCDIR/scripts/defines.sh 21 22. ${SCRIPTDIR}/common.sh 23 24echo "Comparing supertype of a variant attribute..." 25$LDAPCOMPARE -H $URI1 \ 26 "ou=Groups,$BASEDN" \ 27 "name:Alumni Association" >> $TESTOUT 2>&1 28RC=$? 29if test $RC != 6 && test $RC,$BACKEND != 5,null ; then 30 echo "ldapcompare failed ($RC)!" 31 test $KILLSERVERS != no && kill -HUP $KILLPIDS 32 exit 1 33fi 34 35echo "Testing searches against attribute supertypes..." 36echo "# Testing searches against attribute supertypes..." >> $SEARCHOUT 37$LDAPSEARCH -b "$BASEDN" -H $URI1 \ 38 "(&(name=groups)(name=Alumni Association))" \ 39 >> $SEARCHOUT 2>&1 40RC=$? 41if test $RC != 0 ; then 42 echo "ldapsearch failed ($RC)!" 43 test $KILLSERVERS != no && kill -HUP $KILLPIDS 44 exit $RC 45fi 46 47test $KILLSERVERS != no && kill -HUP $KILLPIDS 48 49LDIF=data/test007-out.ldif 50 51echo "Filtering ldapsearch results..." 52$LDIFFILTER -s e < $SEARCHOUT > $SEARCHFLT 53echo "Filtering expected entries..." 54$LDIFFILTER -s e < $LDIF > $LDIFFLT 55echo "Comparing filter output..." 56$CMP $SEARCHFLT $LDIFFLT > $CMPOUT 57 58if test $? != 0 ; then 59 echo "Comparison failed" 60 exit 1 61fi 62 63echo ">>>>> Test succeeded" 64 65test $KILLSERVERS != no && wait 66 67exit 0 68