mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-24 00:29:58 -05:00
iana update.
checklocks.c is not in the compile path for production code anymore. git-svn-id: file:///svn/unbound/trunk@1129 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
ee5ee20071
commit
66f896ddbf
16 changed files with 7395 additions and 5494 deletions
|
|
@ -34,6 +34,7 @@ libtool=@libtool@
|
||||||
ldnsdir=@ldnsdir@
|
ldnsdir=@ldnsdir@
|
||||||
staticexe=@staticexe@
|
staticexe=@staticexe@
|
||||||
configfile=@ub_conf_file@
|
configfile=@ub_conf_file@
|
||||||
|
CHECKLOCK_SRC=@CHECKLOCK_SRC@
|
||||||
|
|
||||||
YACC=@YACC@
|
YACC=@YACC@
|
||||||
LEX=@LEX@
|
LEX=@LEX@
|
||||||
|
|
@ -62,7 +63,7 @@ COMMON_SRC=$(patsubst $(srcdir)/%,%, $(wildcard $(srcdir)/services/*.c \
|
||||||
$(srcdir)/services/cache/*.c $(srcdir)/util/*.c \
|
$(srcdir)/services/cache/*.c $(srcdir)/util/*.c \
|
||||||
$(srcdir)/util/data/*.c $(srcdir)/util/storage/*.c \
|
$(srcdir)/util/data/*.c $(srcdir)/util/storage/*.c \
|
||||||
$(srcdir)/iterator/*.c $(srcdir)/validator/*.c)) \
|
$(srcdir)/iterator/*.c $(srcdir)/validator/*.c)) \
|
||||||
util/configparser.c util/configlexer.c testcode/checklocks.c
|
util/configparser.c util/configlexer.c $(CHECKLOCK_SRC)
|
||||||
COMMON_OBJ=$(addprefix $(BUILD),$(COMMON_SRC:.c=.lo))
|
COMMON_OBJ=$(addprefix $(BUILD),$(COMMON_SRC:.c=.lo))
|
||||||
COMPAT_OBJ=$(addprefix $(BUILD)compat/,$(LIBOBJS:.o=.lo))
|
COMPAT_OBJ=$(addprefix $(BUILD)compat/,$(LIBOBJS:.o=.lo))
|
||||||
UNITTEST_SRC=$(patsubst $(srcdir)/%,%, \
|
UNITTEST_SRC=$(patsubst $(srcdir)/%,%, \
|
||||||
|
|
|
||||||
535
aclocal.m4
vendored
535
aclocal.m4
vendored
File diff suppressed because it is too large
Load diff
10
config.h.in
10
config.h.in
|
|
@ -328,9 +328,11 @@
|
||||||
/* in_port_t */
|
/* in_port_t */
|
||||||
#undef in_port_t
|
#undef in_port_t
|
||||||
|
|
||||||
/* Define as `__inline' if that's what the C compiler calls it, or to nothing
|
/* Define to `__inline__' or `__inline' if that's what the C compiler
|
||||||
if it is not supported. */
|
calls it, or to nothing if 'inline' is not supported under any name. */
|
||||||
|
#ifndef __cplusplus
|
||||||
#undef inline
|
#undef inline
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define to `short' if <sys/types.h> does not define. */
|
/* Define to `short' if <sys/types.h> does not define. */
|
||||||
#undef int16_t
|
#undef int16_t
|
||||||
|
|
@ -347,7 +349,7 @@
|
||||||
/* Define to rpl_malloc if the replacement function should be used. */
|
/* Define to rpl_malloc if the replacement function should be used. */
|
||||||
#undef malloc
|
#undef malloc
|
||||||
|
|
||||||
/* Define to `long' if <sys/types.h> does not define. */
|
/* Define to `long int' if <sys/types.h> does not define. */
|
||||||
#undef off_t
|
#undef off_t
|
||||||
|
|
||||||
/* Define to `int' if <sys/types.h> does not define. */
|
/* Define to `int' if <sys/types.h> does not define. */
|
||||||
|
|
@ -356,7 +358,7 @@
|
||||||
/* Define to 'int' if not defined */
|
/* Define to 'int' if not defined */
|
||||||
#undef rlim_t
|
#undef rlim_t
|
||||||
|
|
||||||
/* Define to `unsigned' if <sys/types.h> does not define. */
|
/* Define to `unsigned int' if <sys/types.h> does not define. */
|
||||||
#undef size_t
|
#undef size_t
|
||||||
|
|
||||||
/* Define to 'int' if not defined */
|
/* Define to 'int' if not defined */
|
||||||
|
|
|
||||||
|
|
@ -686,6 +686,8 @@ AC_ARG_ENABLE(lock_checks, AC_HELP_STRING([--enable-lock-checks],
|
||||||
, )
|
, )
|
||||||
if test x_$enable_lock_checks = x_yes; then
|
if test x_$enable_lock_checks = x_yes; then
|
||||||
AC_DEFINE(ENABLE_LOCK_CHECKS, 1, [Define if you want to use debug lock checking (slow).])
|
AC_DEFINE(ENABLE_LOCK_CHECKS, 1, [Define if you want to use debug lock checking (slow).])
|
||||||
|
CHECKLOCK_SRC="testcode/checklocks.c"
|
||||||
|
AC_SUBST(CHECKLOCK_SRC)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# set memory allocation checking if requested
|
# set memory allocation checking if requested
|
||||||
|
|
|
||||||
|
|
@ -1204,3 +1204,15 @@ int context_query_cmp(const void* ATTR_UNUSED(a), const void* ATTR_UNUSED(b))
|
||||||
log_assert(0);
|
log_assert(0);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int order_lock_cmp(const void* ATTR_UNUSED(e1), const void* ATTR_UNUSED(e2))
|
||||||
|
{
|
||||||
|
log_assert(0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int codeline_cmp(const void* ATTR_UNUSED(a), const void* ATTR_UNUSED(b))
|
||||||
|
{
|
||||||
|
log_assert(0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
24 June 2008: Wouter
|
||||||
|
- removed testcode/checklocks from production code compilation path.
|
||||||
|
|
||||||
23 June 2008: Wouter
|
23 June 2008: Wouter
|
||||||
- fixup minitpkg to cleanup on windows with its file locking troubles.
|
- fixup minitpkg to cleanup on windows with its file locking troubles.
|
||||||
- minitpkg shows skipped tests in report.
|
- minitpkg shows skipped tests in report.
|
||||||
|
|
|
||||||
|
|
@ -1036,3 +1036,17 @@ void worker_stat_timer_cb(void* ATTR_UNUSED(arg))
|
||||||
{
|
{
|
||||||
log_assert(0);
|
log_assert(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int order_lock_cmp(const void* ATTR_UNUSED(e1), const void* ATTR_UNUSED(e2))
|
||||||
|
{
|
||||||
|
log_assert(0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
codeline_cmp(const void* ATTR_UNUSED(a), const void* ATTR_UNUSED(b))
|
||||||
|
{
|
||||||
|
log_assert(0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -160,3 +160,28 @@ void worker_stat_timer_cb(void* ATTR_UNUSED(arg))
|
||||||
{
|
{
|
||||||
log_assert(0);
|
log_assert(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** keep track of lock id in lock-verify application */
|
||||||
|
struct order_id {
|
||||||
|
/** the thread id that created it */
|
||||||
|
int thr;
|
||||||
|
/** the instance number of creation */
|
||||||
|
int instance;
|
||||||
|
};
|
||||||
|
|
||||||
|
int order_lock_cmp(const void* e1, const void* e2)
|
||||||
|
{
|
||||||
|
struct order_id* o1 = (struct order_id*)e1;
|
||||||
|
struct order_id* o2 = (struct order_id*)e2;
|
||||||
|
if(o1->thr < o2->thr) return -1;
|
||||||
|
if(o1->thr > o2->thr) return 1;
|
||||||
|
if(o1->instance < o2->instance) return -1;
|
||||||
|
if(o1->instance > o2->instance) return 1;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
codeline_cmp(const void* a, const void* b)
|
||||||
|
{
|
||||||
|
return strcmp((const char*)a, (const char*)b);
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -832,20 +832,3 @@ checklock_thrjoin(pthread_t thread)
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* USE_THREAD_DEBUG */
|
#endif /* USE_THREAD_DEBUG */
|
||||||
|
|
||||||
int order_lock_cmp(const void* e1, const void* e2)
|
|
||||||
{
|
|
||||||
struct order_id* o1 = (struct order_id*)e1;
|
|
||||||
struct order_id* o2 = (struct order_id*)e2;
|
|
||||||
if(o1->thr < o2->thr) return -1;
|
|
||||||
if(o1->thr > o2->thr) return 1;
|
|
||||||
if(o1->instance < o2->instance) return -1;
|
|
||||||
if(o1->instance > o2->instance) return 1;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
codeline_cmp(const void* a, const void* b)
|
|
||||||
{
|
|
||||||
return strcmp((const char*)a, (const char*)b);
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -340,17 +340,4 @@ typedef pthread_key_t ub_thread_key_t;
|
||||||
#define ub_thread_key_get(key) pthread_getspecific(key)
|
#define ub_thread_key_get(key) pthread_getspecific(key)
|
||||||
|
|
||||||
#endif /* USE_THREAD_DEBUG */
|
#endif /* USE_THREAD_DEBUG */
|
||||||
|
|
||||||
/** keep track of lock id in lock-verify application */
|
|
||||||
struct order_id {
|
|
||||||
/** the thread id that created it */
|
|
||||||
int thr;
|
|
||||||
/** the instance number of creation */
|
|
||||||
int instance;
|
|
||||||
};
|
|
||||||
/** compare two order_ids */
|
|
||||||
int order_lock_cmp(const void* e1, const void* e2);
|
|
||||||
/** compare two codeline structs for rbtree */
|
|
||||||
int codeline_cmp(const void* a, const void* b);
|
|
||||||
|
|
||||||
#endif /* TESTCODE_CHECK_LOCKS_H */
|
#endif /* TESTCODE_CHECK_LOCKS_H */
|
||||||
|
|
|
||||||
|
|
@ -47,11 +47,21 @@
|
||||||
#include "util/log.h"
|
#include "util/log.h"
|
||||||
#include "util/rbtree.h"
|
#include "util/rbtree.h"
|
||||||
#include "util/locks.h"
|
#include "util/locks.h"
|
||||||
#include "testcode/checklocks.h"
|
#include "util/fptr_wlist.h"
|
||||||
|
|
||||||
/* --- data structures --- */
|
/* --- data structures --- */
|
||||||
struct lock_ref;
|
struct lock_ref;
|
||||||
|
|
||||||
|
/** keep track of lock id in lock-verify application
|
||||||
|
* Also defined in smallapp/worker_cb.c for fptr_wlist encapsulation
|
||||||
|
* breakage (the security tests break encapsulation for this test app) */
|
||||||
|
struct order_id {
|
||||||
|
/** the thread id that created it */
|
||||||
|
int thr;
|
||||||
|
/** the instance number of creation */
|
||||||
|
int instance;
|
||||||
|
};
|
||||||
|
|
||||||
/** a lock */
|
/** a lock */
|
||||||
struct order_lock {
|
struct order_lock {
|
||||||
/** rbnode in all tree */
|
/** rbnode in all tree */
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@
|
||||||
#include "util/log.h"
|
#include "util/log.h"
|
||||||
#include "util/rbtree.h"
|
#include "util/rbtree.h"
|
||||||
#include "util/locks.h"
|
#include "util/locks.h"
|
||||||
#include "testcode/checklocks.h"
|
#include "util/fptr_wlist.h"
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,6 @@
|
||||||
#include "util/data/packed_rrset.h"
|
#include "util/data/packed_rrset.h"
|
||||||
#include "util/storage/slabhash.h"
|
#include "util/storage/slabhash.h"
|
||||||
#include "util/locks.h"
|
#include "util/locks.h"
|
||||||
#include "testcode/checklocks.h"
|
|
||||||
#include "daemon/acl_list.h"
|
#include "daemon/acl_list.h"
|
||||||
#include "libunbound/libworker.h"
|
#include "libunbound/libworker.h"
|
||||||
#include "libunbound/context.h"
|
#include "libunbound/context.h"
|
||||||
|
|
|
||||||
|
|
@ -290,4 +290,22 @@ int fptr_whitelist_mod_get_mem(size_t (*fptr)(struct module_env* env, int id));
|
||||||
*/
|
*/
|
||||||
int fptr_whitelist_alloc_cleanup(void (*fptr)(void*));
|
int fptr_whitelist_alloc_cleanup(void (*fptr)(void*));
|
||||||
|
|
||||||
|
/** Due to module breakage by fptr wlist, these test app declarations
|
||||||
|
* are presented here */
|
||||||
|
/**
|
||||||
|
* compare two order_ids from lock-verify test app
|
||||||
|
* @param e1: first order_id
|
||||||
|
* @param e2: second order_id
|
||||||
|
* @return compare code -1, 0, +1 (like memcmp).
|
||||||
|
*/
|
||||||
|
int order_lock_cmp(const void* e1, const void* e2);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* compare two codeline structs for rbtree from memstats test app
|
||||||
|
* @param a: codeline
|
||||||
|
* @param b: codeline
|
||||||
|
* @return compare code -1, 0, +1 (like memcmp).
|
||||||
|
*/
|
||||||
|
int codeline_cmp(const void* a, const void* b);
|
||||||
|
|
||||||
#endif /* UTIL_FPTR_WLIST_H */
|
#endif /* UTIL_FPTR_WLIST_H */
|
||||||
|
|
|
||||||
|
|
@ -3961,6 +3961,7 @@
|
||||||
4894,
|
4894,
|
||||||
4899,
|
4899,
|
||||||
4900,
|
4900,
|
||||||
|
4914,
|
||||||
4940,
|
4940,
|
||||||
4941,
|
4941,
|
||||||
4942,
|
4942,
|
||||||
|
|
@ -4028,6 +4029,7 @@
|
||||||
5083,
|
5083,
|
||||||
5084,
|
5084,
|
||||||
5085,
|
5085,
|
||||||
|
5092,
|
||||||
5093,
|
5093,
|
||||||
5099,
|
5099,
|
||||||
5100,
|
5100,
|
||||||
|
|
@ -4706,6 +4708,7 @@
|
||||||
9025,
|
9025,
|
||||||
9026,
|
9026,
|
||||||
9080,
|
9080,
|
||||||
|
9085,
|
||||||
9086,
|
9086,
|
||||||
9087,
|
9087,
|
||||||
9088,
|
9088,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue