[asterisk-commits] may: branch may/chan_ooh323_evo r376387 - in /team/may/chan_ooh323_evo: ./ in...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Nov 16 10:59:27 CST 2012


Author: may
Date: Fri Nov 16 10:59:21 2012
New Revision: 376387

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=376387
Log:
Multiple revisions 376341,376344-376345

........
  r376341 | dlee | 2012-11-16 04:08:00 +0400 (Fri, 16 Nov 2012) | 34 lines
  
  Migrate hashtest/hashtest2 to be unit tests.
  
  Both hashtest and hashtest2 are manual testing apps that thrash hash
  tables (hashtab and ao2 containers, respectively), by spinning up
  several threads that randomly insert, delete, lookup and iterate over
  the hash table. If the app doesn't crash, the hash table probably passes
  the test. Those utils are not a part of the typical Asterisk build, so
  they do not usually get compiled. This all makes them less that useful.
  
  This patch removes those manual test programs and replaces them with
  Asterisk unit test modules (test_{hashtab,astobj2}_thrash.so). It also
  attempts to make the tests more deterministic.
  
  * Rather than spinning up some number of threads that operate on the
    hash table randomly, spin up four threads that concurrenly add,
    remove, lookup and iterate over the hash table.
  * Each thread checks the state of the hash table both during and after
    execution, and indicates a test failure if things are not as expected.
  * Each thread times out after 60 seconds to prevent deadlocking the unit
    test run.
  
  (closes issue ASTERISK-20505)
  Reported by: Matt Jordan
  Review: https://reviewboard.asterisk.org/r/2189/
  ........
  
  Merged revisions 376306 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 376315 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........
  
  Merged revisions 376339 from http://svn.asterisk.org/svn/asterisk/branches/11
........
  r376344 | dlee | 2012-11-16 04:14:00 +0400 (Fri, 16 Nov 2012) | 1 line
  
  Somehow I put in svn-1.6 merge information. Oops.
........
  r376345 | dlee | 2012-11-16 04:15:30 +0400 (Fri, 16 Nov 2012) | 15 lines
  
  Fixed extconf.c breakage introduced in r376306.
  
  To quote wdoekes:
  > Note that I'm not confirming legitimacy of having that file in tree at
  > all. Is anyone using aelparse/conf2ael?
  ........
  
  Merged revisions 376340 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 376342 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........
  
  Merged revisions 376343 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 376341,376344-376345 from http://svn.asterisk.org/svn/asterisk/trunk

Added:
    team/may/chan_ooh323_evo/tests/test_astobj2_thrash.c
      - copied unchanged from r376345, trunk/tests/test_astobj2_thrash.c
    team/may/chan_ooh323_evo/tests/test_hashtab_thrash.c
      - copied unchanged from r376345, trunk/tests/test_hashtab_thrash.c
Removed:
    team/may/chan_ooh323_evo/utils/hashtest.c
    team/may/chan_ooh323_evo/utils/hashtest2.c
Modified:
    team/may/chan_ooh323_evo/   (props changed)
    team/may/chan_ooh323_evo/include/asterisk/hashtab.h
    team/may/chan_ooh323_evo/utils/Makefile
    team/may/chan_ooh323_evo/utils/extconf.c
    team/may/chan_ooh323_evo/utils/utils.xml

Propchange: team/may/chan_ooh323_evo/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.

Propchange: team/may/chan_ooh323_evo/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Nov 16 10:59:21 2012
@@ -1,3 +1,1 @@
-/branches/11:372696
-/team/mmichelson/private/phones-trunk:358764-361321
-/trunk:356965-357014,364966,368435-368550,368991-369000,369346
+/trunk:376341-376345

Propchange: team/may/chan_ooh323_evo/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Fri Nov 16 10:59:21 2012
@@ -1,1 +1,1 @@
-/trunk:1-376316
+/trunk:1-376386

