diff options
author | Anas Nashif <anas.nashif@intel.com> | 2012-10-30 16:00:08 -0700 |
---|---|---|
committer | Anas Nashif <anas.nashif@intel.com> | 2012-10-30 16:00:08 -0700 |
commit | 7edf6e8ac0df452d4af7a15da08609821b0b3c0f (patch) | |
tree | 1cf0f01d9b6574972173e3cd40b62e4ebeaaaaae /test/scr026 | |
download | db4-7edf6e8ac0df452d4af7a15da08609821b0b3c0f.tar.gz db4-7edf6e8ac0df452d4af7a15da08609821b0b3c0f.tar.bz2 db4-7edf6e8ac0df452d4af7a15da08609821b0b3c0f.zip |
Imported Upstream version 4.8.30.NCupstream/4.8.30.NC
Diffstat (limited to 'test/scr026')
-rw-r--r-- | test/scr026/chk.method | 108 |
1 files changed, 108 insertions, 0 deletions
diff --git a/test/scr026/chk.method b/test/scr026/chk.method new file mode 100644 index 00000000..20365a28 --- /dev/null +++ b/test/scr026/chk.method @@ -0,0 +1,108 @@ +#!/bin/sh - +# +# $Id$ +# +# Check that DB doesn't call DB or DB_ENV methods internally. + +d=../.. + +t=__1 + +echo ======================================================== +echo "Check that DB doesn't call DB or DB_ENV methods internally." +echo ======================================================== +m=`grep '(\*[a-z][_a-z]*)' $d/dbinc/db.in | + sed -e 's/^[^(]*(\*//' \ + -e 's/).*//' \ + -e '/am_bulk/d' \ + -e '/am_close/d' \ + -e '/am_del/d' \ + -e '/am_destroy/d' \ + -e '/am_get/d' \ + -e '/am_put/d' \ + -e '/am_remove/d' \ + -e '/am_rename/d' \ + -e '/am_writelock/d' \ + -e '/app_dispatch/d' \ + -e '/db_append_recno/d' \ + -e '/db_errcall/d' \ + -e '/db_event_func/d' \ + -e '/db_feedback/d' \ + -e '/db_free/d' \ + -e '/db_malloc/d' \ + -e '/db_paniccall/d' \ + -e '/db_realloc/d' \ + -e '/dbt_usercopy/d' \ + -e '/dup_compare/d' \ + -e '/s_callback/d' | + sort -u` + +(cd $d && for i in $m; do + #echo "$i..." > /dev/stderr + egrep -- "->$i\(" */*.[ch] +done) | +sed \ + -e '/Wrapper function for/d' \ + -e '/\/db.h:/d' \ + -e '/^[^:]*:[ ]*\*[ ]/d' \ + -e '/^common\/db_getlong.c:/d' \ + -e '/^common\/util_cache.c:/d' \ + -e '/^common\/util_log.c:/d' \ + -e '/^common\/util_sig.c:/d' \ + -e '/^db185\//d' \ + -e '/^db_archive\//d' \ + -e '/^db_checkpoint\//d' \ + -e '/^db_codegen\//d' \ + -e '/^db_deadlock\//d' \ + -e '/^db_dump185\//d' \ + -e '/^db_dump\//d' \ + -e '/^db_hotbackup\//d' \ + -e '/^db_load\//d' \ + -e '/^db_printlog\//d' \ + -e '/^db_recover\//d' \ + -e '/^db_stat\//d' \ + -e '/^db_sql\//d' \ + -e '/^db_upgrade\//d' \ + -e '/^db_verify\//d' \ + -e '/^dbm\//d' \ + -e '/^examples_c\//d' \ + -e '/^examples_cxx\//d' \ + -e '/^examples_java\//d' \ + -e '/^hsearch\//d' \ + -e '/^libdb_java\//d' \ + -e '/^libdb_csharp\//d' \ + -e '/^mod_db4\//d' \ + -e '/^mutex\/tm.c:/d' \ + -e '/^php_db4\//d' \ + -e '/^stl\//d' \ + -e '/^tcl\//d' \ + -e '/^test\//d' \ + -e '/^test_erlang\//d' \ + -e '/^test_perf\//d' \ + -e '/^test_purify\//d' \ + -e '/^test_repmgr\//d' \ + -e '/^test_server\//d' \ + -e '/^test_thread\//d' \ + -e '/^test_vxworks\//d' \ + -e '/^xa\//d' \ + -e '/closeme->close() is a wrapper;/d' \ + -e '/crypto.c.*db_cipher->close/d' \ + -e '/db_err.c:.*dbenv->db_msgcall(dbenv, buf);/d' \ + -e '/db_iface.c:.*(txn->commit(txn, nosync ? DB_TXN_NOSYNC : 0));/d' \ + -e '/db_iface.c:.*if ((t_ret = txn->abort(txn)) != 0)/d' \ + -e '/db_iface.c:.*return (dbenv->txn_begin(dbenv, NULL, txnidp, 0));/d' \ + -e '/db_iface.c:.*return (dbp->get(dbp, txn, key, &data, flags));/d' \ + -e '/dbenv->is_alive(/d' \ + -e '/dbenv->thread_id(/d' \ + -e '/dbenv->thread_id_string(/d' \ + -e '/rep_util.c:.*ret = dbenv->rep_send(/d' \ + -e '/test_mutex.c:/d' +>$t + +test -s $t && { + cat $t + echo "FAIL: found DB/DB_ENV method calls DB library." + exit 1 +} + +exit 0 |