#!/bin/sh
# $Id: t-ibdb-1.sh,v 1.2 2006/10/05 01:42:46 ca Exp $
# Copyright (c) 2005 Sendmail, Inc. and its suppliers.
# All rights reserved.
#
# By using this file, you agree to the terms and conditions set
# forth in the LICENSE file which can be found at the top level of
# the sendmail distribution.
#
# ------------------------------------------------------------
# Description:
# run t-idb-0 with various truncation values
# ------------------------------------------------------------
#
test -s stop && exit 1
#
SD=`dirname $0`
. ${SD}/../chkmts/common.sh
ERRS=0
# created by binary
# test -d ${IBDBDIR} || mkdir ${IBDBDIR}
# XREF Must be the same as in t-idb-0.c
rm -f ${IBDBDIR}/${IBDB}
for i in 1 2 3 4 8 9 10 11 12 16 100 ""
do
# do not use any value greater than the blocksize as the test program
# currently can't deal with anything but one missing transaction
# at the end.
for j in 1 10 16 64 128 256 512
do
OPT="-1"
if test X"$i" != "X"
then
OPT="${OPT} -i $i"
fi
if test X"$j" != "X"
then
OPT="${OPT} -t $j"
fi
if ${VALGRIND} ./t-idb-0 ${OPT}
then
:
else
ERRS=`expr ${ERRS} + 1 `
echo "$0: failed for ${OPT}"
test X"${MTA_STOPONERROR}" != X && exit 1
fi
done
# XREF Must be the same as in t-idb-0.c
rm -f ${IBDBDIR}/${IBDB}
done
# XREF Must be the same as in t-idb-0.c
rm -f ${IBDBDIR}/${IBDB}
exit ${ERRS}
syntax highlighted by Code2HTML, v. 0.9.1