Modified: team/may/chan_ooh323_evo/include/asterisk/hashtab.h
URL: http://svnview.digium.com/svn/asterisk/team/may/chan_ooh323_evo/include/asterisk/hashtab.h?view=diff&rev=376387&r1=376386&r2=376387
==============================================================================
--- team/may/chan_ooh323_evo/include/asterisk/hashtab.h (original)
+++ team/may/chan_ooh323_evo/include/asterisk/hashtab.h Fri Nov 16 10:59:21 2012
@@ -23,6 +23,9 @@
  * \brief Generic (perhaps overly so) hashtable implementation
  * \ref AstHash
  */
+
+#include "asterisk/lock.h"
+
 /*! \page AstHash Hash Table support in Asterisk
 
 A hash table is a structure that allows for an exact-match search

Modified: team/may/chan_ooh323_evo/utils/Makefile
URL: http://svnview.digium.com/svn/asterisk/team/may/chan_ooh323_evo/utils/Makefile?view=diff&rev=376387&r1=376386&r2=376387
==============================================================================
--- team/may/chan_ooh323_evo/utils/Makefile (original)
+++ team/may/chan_ooh323_evo/utils/Makefile Fri Nov 16 10:59:21 2012
@@ -88,7 +88,7 @@
 	rm -f *.s *.i
 	rm -f md5.c strcompat.c ast_expr2.c ast_expr2.h ast_expr2f.c pbx_ael.c pval.c hashtab.c lock.c
 	rm -f aelparse.c aelbison.c conf2ael
-	rm -f utils.c strings.c threadstorage.c sha1.c astobj2.c hashtest2 hashtest refcounter
+	rm -f utils.c strings.c threadstorage.c sha1.c astobj2.c refcounter
 	rm -f db1-ast/.*.d
 	@$(MAKE) -C db1-ast clean
 
@@ -175,11 +175,6 @@
 	$(ECHO_PREFIX) echo "   [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@"
 	$(CMD_PREFIX) cp "$<" "$@"
 
-hashtest2.o: _ASTCFLAGS+=-O0
-hashtest2: hashtest2.o md5.o lock.o utils.o strings.o astobj2.o sha1.o strcompat.o threadstorage.o clicompat.o poll.o
-
-hashtest: hashtest.o md5.o hashtab.o lock.o utils.o strings.o sha1.o strcompat.o threadstorage.o clicompat.o poll.o
-hashtest.o: _ASTCFLAGS+=-O0
 
 refcounter: refcounter.o md5.o hashtab.o lock.o utils.o strings.o sha1.o strcompat.o threadstorage.o clicompat.o poll.o
 refcounter.o: _ASTCFLAGS+=-O0

Modified: team/may/chan_ooh323_evo/utils/extconf.c
URL: http://svnview.digium.com/svn/asterisk/team/may/chan_ooh323_evo/utils/extconf.c?view=diff&rev=376387&r1=376386&r2=376387
==============================================================================
--- team/may/chan_ooh323_evo/utils/extconf.c (original)
+++ team/may/chan_ooh323_evo/utils/extconf.c Fri Nov 16 10:59:21 2012
@@ -168,6 +168,7 @@
 #define LOG_DTMF    __LOG_DTMF, _A_
 
 /* lock.h */
+#define _ASTERISK_LOCK_H /* A small indication that this is horribly wrong. */
 
 #ifndef	HAVE_MTX_PROFILE
 #define	__MTX_PROF(a)	return pthread_mutex_lock((a))

Modified: team/may/chan_ooh323_evo/utils/utils.xml
URL: http://svnview.digium.com/svn/asterisk/team/may/chan_ooh323_evo/utils/utils.xml?view=diff&rev=376387&r1=376386&r2=376387
==============================================================================
--- team/may/chan_ooh323_evo/utils/utils.xml (original)
+++ team/may/chan_ooh323_evo/utils/utils.xml Fri Nov 16 10:59:21 2012
@@ -32,14 +32,6 @@
 	<defaultenabled>no</defaultenabled>
 	<support_level>extended</support_level>
   </member>
-  <member name="hashtest">
-	<defaultenabled>no</defaultenabled>
-	<support_level>extended</support_level>
-  </member>
-  <member name="hashtest2">
-	<defaultenabled>no</defaultenabled>
-	<support_level>extended</support_level>
-  </member>
   <member name="muted">
 	<defaultenabled>no</defaultenabled>
 	<support_level>extended</support_level>




More information about the asterisk-commits mailing list