Commit Graph

8 Commits

Author SHA1 Message Date
Alexander Traud cc025026b7 progdocs: Fix for Doxygen, the hidden parts.
ASTERISK-29779

Change-Id: If338163488498f65fa7248b60e80299c0a928e4b
2021-12-02 10:37:38 -06:00
Josh Soref e54a9d31f1 tests: Spelling fixes
Correct typos of the following word families:

mounting
jitterbuffer
thrashing
original
manipulating
entries
actual
possibility
tasks
options
positives
taskprocessor
other
dynamic
declarative

ASTERISK-29714

Change-Id: I6b94659d045eec5d8d020fce2e9b6e2f593dfeb6
2021-11-15 22:48:56 -06:00
Corey Farrell 021ce938ca
astobj2: Remove legacy ao2_container_alloc routine.
Replace usage of ao2_container_alloc with ao2_container_alloc_hash or
ao2_container_alloc_list.  Remove ao2_container_alloc macro.

Change-Id: I0907d78bc66efc775672df37c8faad00f2f6c088
2018-11-21 09:56:16 -05:00
Corey Farrell a6e5bae3ef Remove ASTERISK_REGISTER_FILE.
ASTERISK_REGISTER_FILE no longer has any purpose so this commit removes
all traces of it.

Previously exported symbols removed:
* __ast_register_file
* __ast_unregister_file
* ast_complete_source_filename

This also removes the mtx_prof static variable that was declared when
MTX_PROFILE was enabled.  This variable was only used in lock.c so it
is now initialized in that file only.

ASTERISK-26480 #close

Change-Id: I1074af07d71f9e159c48ef36631aa432c86f9966
2016-10-27 09:53:55 -04:00
George Joseph 802bbf8752 test_astobj2_thrash: Fix multithreaded issues
The test uses 4 threads to grow, count, lookup and shrink 15K objects
in a container.  If there's only 1 execution engine available, the test
will complete in <50ms.  If each threads gets its own execution engine,
the test may timeout after 60 seconds because the count thread does a
locked ao2_callback on the whole container in a tight loop with only
a sched_yield to give up time.  The lock contention makes the test
execution times wildly variable and mostly timeout.  2 execution
engines are OK, 3 results in about 33% failure rate and >=4 causes
a 80% failure rate.

To fix, the sched_yield was changed to a usleep(500).

Also, the number of buckets specified for the container was an even
number so that was changed to the next prime number greater than
(MAX_HASH_ENTRIES / 100).  That's 151 currently.

Change-Id: I50cd2344161ea61bfe4b96d2a29a6ccf88385c77
2016-10-25 11:32:04 -05:00
Matt Jordan 4a58261694 git migration: Refactor the ASTERISK_FILE_VERSION macro
Git does not support the ability to replace a token with a version
string during check-in. While it does have support for replacing a
token on clone, this is somewhat sub-optimal: the token is replaced
with the object hash, which is not particularly easy for human
consumption. What's more, in practice, the source file version was often
not terribly useful. Generally, when triaging bugs, the overall version
of Asterisk is far more useful than an individual SVN version of a file. As a
result, this patch removes Asterisk's support for showing source file
versions.

Specifically, it does the following:

* Rename ASTERISK_FILE_VERSION macro to ASTERISK_REGISTER_FILE, and
  remove passing the version in with the macro. Other facilities
  than 'core show file version' make use of the file names, such as
  setting a debug level only on a specific file. As such, the act of
  registering source files with the Asterisk core still has use. The
  macro rename now reflects the new macro purpose.

* main/asterisk:
  - Refactor the file_version structure to reflect that it no longer
    tracks a version field.
  - Remove the "core show file version" CLI command. Without the file
    version, it is no longer useful.
  - Remove the ast_file_version_find function. The file version is no
    longer tracked.
  - Rename ast_register_file_version/ast_unregister_file_version to
    ast_register_file/ast_unregister_file, respectively.

* main/manager: Remove value from the Version key of the ModuleCheck
  Action. The actual key itself has not been removed, as doing so would
  absolutely constitute a backwards incompatible change. However, since
  the file version is no longer tracked, there is no need to attempt to
  include it in the Version key.

* UPGRADE: Add notes for:
  - Modification to the ModuleCheck AMI Action
  - Removal of the "core show file version" CLI command

Change-Id: I6cf0ff280e1668bf4957dc21f32a5ff43444a40e
2015-04-13 03:48:57 -04:00
Kinsey Moore 9056c23bbd Fix more dev-mode build issues
........

Merged revisions 419129 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 419162 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 419163 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@419175 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-22 14:22:00 +00:00
David M. Lee 752ffc69d4 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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376341 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-16 00:08:00 +00:00