Merge NoBug-release related additions

Merge branch 'master' into builder
This commit is contained in:
Fischlurch 2009-09-05 19:16:13 +02:00
commit 6fc7aedd95
32 changed files with 103 additions and 94 deletions

View file

@ -1,5 +1,5 @@
# Copyright (C) Lumiera.org
# 2007, Christian Thaeter <ct@pipapo.org>
# 2007, 2009 Christian Thaeter <ct@pipapo.org>
# 2008, Joel Holdsworth <joel@airwebreathe.org.uk>
#
# This program is free software; you can redistribute it and/or
@ -35,8 +35,9 @@ CLEANFILES =
# global pre-processor flags. Per-target variables should include
# these at the front (if possible) for consistency
AM_CPPFLAGS = -I$(top_srcdir)/src/ \
$(NOBUGMT_LUMIERA_CFLAGS)
AM_CPPFLAGS = -I$(top_srcdir)/src/ \
$(NOBUGMT_LUMIERA_CFLAGS) \
$(VALGRIND_CFLAGS)
# Only use subdirs if really needed, prefer the include scheme below
#SUBDIRS +=

View file

@ -215,7 +215,7 @@ def configurePlatform(env):
if not conf.CheckLibWithHeader('dl', 'dlfcn.h', 'C'):
problems.append('Functions for runtime dynamic loading not available.')
if not conf.CheckPkgConfig('nobugmt', 0.3):
if not conf.CheckPkgConfig('nobugmt', 200909.1):
problems.append('Did not find NoBug [http://www.pipapo.org/pipawiki/NoBug].')
else:
conf.env.mergeConf('nobugmt')
@ -227,10 +227,12 @@ def configurePlatform(env):
conf.env.Append(CCFLAGS = ' -pthread')
if conf.CheckCHeader('execinfo.h'):
conf.env.Append(CPPFLAGS = ' -DHAS_EXECINFO_H')
conf.env.Append(CPPFLAGS = ' -DHAVE_EXECINFO_H')
if conf.CheckCHeader('valgrind/valgrind.h'):
conf.env.Append(CPPFLAGS = ' -DHAS_VALGRIND_VALGIND_H')
conf.env.Append(CPPFLAGS = ' -DHAVE_VALGRIND_H')
else:
print 'Valgrind not found. The use of Valgrind is optional; building without.'
if not conf.CheckCXXHeader('tr1/memory'):
problems.append('We rely on the std::tr1 proposed standard extension for shared_ptr.')

View file

