is a symlink.
(test8): Check exit status of dbtest program.
* dbtest.c (compare): Exit with error indication if comparison of contents
indicates a difference.
(get): Exit with error indication after printing message if key not found.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14154
dc483132-0cff-0310-8789-
dd5450dbe970
+2002-02-19 Ken Raeburn <raeburn@mit.edu>
+
+ * run.test: Use "/bin/." instead of "/bin" in find commands in
+ case /bin itself is a symlink.
+ (test8): Check exit status of dbtest program.
+
+ * dbtest.c (compare): Exit with error indication if comparison of
+ contents indicates a difference.
+ (get): Exit with error indication after printing message if key
+ not found.
+
2002-01-04 Ken Raeburn <raeburn@mit.edu>
* run.test (test8): If test reports an error, exit with error
indication.
- * dbtest.c (compare): Exit with error indication if comparison
- fails.
+ * dbtest.c (compare): Exit with error indication if size
+ comparison fails.
2000-06-26 Ken Raeburn <raeburn@mit.edu>
len = MIN(db1->size, db2->size);
for (p1 = db1->data, p2 = db2->data; len--;)
if (*p1++ != *p2++) {
- printf("compare failed at offset %d\n",
+ err("compare failed at offset %d\n",
p1 - (u_char *)db1->data);
break;
}
/* NOTREACHED */
case 1:
#define NOSUCHKEY "get failed, no such key\n"
- if (ofd != STDOUT_FILENO)
+ if (ofd != STDOUT_FILENO) {
(void)write(ofd, NOSUCHKEY, sizeof(NOSUCHKEY) - 1);
- else
+ exit(1);
+ } else
(void)fprintf(stderr, "%lu: %.*s: %s",
lineno, (int) MIN(kp->size, 20), (char *) kp->data,
NOSUCHKEY);
dictsize=`wc -l < $DICT`
+ bindir=/bin/.
+
if [ $# -eq 0 ]; then
for t in 1 2 3 4 5 6 7 8 9 10 11 12 13 20; do
test$t
fi
}
-# Insert the programs in /bin with their paths as their keys.
+# Insert the programs in $bindir with their paths as their keys.
test3()
{
echo "Test 3: hash: small key, big data pairs"
rm -f $TMP1
- (find /bin -type f -exec test -r {} \; -print | xargs cat) > $TMP1
+ (find $bindir -type f -exec test -r {} \; -print | xargs cat) > $TMP1
for type in hash; do
rm -f $TMP2 $TMP3
- for i in `find /bin -type f -exec test -r {} \; -print`; do
+ for i in `find $bindir -type f -exec test -r {} \; -print`; do
echo p
echo k$i
echo D$i
echo " page size $psize"
for type in btree; do
rm -f $TMP2 $TMP3
- for i in `find /bin -type f -exec test -r {} \; -print`; do
+ for i in `find $bindir -type f -exec test -r {} \; -print`; do
echo p
echo k$i
echo D$i
done
echo "Test 3: recno: big data pairs"
rm -f $TMP2 $TMP3
- find /bin -type f -exec test -r {} \; -print |
+ find $bindir -type f -exec test -r {} \; -print |
awk '{
++i;
printf("p\nk%d\nD%s\ng\nk%d\n", i, $0, i);
printf("r\nkkey1\nr\nkkey2\n");
}
}' > $TMP1
- $PROG btree $TMP1 || exit 1
-# $PROG hash $TMP1 || exit 1
+ if $PROG btree $TMP1 ; then
+ true
+ else
+ echo "test8: btree tests failed"
+ exit 1
+ fi
+# $PROG hash $TMP1
# No explicit test for success.
}