summaryrefslogtreecommitdiff
path: root/tests/test_sched.c
AgeCommit message (Collapse)Author
2016-03-15sched.c: Ensure oldest expiring entry runs first.Richard Mudgett
This patch is part of a series to resolve deadlocks in chan_sip.c. * Updated sched unit test to check new behavior. ASTERISK-25023 Change-Id: Ib69437327b3cda5e14c4238d9ff91b2531b34ef3
2015-04-11clang compiler warnings: Fix various warnings for testsMatthew Jordan
This patch fixes a variety of clang compiler warnings for unit tests. This includes autological comparison issues, ignored return values, and interestingly enough, one embedded function. Fun! Review: https://reviewboard.asterisk.org/r/4555 ASTERISK-24917 Reported by: dkdegroot patches: rb4555.patch submitted by dkdegroot (License 6600) ........ Merged revisions 434705 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@434706 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-16Merged revisions 332177 via svnmerge from Paul Belanger
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r332177 | pabelanger | 2011-08-16 16:11:49 -0400 (Tue, 16 Aug 2011) | 11 lines Merged revisions 332176 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r332176 | pabelanger | 2011-08-16 16:10:13 -0400 (Tue, 16 Aug 2011) | 4 lines Flag test modules as 'core' Review: https://reviewboard.asterisk.org/r/1369/ ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@332178 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-14Merged revisions 328247 via svnmerge from Leif Madsen
https://origsvn.digium.com/svn/asterisk/branches/1.10 ................ r328247 | lmadsen | 2011-07-14 16:25:31 -0400 (Thu, 14 Jul 2011) | 14 lines Merged revisions 328209 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r328209 | lmadsen | 2011-07-14 16:13:06 -0400 (Thu, 14 Jul 2011) | 6 lines Introduce <support_level> tags in MODULEINFO. This change introduces MODULEINFO into many modules in Asterisk in order to show the community support level for those modules. This is used by changes committed to menuselect by Russell Bryant recently (r917 in menuselect). More information about the support level types and what they mean is available on the wiki at https://wiki.asterisk.org/wiki/display/AST/Asterisk+Module+Support+States ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@328259 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-20Some scheduler API cleanup and improvements.Russell Bryant
Previously, I had added the ast_sched_thread stuff that was a generic scheduler thread implementation. However, if you used it, it required using different functions for modifying scheduler contents. This patch reworks how this is done and just allows you to optionally start a thread on the original scheduler context structure that has always been there. This makes it trivial to switch to the generic scheduler thread implementation without having to touch any of the other code that adds or removes scheduler entries. In passing, I made some naming tweaks to add ast_ prefixes where they were not there before. Review: https://reviewboard.asterisk.org/r/1007/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@299091 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-09Kill some startup warnings and errors and make some messages more helpful in ↵Tilghman Lesher
tracking down the source. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@275105 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-09Various updates to the unit test API.Russell Bryant
1) It occurred to me that the difference in usage between the error ast_str and the ast_test_update_status() usage has turned out to be a bit ambiguous in practice. In a lot of cases, the same message was being sent to both. In other cases, it was only sent to one or the other. My opinion now is that in every case, I think it makes sense to do both; we should output it to the CLI as well as save it off for logging purposes. This change results in most of the changes in this diff, since it required changes to all existing unit tests. It also allowed for some simplifications of unit test API implementation code. 2) Update ast_test_status_update() to include the file, function, and line number for the code providing the update. 3) There are some formatting tweaks here and there. Hopefully they aren't too distracting for code review purposes. Reviewboard's diff viewer seems to do a pretty good job of pointing out when something is a whitespace change. 4) I moved the md5_test and sha1_test into the test_utils module. It seemed like a better approach since these tests are so tiny. 5) I changed the number of nodes used in heap_test_2 from 1 million to 100 thousand. The only reason for this was to reduce the time it took for this test to run. 6) Remove an unused function prototype that was at the bottom of utils.h. 7) Simplify test_insert() using the LIST_INSERT_SORTALPHA() macro. The one minor difference in behavior is that it no longer checks for a test registered with the same name. 8) Expand the code in test_alloc() to provide specific error messages for each failure case, to clearly inform developers if they forget to set the name, summary, description, etc. 9) Tweak the output of the "test show registered" CLI command. I swapped the name and category to have the category first. It seemed more natural since that is the sort key. 10) Don't output the status ast_str in the "test show results" CLI command. This is going to tend to be pretty verbose, so just leave that for the detailed test logs (test generate results). Review: https://reviewboard.asterisk.org/r/493/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@245864 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-25Make unit test modules depend on TEST_FRAMEWORK instead of off by default.Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@242965 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-22The irony of not compile-testing a test program before committing is killing me.Tilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@242317 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-22Convert scheduler API entry order test to the test API.Russell Bryant
Review: https://reviewboard.asterisk.org/r/470/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@242185 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-04Minor changes in test modulesKevin P. Fleming
Correct command description in test_sched.c and include asterisk/cli.h in test_skel.c, since it's highly unlikely that a test module will *not* want to provide CLI commands to execute the tests git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191997 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-10Disable test modules by default.Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@187675 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-23Fix a regression in scheduler entry ordering, and add a regression test for it.Russell Bryant
(closes issue #14522) Reported by: pj Tested by: russell git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@178022 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-17Use constants from inttypes.h to clear up 32-bit compilation errorsMark Michelson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@176706 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-17Significantly improve scheduler performance under high load.Russell Bryant
This patch changes the scheduler to use a max-heap to store pending scheduler entries instead of a fully sorted doubly linked list. When the number of entries in the scheduler gets large, this will perform much better. For much more detailed information on this change, see the review request. Review: http://reviewboard.digium.com/r/160/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@176639 65c4cc65-6c06-0410-ace0-fbb531ad65f3