@ -40,6 +40,7 @@ AC_PROG_CXX
AC_LIBTOOL_DLOPEN
AC_PROG_LIBTOOL
PKG_PROG_PKG_CONFIG([0.22])
#
# test for headers
@ -85,9 +86,6 @@ AC_ARG_ENABLE(release, AC_HELP_STRING([--enable-release], [select NoBug RELEASE
# C headers and libraries
AC_LANG_PUSH([C])
AC_CHECK_HEADER([execinfo.h], AC_DEFINE(HAVE_EXECINFO_H))
# there is a warning in nobug, disabled til fixed AC_CHECK_HEADER([valgrind/valgrind.h], AC_DEFINE(HAVE_VALGRIND_VALGRIND_H))
AC_CHECK_LIB(dl, dlopen, [LUMIERA_PLUGIN_LIBS="$LUMIERA_PLUGIN_LIBS -ldl"],
[AC_MSG_ERROR([Dynamic linking not supported, report a bug])]
)
@ -186,15 +184,14 @@ AC_SUBST(LUMIERA_GUI_LIBS)
AC_SUBST(LUMIERA_GUI_CFLAGS)
############## Nobug Dependancies
PKG_CHECK_MODULES(NOBUG_LUMIERA, [nobug >= 0.3rc1],
AC_DEFINE(HAVE_NOBUG_H),
AC_MSG_ERROR([NoBug pkg-config metadata missing (http://www.pipapo.org/pipawiki/NoBug)])
)
PKG_CHECK_MODULES(NOBUGMT_LUMIERA, [nobugmt >= 0.3rc1],
AC_CHECK_HEADER([execinfo.h], AC_DEFINE(HAVE_EXECINFO_H))
PKG_CHECK_MODULES(VALGRIND, [valgrind], AC_DEFINE(HAVE_VALGRIND_H),
AC_MSG_NOTICE([valgrind not found (optional)]))
PKG_CHECK_MODULES(NOBUGMT_LUMIERA, [nobugmt >= 200909.1],
AC_DEFINE(HAVE_NOBUGMT_H),
AC_MSG_ERROR([NoBug pkg-config metadata missing (http://www.pipapo.org/pipawiki/NoBug)])
)
# END Nobug Dependancies
# Print a summary

View file

@ -298,7 +298,7 @@ lumiera_filedescriptor_delete (LumieraFiledescriptor self, const char* name)
if (self->handle && name && ((self->flags & O_RDWR) == O_RDWR))
{
TRACE (filedescriptor_dbg, "truncate %s to %lld", name, self->realsize);
TRACE (filedescriptor_dbg, "truncate %s to %lld", name, (long long)self->realsize);
lumiera_filehandlecache_checkout (lumiera_fhcache, self->handle);
int dummy = ftruncate (lumiera_filehandle_handle (self->handle), self->realsize);
(void) dummy; /* this is present to silence a warning */

View file

@ -121,7 +121,7 @@ lumiera_mmapings_mmap_acquire (LumieraMMapings self, LumieraFile file, LList acq
else
{
/* create new mmap */
TRACE (mmapings_dbg, "mmap not found, creating", mmap);
TRACE (mmapings_dbg, "mmap not found, creating");
ret = lumiera_mmap_new (file, start, size);
llist_insert_head (&self->mmaps, &ret->searchnode);

View file

@ -186,7 +186,7 @@ namespace lumiera {
AppState::abort (lumiera::Error& problem)
{
INFO (common, "Address of Config Facade = %x", &lumiera::Config::instance()); //////////TODO: a temp hack to force configfacade.cpp to be linked into lumiera exe.
INFO (common, "Address of Config Facade = %p", &lumiera::Config::instance()); //////////TODO: a temp hack to force configfacade.cpp to be linked into lumiera exe.
ERROR (common, "Aborting Lumiera after unhandled error: %s", cStr(problem.what()));

View file

@ -94,7 +94,7 @@ void Render::on_button_browse()
int result = dialog.run();
INFO(gui, "%d", result);
if(result == RESPONSE_OK)
INFO(gui, "%d", "RESPONSE_OK");
INFO(gui, "%s", "RESPONSE_OK");
}
} // namespace dialogs

View file

@ -62,7 +62,7 @@ XvDisplayer::XvDisplayer( Gtk::Widget *drawing_area, int width, int height ) :
for ( unsigned int n = 0; gotPort == false && n < count; ++n )
{
// Diagnostics
INFO(gui, "%s, %d, %d", adaptorInfo[ n ].name,
INFO(gui, "%s, %u, %u", adaptorInfo[ n ].name,
adaptorInfo[ n ].base_id, adaptorInfo[ n ].num_ports - 1);
for ( unsigned int port = adaptorInfo[ n ].base_id;

View file

@ -52,7 +52,7 @@
({ \
lumiera_cond_section_.lock = (cnd); \
NOBUG_IF_ALPHA(lumiera_cond_section_.flag = &NOBUG_FLAG(nobugflag);) \
RESOURCE_ENTER (nobugflag, (cnd)->rh, "acquire condmutex", &lumiera_cond_section_, \
RESOURCE_ENTER (nobugflag, (cnd)->rh, "acquire condmutex", \
NOBUG_RESOURCE_WAITING, lumiera_cond_section_.rh); \
if (pthread_mutex_lock (&(cnd)->cndmutex)) \
LUMIERA_DIE (LOCK_ACQUIRE); \
@ -74,7 +74,7 @@
REQUIRE (lumiera_lock_section_old_->lock, "section prematurely unlocked"); \
lumiera_cond_section_.lock = cnd; \
NOBUG_IF_ALPHA(lumiera_cond_section_.flag = &NOBUG_FLAG(nobugflag);) \
RESOURCE_ENTER (nobugflag, (cnd)->rh, "acquire condmutex", &lumiera_cond_section_, \
RESOURCE_ENTER (nobugflag, (cnd)->rh, "acquire condmutex", \
NOBUG_RESOURCE_WAITING, lumiera_cond_section_.rh); \
if (pthread_mutex_lock (&(cnd)->cndmutex)) \
LUMIERA_DIE (LOCK_ACQUIRE); \

View file

@ -22,6 +22,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
#include <inttypes.h>
#include <limits.h>
#include "mpool.h"
@ -47,7 +48,7 @@ typedef const mpoolcluster* const_MPoolcluster;
struct mpoolcluster_struct
{
llist node; /* all clusters */
void* data[]; /* bitmap and elements */
char data[]; /* bitmap and elements */
};
@ -116,7 +117,7 @@ bitmap_bit_get_nth (MPoolcluster cluster, unsigned index)
uintptr_t quot = index>>MPOOL_DIV_SHIFT;
uintptr_t rem = index & ~((~MPOOL_C(0))<<MPOOL_DIV_SHIFT);
uintptr_t* bitmap = (uintptr_t*)cluster->data;
uintptr_t* bitmap = (uintptr_t*)&cluster->data;
return bitmap[quot] & ((uintptr_t)1<<rem);
}
@ -136,7 +137,7 @@ mpool_destroy (MPool self)
if (bitmap_bit_get_nth ((MPoolcluster)cluster, i))
{
void* obj = cluster_element_get ((MPoolcluster)cluster, self, i);
TRACE (mpool_dbg, "dtor: cluster %p: obj %p: freelist %p", cluster, obj, self->freelist);
TRACE (mpool_dbg, "dtor: cluster %p: obj %p: freelist %p", cluster, obj, &self->freelist);
self->destroy (obj);
}
}
@ -166,7 +167,7 @@ mpool_cluster_alloc_ (MPool self)
return NULL;
/* clear the bitmap */
memset (cluster->data, 0, MPOOL_BITMAP_SIZE (self->elements_per_cluster));
memset (&cluster->data, 0, MPOOL_BITMAP_SIZE (self->elements_per_cluster));
/* initialize freelist */
for (unsigned i = 0; i < self->elements_per_cluster; ++i)
@ -240,7 +241,7 @@ alloc_near (MPoolcluster cluster, MPool self, void* locality)
uintptr_t quot = index>>MPOOL_DIV_SHIFT;
uintptr_t rem = index & ~((~MPOOL_C(0))<<MPOOL_DIV_SHIFT);
uintptr_t* bitmap = (uintptr_t*)cluster->data;
uintptr_t* bitmap = (uintptr_t*)&cluster->data;
unsigned r = ~0U;
/* the bitmap word at locality */
@ -276,10 +277,10 @@ bitmap_set_element (MPoolcluster cluster, MPool self, void* element)
uintptr_t quot = index>>MPOOL_DIV_SHIFT;
uintptr_t rem = index & ~((~MPOOL_C(0))<<MPOOL_DIV_SHIFT);
uintptr_t* bitmap = (uintptr_t*)cluster->data;
uintptr_t* bitmap = (uintptr_t*)&cluster->data;
bitmap[quot] |= ((uintptr_t)1<<rem);
TRACE (mpool_dbg, "set bit %d, index %d, of %p is %p", rem, quot, element, bitmap[quot]);
TRACE (mpool_dbg, "set bit %"PRIuPTR", index %"PRIuPTR", of %p is %"PRIuPTR, rem, quot, element, bitmap[quot]);
}
@ -295,10 +296,10 @@ bitmap_clear_element (MPoolcluster cluster, MPool self, void* element)
uintptr_t quot = index>>MPOOL_DIV_SHIFT;
uintptr_t rem = index & ~((~MPOOL_C(0))<<MPOOL_DIV_SHIFT);
uintptr_t* bitmap = (uintptr_t*)cluster->data;
uintptr_t* bitmap = (uintptr_t*)&cluster->data;
bitmap[quot] &= ~((uintptr_t)1<<rem);
TRACE (mpool_dbg, "cleared bit %d, index %d, of %p is %p", rem, quot, element, bitmap[quot]);
TRACE (mpool_dbg, "cleared bit %"PRIuPTR", index %"PRIuPTR", of %p is %"PRIuPTR, rem, quot, element, bitmap[quot]);
}
@ -403,7 +404,7 @@ find_near (MPoolcluster cluster, MPool self, void* element)
uintptr_t quot = index>>MPOOL_DIV_SHIFT;
uintptr_t rem = index & ~((~MPOOL_C(0))<<MPOOL_DIV_SHIFT);
uintptr_t* bitmap = (uintptr_t*)cluster->data;
uintptr_t* bitmap = (uintptr_t*)&cluster->data;
unsigned r = ~0U;
/* the bitmap word at locality */
@ -492,7 +493,7 @@ nobug_mpool_dump (const_MPool self,
if (depth > 2)
{
DUMP_LOG (" clusters %p: ", self->clusters);
DUMP_LOG (" clusters %p: ", &self->clusters);
int i = 0;
LLIST_FOREACH (&self->clusters, cluster)
DUMP_LOG (" %p: %u", cluster, ++i);
@ -500,7 +501,7 @@ nobug_mpool_dump (const_MPool self,
if (depth > 3)
{
DUMP_LOG (" freelist %p: ", self->freelist);
DUMP_LOG (" freelist %p: ", &self->freelist);
int i = 0;
LLIST_FOREACH (&self->freelist, node)
DUMP_LOG (" %p: %u", node, ++i);

View file

@ -46,7 +46,7 @@
({ \
lumiera_lock_section_.lock = (mtx); \
NOBUG_IF_ALPHA(lumiera_lock_section_.flag = &NOBUG_FLAG(nobugflag);) \
RESOURCE_ENTER (nobugflag, (mtx)->rh, "acquire mutex", &lumiera_lock_section_, \
RESOURCE_ENTER (nobugflag, (mtx)->rh, "acquire mutex", \
NOBUG_RESOURCE_WAITING, lumiera_lock_section_.rh); \
if (pthread_mutex_lock (&(mtx)->mutex)) \
LUMIERA_DIE (LOCK_ACQUIRE); \
@ -76,7 +76,7 @@
REQUIRE (lumiera_lock_section_old_->lock, "section prematurely unlocked"); \
lumiera_lock_section_.lock = mtx; \
NOBUG_IF_ALPHA(lumiera_lock_section_.flag = &NOBUG_FLAG(nobugflag);) \
RESOURCE_ENTER (nobugflag, (mtx)->rh, "acquire mutex", &lumiera_lock_section_, \
RESOURCE_ENTER (nobugflag, (mtx)->rh, "acquire mutex", \
NOBUG_RESOURCE_WAITING, lumiera_lock_section_.rh); \
if (pthread_mutex_lock (&(mtx)->mutex)) \
LUMIERA_DIE (LOCK_ACQUIRE); \

View file

@ -50,7 +50,7 @@
({ \
lumiera_reccond_section_.lock = (cnd); \
NOBUG_IF_ALPHA(lumiera_reccond_section_.flag = &NOBUG_FLAG(nobugflag);) \
RESOURCE_ENTER (nobugflag, (cnd)->rh, "acquire reccondmutex", &lumiera_reccond_section_, \
RESOURCE_ENTER (nobugflag, (cnd)->rh, "acquire reccondmutex", \
NOBUG_RESOURCE_WAITING, lumiera_reccond_section_.rh); \
if (pthread_mutex_lock (&(cnd)->reccndmutex)) \
LUMIERA_DIE (LOCK_ACQUIRE); \
@ -73,7 +73,7 @@
REQUIRE (lumiera_lock_section_old_->lock, "section prematurely unlocked"); \
lumiera_reccond_section_.lock = (cnd); \
NOBUG_IF_ALPHA(lumiera_reccond_section_.flag = &NOBUG_FLAG(nobugflag);) \
RESOURCE_ENTER (nobugflag, (cnd)->rh, "acquire reccondmutex", &lumiera_reccond_section_, \
RESOURCE_ENTER (nobugflag, (cnd)->rh, "acquire reccondmutex", \
NOBUG_RESOURCE_WAITING, lumiera_reccond_section_.rh); \
if (pthread_mutex_lock (&(cnd)->reccndmutex)) \
LUMIERA_DIE (LOCK_ACQUIRE); \

View file

@ -45,7 +45,7 @@
({ \
lumiera_lock_section_.lock = (mtx); \
NOBUG_IF_ALPHA(lumiera_lock_section_.flag = &NOBUG_FLAG(nobugflag);) \
RESOURCE_ENTER (nobugflag, (mtx)->rh, "acquire recmutex", &lumiera_lock_section_, \
RESOURCE_ENTER (nobugflag, (mtx)->rh, "acquire recmutex", \
NOBUG_RESOURCE_WAITING, lumiera_lock_section_.rh); \
if (pthread_mutex_lock (&(mtx)->recmutex)) \
LUMIERA_DIE (LOCK_ACQUIRE); \
@ -67,7 +67,7 @@
REQUIRE (lumiera_lock_section_old_->lock, "section prematurely unlocked"); \
lumiera_lock_section_.lock = (mtx); \
NOBUG_IF_ALPHA(lumiera_lock_section_.flag = &NOBUG_FLAG(nobugflag);) \
RESOURCE_ENTER (nobugflag, (mtx)->rh, "acquire recmutex", &lumiera_lock_section_, \
RESOURCE_ENTER (nobugflag, (mtx)->rh, "acquire recmutex", \
NOBUG_RESOURCE_WAITING, lumiera_lock_section_.rh); \
if (pthread_mutex_lock (&(mtx)->recmutex)) \
LUMIERA_DIE (LOCK_ACQUIRE); \

View file

@ -55,7 +55,7 @@ LUMIERA_ERROR_DECLARE(RWLOCK_WRLOCK);
lumiera_lock_section_.lock = (rwlck); \
NOBUG_IF_ALPHA(lumiera_lock_section_.flag = &NOBUG_FLAG(nobugflag);) \
RESOURCE_ENTER (nobugflag, (rwlck)->rh, "acquire readlock", \
&lumiera_lock_section_, NOBUG_RESOURCE_WAITING, \
NOBUG_RESOURCE_WAITING, \
lumiera_lock_section_.rh); \
if (pthread_rwlock_rdlock (&(rwlck)->rwlock)) \
LUMIERA_DIE (LOCK_ACQUIRE); \
@ -78,7 +78,7 @@ LUMIERA_ERROR_DECLARE(RWLOCK_WRLOCK);
REQUIRE (lumiera_lock_section_old_->lock, "section prematurely unlocked"); \
lumiera_lock_section_.lock = (rwlck); \
NOBUG_IF_ALPHA(lumiera_lock_section_.flag = &NOBUG_FLAG(nobugflag);) \
RESOURCE_ENTER (nobugflag, (rwlck)->rh, "acquire readlock", &lumiera_lock_section_, \
RESOURCE_ENTER (nobugflag, (rwlck)->rh, "acquire readlock", \
NOBUG_RESOURCE_WAITING, lumiera_lock_section_.rh); \
if (pthread_rwlock_rdlock (&(rwlck)->rwlock)) \
LUMIERA_DIE (LOCK_ACQUIRE); \
@ -106,7 +106,7 @@ LUMIERA_ERROR_DECLARE(RWLOCK_WRLOCK);
lumiera_lock_section_.lock = (rwlck); \
NOBUG_IF_ALPHA(lumiera_lock_section_.flag = &NOBUG_FLAG(nobugflag);) \
RESOURCE_ENTER (nobugflag, (rwlck)->rh, "acquire writelock", \
&lumiera_lock_section_, NOBUG_RESOURCE_WAITING, \
NOBUG_RESOURCE_WAITING, \
lumiera_lock_section_.rh); \
if (pthread_rwlock_wrlock (&(rwlck)->rwlock)) \
LUMIERA_DIE (LOCK_ACQUIRE); \
@ -128,7 +128,7 @@ LUMIERA_ERROR_DECLARE(RWLOCK_WRLOCK);
REQUIRE (lumiera_lock_section_old_->lock, "section prematurely unlocked"); \
lumiera_lock_section_.lock = (rwlck); \
NOBUG_IF_ALPHA(lumiera_lock_section_.flag = &NOBUG_FLAG(nobugflag);) \
RESOURCE_ENTER (nobugflag, (rwlck)->rh, "acquire writelock", &lumiera_lock_section_, \
RESOURCE_ENTER (nobugflag, (rwlck)->rh, "acquire writelock", \
NOBUG_RESOURCE_WAITING, lumiera_lock_section_.rh); \
if (pthread_rwlock_wrlock (&(twlck)->rwlock)) \
LUMIERA_DIE (LOCK_ACQUIRE); \

View file

@ -117,7 +117,7 @@ namespace lib {
transfer_control (ScopedPtrHolder& from, ScopedPtrHolder& to)
{
if (!from) return;
TRACE (test, "transfer_control<ScopedPtrHolder>... from=%x to=%x",&from, &to);
TRACE (test, "transfer_control<ScopedPtrHolder>... from=%p to=%p",&from, &to);
must_be_null (to);
to.swap(from);
}
@ -229,7 +229,7 @@ namespace lib {
transfer_control (ScopedHolder& from, ScopedHolder& to)
{
if (!from) return;
TRACE (test, "transfer_control<ScopedHolder>... from=%x to=%x",&from, &to);
TRACE (test, "transfer_control<ScopedHolder>... from=%p to=%p",&from, &to);
must_be_empty (to);
to.create();
try

View file

@ -128,7 +128,7 @@ namespace test{
try \
{ \
ERRONEOUS_STATEMENT ; \
NOTREACHED; \
NOTREACHED(); \
} \
catch (...) \
{ \

View file

@ -58,12 +58,12 @@ namespace asset {
Asset::Asset (const Ident& idi)
: ident(idi), id(AssetManager::reg (this, idi)), enabled(true)
{
TRACE (assetmem, "ctor Asset(id=%lu) : adr=%x %s", size_t(id), this, cStr(this->ident) );
TRACE (assetmem, "ctor Asset(id=%lu) : adr=%p %s", size_t(id), this, cStr(this->ident) );
}
Asset::~Asset ()
{
TRACE (assetmem, "dtor Asset(id=%lu) : adr=%x", size_t(id), this );
TRACE (assetmem, "dtor Asset(id=%lu) : adr=%p", size_t(id), this );
}

View file

@ -71,7 +71,7 @@ namespace control {
*/
class CommandRegistry
: public lib::Sync<>
, protected TypedAllocationManager
, public TypedAllocationManager
{
public:

View file

@ -49,7 +49,7 @@ namespace mobject {
Placement<MObject>::operator string () const
{
static format fmt("Placement<%s> %|50T.| use-cnt=%x ID(%x) adr=%x pointee=%x");
static format fmt("Placement<%s> %|50T.| use-cnt=%u ID(%x) adr=%p pointee=%p");
return str(fmt % typeid(*get()).name() % use_count()
% (size_t)getID()
% this

View file

@ -59,7 +59,7 @@ namespace asset
cout << "Asset(NULL)\n";
else
{
format fmt("%s %|50T.| id=%s adr=%x smart-ptr=%x use-count=%d");
format fmt("%s %|50T.| id=%s adr=%p smart-ptr=%p use-count=%u");
cout << fmt % str(aa) % aa->getID() % aa.get() % &aa % (aa.use_count() - 1) << "\n";
} }

View file

@ -113,13 +113,13 @@ namespace asset
try
{ // can't be found if specifying wrong Asset kind....
aMang.getAsset (ID<asset::Proc>(mm1->getID()));
NOTREACHED;
NOTREACHED();
}
catch (lumiera::error::Invalid& xxx) {ASSERT (xxx.getID()==LUMIERA_ERROR_WRONG_ASSET_KIND);}
try
{ // try accessing nonexistant ID
aMang.getAsset (ID<Asset> (1234567890));
NOTREACHED;
NOTREACHED();
}
catch (lumiera::error::Invalid& xxx) {ASSERT (xxx.getID()==LUMIERA_ERROR_UNKNOWN_ASSET_ID);}
lumiera_error (); // reset errorflag

View file

@ -154,7 +154,7 @@ namespace test {
try
{
*ref1;
NOTREACHED;
NOTREACHED();
}
catch (...)
{
@ -170,7 +170,7 @@ namespace test {
try
{
*ref2;
NOTREACHED;
NOTREACHED();
}
catch (...)
{

View file

@ -176,7 +176,7 @@ namespace lib {
ASSERT (&ref2);
ASSERT (&ref3);
ASSERT (&rX);
TRACE (test, "sizeof( Dummy<1234> ) = %d", sizeof(rX));
TRACE (test, "sizeof( Dummy<1234> ) = %u", sizeof(rX));
ASSERT (123==ref2.getID());
ASSERT (3+4+5==rX.getID());

View file

@ -315,7 +315,7 @@ namespace test {
try
{
INVOKE_CONFIG_SELECTOR (23);
NOTREACHED ;
NOTREACHED ();
}
catch (lumiera::error::Invalid& err)
{

View file

@ -135,7 +135,7 @@ namespace test {
subInterface.eat (b13);
me_can_has_more_numberz.eat();
INFO (test, "SizeOf = %i", sizeof(me_can_has_more_numberz));
INFO (test, "SizeOf = %u", sizeof(me_can_has_more_numberz));
}
};

View file

@ -103,10 +103,10 @@ namespace test{
ASSERT (rawP == &(*holder));
ASSERT (rawP->add(-5) == holder->add(-5));
TRACE (test, "holder at %x", &holder);
TRACE (test, "object at %x", holder.get() );
TRACE (test, "size(object) = %d", sizeof(*holder));
TRACE (test, "size(holder) = %d", sizeof(holder));
TRACE (test, "holder at %p", &holder);
TRACE (test, "object at %p", holder.get() );
TRACE (test, "size(object) = %u", sizeof(*holder));
TRACE (test, "size(holder) = %u", sizeof(holder));
}
ASSERT (0==checksum);
}
@ -124,7 +124,7 @@ namespace test{
try
{
create_contained_object (holder);
NOTREACHED ;
NOTREACHED ();
}
catch (int val)
{
@ -160,7 +160,7 @@ namespace test{
try
{
holder2 = holder;
NOTREACHED ;
NOTREACHED ();
}
catch (lumiera::error::Logic&)
{
@ -173,7 +173,7 @@ namespace test{
try
{
holder = holder2;
NOTREACHED ;
NOTREACHED ();
}
catch (lumiera::error::Logic&)
{
@ -190,7 +190,7 @@ namespace test{
try
{
holder = holder2;
NOTREACHED ;
NOTREACHED ();
}
catch (lumiera::error::Logic&)
{
@ -203,7 +203,7 @@ namespace test{
try
{
HO holder3 (holder2);
NOTREACHED ;
NOTREACHED ();
}
catch (lumiera::error::Logic&)
{

View file

@ -52,18 +52,18 @@ namespace lib {
public:
FixedDummy()
{
TRACE (test, "CTOR FixedDummy() --> this=%x val=%d", this, getVal());
TRACE (test, "CTOR FixedDummy() --> this=%p val=%d", this, getVal());
}
~FixedDummy()
{
TRACE (test, "DTOR ~FixedDummy() this=%x val=%d", this, getVal());
TRACE (test, "DTOR ~FixedDummy() this=%p val=%d", this, getVal());
}
friend void
transfer_control (FixedDummy& from, FixedDummy& to)
{
TRACE (test, "TRANSFER target=%x <-- source=%x (%d,%d)", &to,&from, to.getVal(),from.getVal());
TRACE (test, "TRANSFER target=%p <-- source=%p (%d,%d)", &to,&from, to.getVal(),from.getVal());
if (throw_in_transfer)
throw to.getVal();
@ -199,7 +199,7 @@ namespace lib {
try
{
create_contained_object (table[3]);
NOTREACHED ;
NOTREACHED ();
}
catch (int val)
{

View file

@ -288,7 +288,7 @@ namespace lumiera {
try
{
runner.maybeRun (unit2);
NOTREACHED;
NOTREACHED();
}
catch (lumiera::Error&)
{
@ -297,7 +297,7 @@ namespace lumiera {
try
{
runner.maybeRun (unit3);
NOTREACHED;
NOTREACHED();
}
catch (lumiera::Error&)
{
@ -398,7 +398,7 @@ namespace lumiera {
try
{
runner.maybeRun (unit4);
NOTREACHED;
NOTREACHED();
}
catch (lumiera::Error&)
{

View file

@ -97,7 +97,7 @@ namespace backend {
try
{
waitingHandle.join(); // protocol error: handle wasn't passed for starting a Thread;
NOTREACHED;
NOTREACHED();
}
catch (lumiera::error::Logic& logo)
{ lumiera_error(); }
@ -115,7 +115,7 @@ namespace backend {
Thread("test Thread joining-3",
bind (&ThreadWrapperJoin_test::theAction, this, 333),
waitingHandle); // but then pass it again for another thread....
NOTREACHED;
NOTREACHED();
}
catch (...)
{

View file

@ -46,13 +46,13 @@ namespace lib {
public:
TransDummy()
{
TRACE (test, "CTOR TransDummy() --> this=%x", this);
TRACE (test, "CTOR TransDummy() --> this=%p", this);
setVal(0); // we use val_==0 to mark the "empty" state
}
~TransDummy()
{
TRACE (test, "DTOR ~TransDummy() this=%x", this);
TRACE (test, "DTOR ~TransDummy() this=%p", this);
}
/* to make Dummy usable within vector, we need to provide
@ -64,14 +64,14 @@ namespace lib {
TransDummy (const TransDummy& o)
: Dummy()
{
TRACE (test, "COPY-ctor TransDummy( ref=%x ) --> this=%x", &o,this);
TRACE (test, "COPY-ctor TransDummy( ref=%p ) --> this=%p", &o,this);
ASSERT (!o, "protocol violation: real copy operations inhibited");
}
TransDummy&
operator= (TransDummy const& ref)
{
TRACE (test, "COPY target=%x <-- source=%x", this,&ref);
TRACE (test, "COPY target=%p <-- source=%p", this,&ref);
ASSERT (!(*this));
ASSERT (!ref, "protocol violation: real copy operations inhibited");
return *this;
@ -81,7 +81,7 @@ namespace lib {
setup (int x=0)
{
setVal (x? x : (rand() % 10000));
TRACE (test, "CREATE val=%d ---> this=%x", getVal(),this);
TRACE (test, "CREATE val=%d ---> this=%p", getVal(),this);
}
@ -100,7 +100,7 @@ namespace lib {
void
transfer_control (TransDummy& from, TransDummy& to)
{
TRACE (test, "TRANSFER target=%x <-- source=%x", &to,&from);
TRACE (test, "TRANSFER target=%p <-- source=%p", &to,&from);
ASSERT (!to, "protocol violation: target already manages another object");
to.setVal (from.getVal());
from.setVal(0);

View file

@ -27,7 +27,7 @@ TESTS_BEGIN
TEST ("allocation0")
{
lumiera_malloc (0);
NOTREACHED;
NOTREACHED();
}
TEST ("allocation1024")
@ -51,7 +51,7 @@ TEST ("allocationtoobig")
rl.rlim_max = 100*1024*1024;
setrlimit (RLIMIT_AS, &rl);
lumiera_malloc (200*1024*1024);
NOTREACHED;
NOTREACHED();
}
TEST ("streq")

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Copyright (C) Lumiera.org
# 2007 - 2008, Christian Thaeter <ct@pipapo.org>
#
@ -26,10 +26,11 @@
# stop testing on the first failure
export LC_ALL=C
NOBUG_LOGREGEX='^\(\*\*[0-9]*\*\* \)\?[0-9]\{10,\}: \(TRACE\|INFO\|NOTICE\|WARNING\|ERR\|TODO\|PLANNED\|FIXME\|DEPRECATED\|UNIMPLEMENTED\|NOTREACHED\):'
NOBUG_LOGREGEX='^\(\*\*[0-9]*\*\* \)\?[0-9]\{10,\}: \(TRACE\|INFO\|NOTICE\|WARNING\|ERR\|TODO\|PLANNED\|FIXME\|DEPRECATED\|UNIMPLEMENTED\):'
arg0="$0"
srcdir="$(dirname "$arg0")"
vgsuppression_mangle='/^\(\(==\)\|\(\*\*\)[0-9]*\(==\)\|\(\*\*\)\)\|\(\(\*\*[0-9]*\*\* \)\?[0-9]\{10,\}: ECHO:\)/d;'
ulimit -S -t 5 -v 524288
valgrind=""
@ -44,10 +45,10 @@ else
if [[ -x ".libs/vgsuppression" ]]; then
./libtool --mode=execute valgrind --leak-check=yes --show-reachable=yes -q --gen-suppressions=all vgsuppression 2>&1 \
| sed '/^\(==\)\|\(\*\*\)[0-9]*\(==\)\|\(\*\*\)/d;' >vgsuppression.supp
| sed -e "$vgsuppression_mangle" >vgsuppression.supp
else
valgrind --leak-check=yes --show-reachable=yes -q --gen-suppressions=all ./vgsuppression 2>&1 \
| sed '/^\(==\)\|\(\*\*\)[0-9]*\(==\)\|\(\*\*\)/d;' >vgsuppression.supp
| sed -e "$vgsuppression_mangle" >vgsuppression.supp
fi
fi
valgrind="$(which valgrind) --leak-check=yes --show-reachable=no --suppressions=vgsuppression.supp -q $VALGRINDFLAGS"
@ -117,6 +118,7 @@ function TEST()
rm -f ,send_stdin
rm -f ,expect_stdout
rm -f ,expect_stderr
expect_return=0
while read -r line; do
cmd="${line%%:*}"
@ -125,7 +127,6 @@ function TEST()
if [[ ! "$arg" ]]; then
arg='^$'
fi
expect_return=0
case $cmd in
'in')
@ -180,17 +181,24 @@ function TEST()
echo -n >,testtmp
if ! test -x $TESTBIN; then
local CALL
if declare -F | grep $TESTBIN >&/dev/null; then
CALL=
elif test -x $TESTBIN; then
CALL="env $TESTBIN_PREFIX"
else
CALL='-'
echo -n >,stdout
echo "test binary '$TESTBIN' not found" >,stderr
((fails+=1))
fi
else
if test "$CALL" != '-'; then
if test -f ,send_stdin; then
env $TESTBIN_PREFIX $TESTBIN "$@" <,send_stdin 2>,stderr >,stdout
$CALL $TESTBIN "$@" <,send_stdin 2>,stderr >,stdout
else
env $TESTBIN_PREFIX $TESTBIN "$@" 2>,stderr >,stdout
$CALL $TESTBIN "$@" 2>,stderr >,stdout
fi &>/dev/null
return=$?