3 # $Id: s_chk_ext_method_calls,v 0f73af5ae3da 2010/05/10 05:38:40 alexander $
5 # Check that DB doesn't call DB or DB_ENV methods internally.
9 echo 'FAIL: cannot find source distribution directory.'
17 echo ========================================================
18 echo "Check that DB doesn't call DB or DB_ENV methods internally."
19 echo ========================================================
20 m=`grep '(\*[a-z][_a-z]*)' $s/dbinc/db.in |
21 sed -e 's/^[^(]*(\*//' \
32 -e '/am_writelock/d' \
33 -e '/app_dispatch/d' \
34 -e '/db_append_recno/d' \
36 -e '/db_event_func/d' \
40 -e '/db_paniccall/d' \
42 -e '/dbt_usercopy/d' \
47 (cd $s && for i in $m; do
48 #echo "$i..." > /dev/stderr
49 egrep -- "->$i\(" */*.[ch]
52 -e '/Wrapper function for/d' \
54 -e '/^[^:]*:[ ]*\*[ ]/d' \
55 -e '/^common\/db_getlong.c:/d' \
56 -e '/^common\/util_cache.c:/d' \
57 -e '/^common\/util_log.c:/d' \
58 -e '/^common\/util_sig.c:/d' \
61 -e '/^mutex\/tm.c:/d' \
62 -e '/closeme->close() is a wrapper;/d' \
63 -e '/crypto.c.*db_cipher->close/d' \
64 -e '/db_err.c:.*dbenv->db_msgcall(dbenv, buf);/d' \
65 -e '/db_iface.c:.*(txn->commit(txn, nosync ? DB_TXN_NOSYNC : 0));/d' \
66 -e '/db_iface.c:.*if ((t_ret = txn->abort(txn)) != 0)/d' \
67 -e '/db_iface.c:.*return (dbenv->txn_begin(dbenv, NULL, txnidp, 0));/d' \
68 -e '/db_iface.c:.*return (dbp->get(dbp, txn, key, &data, flags));/d' \
69 -e '/dbenv->is_alive(/d' \
70 -e '/dbenv->thread_id(/d' \
71 -e '/dbenv->thread_id_string(/d' \
72 -e '/rep_util.c:.*ret = dbenv->rep_send(/d' \
73 -e '/test_mutex.c:/d' \
75 -e '/repmgr\/repmgr_net.c.*env->close()/d'\
76 -e '/repmgr\/repmgr_method.c.*DB_CHANNEL->send_request()/d' \
77 -e '/dbinc\/repmgr.h.*set_config()/d' \
78 -e '/db_vrfyutil.c:.*vdp->txn->commit/d' \
83 echo "FAIL: found DB/DB_ENV method calls DB library."