summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* testcrypto: Don't silently swallow errors when the driver loads but theGraham Leggett2016-07-071-8/+17
| | | | | | | underlying library refuses to initialise. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1751783 13f79535-47bb-0310-9956-ffa450edef68
* apr_file_io: Add apr_file_pipe_create_pools() allowing a pair ofGraham Leggett2016-03-131-2/+2
| | | | | | | pipes to be created, each in a different pool. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1734816 13f79535-47bb-0310-9956-ffa450edef68
* apr_table_overlap: Add APR_OVERLAP_TABLES_ADD to merge and set whenGraham Leggett2016-03-071-0/+24
| | | | | | | overlapping tables. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1734004 13f79535-47bb-0310-9956-ffa450edef68
* * include/apr_network_io.h (APR_SO_FREEBIND): Add option.Joe Orton2016-03-031-0/+34
| | | | | | | | | | | | * network_io/unix/sockopt.c (apr_socket_opt_set): Implement APR_SO_FREEBIND on Linux with IP_FREEBIND * test/testsock.c (test_freebind): Add test case. Submitted by: Ashley GC, jkaluza, jorton git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1733451 13f79535-47bb-0310-9956-ffa450edef68
* Add header file include needed for usingRainer Jung2016-02-071-0/+1
| | | | | | | the new apr_cstr_skip_prefix(). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1728957 13f79535-47bb-0310-9956-ffa450edef68
* Add ivan's r1612823 test cases for apr_cstr_skip_prefixWilliam A. Rowe Jr2016-01-271-0/+12
| | | | | | | | | Found no other svn_cstring_ test cases to import, so skipping the creation of a testcstr.c module for the time being. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1727175 13f79535-47bb-0310-9956-ffa450edef68
* apr_filepath_merge: Fix truename length calculation on WindowsBranko Čibej2015-06-171-0/+34
| | | | | | | | | | in cases where the "short" name variant is actually longer than the "long" or "true" name. Patch submitted bu Bert Huijben <rhuijben a.o>. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1685929 13f79535-47bb-0310-9956-ffa450edef68
* testatomic: silence Sun compiler warning.Yann Ylavic2015-04-231-3/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1675656 13f79535-47bb-0310-9956-ffa450edef68
* testskiplist: silence Sun compiler warning.Yann Ylavic2015-04-231-2/+4
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1675644 13f79535-47bb-0310-9956-ffa450edef68
* testskiplist: axe buggy compare function acomp() and associated test.Yann Ylavic2015-04-091-31/+57
| | | | | | | | | | Instead, define and use ecomp() which bases uniqueness on both elem's a and b, and test it with multiple duplicates inserted/found/removed in arbitray order. Improve comment on when/how these compare functions could be used in real apps. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1672495 13f79535-47bb-0310-9956-ffa450edef68
* skiplist: fix the minimum height (to one).Yann Ylavic2015-04-091-1/+1
| | | | | | | | | | | The height of a skiplist is always at least one, for the top node, even if our implementation may delay its creation on the first insert or delete it on the last remove (for optimization purpose). This also helps apr_skiplist_remove() to never return zero (not found) when it deletes the last node. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1672366 13f79535-47bb-0310-9956-ffa450edef68
* skiplist: follow up to r1664769.Yann Ylavic2015-04-091-44/+44
| | | | | | Fix insert_compare() returning NULL on the very first insertion (top is NULL). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1672354 13f79535-47bb-0310-9956-ffa450edef68
* Introduce apr_skiplist_last[_compare]() and apr_skiplist_remove_node().Yann Ylavic2015-04-071-0/+62
| | | | | | | | | | | | | | | | | | The apr_skiplist_last[_compare]() functions return the last matching element (duplicate) whereas the existing apr_skiplist_find[_compare]() return the first one encountered during the walk. The function apr_skiplist_remove_node() function allows to remove an element given its node, e.g. an iterator from apr_skiplist_{getlist,previous,next}(). The goal is to have a reliable way to find (and remove) any element having a unique address/pointer, by starting with the last duplicate and then iterating on the previous ones until the match (see example in testskiplist.c). apr_skiplist_last() is much more efficient than apr_skiplist_first() would be, git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1671957 13f79535-47bb-0310-9956-ffa450edef68
* Test the scenario where apr_pollset_poll() is called after aJeff Trawick2015-04-061-4/+32
| | | | | | | real event occurs AND apr_pollset_wakeup() has been called. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1671514 13f79535-47bb-0310-9956-ffa450edef68
* Fix build on non-Unix.Jeff Trawick2015-04-051-5/+15
| | | | | | | | This test was never implemented if !APR_HAS_FORK, but the capability check was error prone. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1671386 13f79535-47bb-0310-9956-ffa450edef68
* make internal function static to avoid a warningJeff Trawick2015-04-041-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1671292 13f79535-47bb-0310-9956-ffa450edef68
* Follow up to r1667900: revert spurious change on test/abts_tests.h.Yann Ylavic2015-03-191-2/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1667901 13f79535-47bb-0310-9956-ffa450edef68
* locks: introduce apr_{thread,proc,global}_mutex_timedlock().Yann Ylavic2015-03-196-50/+248
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For proc mutexes, the new mechanism APR_LOCK_DEFAULT_TIMED usable at creation time allows for the best mechanism to be elected (unixes: 1 to 3, or specific: 4 to 7): 1. PROC_PTHREAD if pthread_mutex_timedlock() and pthread_mutex_set_robust_np() are both available, 2. SYSV if semtimedop() is availale, 3. POSIXSEM if sem_timedwait() is available, 4. BeOS' acquire_sem_etc() if available, 5. NetWare falls back to apr_thread_mutex_timedlock() as for others functions, 6. OS2's DosRequestMutexSem(), 7. Windows' WaitForSingleObject(). Otherwise (like when fcntl and flock only are availble, if that's ever possible), APR_ENOTIMPL is returned. For thread mutexes, the new flag APR_THREAD_MUTEX_TIMED, usable at create() time still, allows to switch to an implementation using a condition variable and apr_thread_cond_timedwait() when if no native mechanism is available (eg. NetWare, pthreads but without pthread_mutex_timedlock() available). On windows, this initializes a WaitForSingleObject()able handle (Mutex) instead of the fastest (but not timeout-able) CRITICAL_SECTION used by default. All apr_{thread,proc,global}_mutex_timedlock() functions can take a relative or absolute time, thanks to the last (boolean) argument. Test suite updated accordingly. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1667900 13f79535-47bb-0310-9956-ffa450edef68
* skiplist: Introduce apr_skiplist_replace[_compare]().Yann Ylavic2015-03-171-3/+46
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1667420 13f79535-47bb-0310-9956-ffa450edef68
* apr_queue: Add apr_queue_timedpush() and apr_queue_timedpop() toYann Ylavic2015-03-161-0/+50
| | | | | | | | | | | support timedout operations. PR 56951. Signed-off-by: Anthony Minessale <anthm freeswitch.org> Signed-off-by: Travis Cross <tc traviscross.com> Reviewed/Modified: ylavic git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1667073 13f79535-47bb-0310-9956-ffa450edef68
* Add testescape to windows testGregg Lewis Smith2015-03-161-0/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1666877 13f79535-47bb-0310-9956-ffa450edef68
* testskiplist: Add a test to show that comparek == compare is required forYann Ylavic2015-03-131-9/+25
| | | | | | | | | | apr_skiplist_remove() and apr_skiplist_find() to work. It also shows that a single compare function can be used for add semantic with apr_skiplist_insert() (and unique pointers). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1666611 13f79535-47bb-0310-9956-ffa450edef68
* testskiplist: revert r1666602. Yann Ylavic2015-03-131-4/+4
| | | | | | | We want to test the real apr_skiplist_add() in trunk. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1666605 13f79535-47bb-0310-9956-ffa450edef68
* skiplist: sync tests with 1.5.x.Yann Ylavic2015-03-131-4/+4
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1666602 13f79535-47bb-0310-9956-ffa450edef68
* skiplist: restore back add-if-not-exist semantic to apr_skiplist_insert(),Yann Ylavic2015-03-131-22/+22
| | | | | | | | and hence add-next-to-any-existing semantic to apr_skiplist_add(), getting rid of apr_skiplist_addne(). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1666411 13f79535-47bb-0310-9956-ffa450edef68
* apr_hash: introduce apr_hash_get_or_set().Yann Ylavic2015-03-111-0/+29
| | | | | | | | Allows to get an entry, or if it does not exist set a new one in the same pass. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1665952 13f79535-47bb-0310-9956-ffa450edef68
* skiplist:Yann Ylavic2015-03-081-3/+3
| | | | | | | | | | When removing the last node, we have top = bottom = NULL, and must set topend = bottomend = NULL too. Also fix test from r1664471 according to r1664911. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1664958 13f79535-47bb-0310-9956-ffa450edef68
* fix testJim Jagielski2015-03-071-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1664904 13f79535-47bb-0310-9956-ffa450edef68
* remove debugJim Jagielski2015-03-071-5/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1664901 13f79535-47bb-0310-9956-ffa450edef68
* Adj test to ensure that dups are entered AFTER existing onesJim Jagielski2015-03-071-0/+55
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1664900 13f79535-47bb-0310-9956-ffa450edef68
* skiplist: improve duplicates ordering test.Yann Ylavic2015-03-051-2/+7
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1664471 13f79535-47bb-0310-9956-ffa450edef68
* skiplist: keep tests in sync with 1.5.x and 1.6.x.Yann Ylavic2015-03-051-1/+18
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1664467 13f79535-47bb-0310-9956-ffa450edef68
* FIX: Skiplists should allow for dups by default. Also, when added, dupsJim Jagielski2015-03-051-19/+19
| | | | | | | are added *after* each other, not before git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1664406 13f79535-47bb-0310-9956-ffa450edef68
* apr_crypto_nss: Explicitly declare key sizes when using NSS. Not all versionsGraham Leggett2014-09-211-42/+44
| | | | | | | of NSS detect key sizes correctly, leading to test failures. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1626561 13f79535-47bb-0310-9956-ffa450edef68
* Some more NetWare build fixes.Guenter Knauf2014-07-241-0/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1613114 13f79535-47bb-0310-9956-ffa450edef68
* Provide apr_skiplist_size/height/preheight() to get the corresponding valuesYann Ylavic2014-07-171-20/+36
| | | | | | | in O(1), and apr_skiplist_set_preheight() to configure preheight mode. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1611515 13f79535-47bb-0310-9956-ffa450edef68
* Improve skiplist tests.Yann Ylavic2014-07-161-4/+213
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1611110 13f79535-47bb-0310-9956-ffa450edef68
* Merge forward r1610988 from 1.6.x branch:Jeff Trawick2014-07-161-2/+2
| | | | | | | Fix gcc -Wparentheses warnings git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1611004 13f79535-47bb-0310-9956-ffa450edef68
* typo in r1604596 that wasn't in my hand-modified MakefileEric Covener2014-06-221-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1604597 13f79535-47bb-0310-9956-ffa450edef68
* Add a basic skiplist test. Based on test program posted to PR 56654 by ↵Eric Covener2014-06-224-2/+104
| | | | | | | | | | | Takashi Sato. Submitted By: Takashi Sato, covener Committed By: covener git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1604596 13f79535-47bb-0310-9956-ffa450edef68
* Add apr_shm_delete()Jim Jagielski2014-04-281-0/+41
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1590624 13f79535-47bb-0310-9956-ffa450edef68
* Split the ability to filter LDAP escape sequences into DN escaping or filterGraham Leggett2014-04-211-3/+27
| | | | | | | escaping, allowing the option to escape both at the same time. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1588937 13f79535-47bb-0310-9956-ffa450edef68
* Add apr_escape_ldap() and apr_pescape_ldap(), escaping charactersGraham Leggett2014-04-211-0/+12
| | | | | | | as described by RFC4514 and RFC4515 respectively. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1588878 13f79535-47bb-0310-9956-ffa450edef68
* Add testcase for apr_sockaddr_info_copy()Jeff Trawick2014-04-151-0/+51
| | | | | | | | Submitted by: Yann Ylavic <ylavic.dev gmail.com> Reviewed by: trawick git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1587543 13f79535-47bb-0310-9956-ffa450edef68
* Give every thread in the parallel recursive mkdir test its own poolBranko Čibej2014-01-211-15/+28
| | | | | | | | | | | | | to play with, to prevent weird data interdependencies. * test/testdir.c (struct thread_data): Encapsulates abts_case and per-thread pool. (thread_mkdir_func): Thread data is thread_data, not abts_case. (test_mkdir_recurs_parallel): Create a separate pool and thread data struct for each thread. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1559975 13f79535-47bb-0310-9956-ffa450edef68
* Fix timing bug in parallel apr_dir_make_recursive on Windows.Branko Čibej2014-01-211-0/+122
| | | | | | | | | | | | | | | | * file_io/win32/dir.c (dir_make_parent): When parent just got created, continue creating children. (apr_dir_make_recursive): Only handle EEXIST of the requested directory as success, not any ancestor. Patch by: rhuijben * test/testdir.c (test_mkdir_recurs_parallel): New multithreaded test case. (test_removeall): Clean up after test_mkdir_recurs_parallel. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1559873 13f79535-47bb-0310-9956-ffa450edef68
* stop using deprecated versions of APR_FOPEN_* and APR_FPROT_*Jeff Trawick2014-01-1813-75/+85
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1559343 13f79535-47bb-0310-9956-ffa450edef68
* skip entity encode/decode tests on EBCDIC OS.Eric Covener2013-12-211-0/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1552849 13f79535-47bb-0310-9956-ffa450edef68
* pick up htons where neededEric Covener2013-12-211-0/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1552846 13f79535-47bb-0310-9956-ffa450edef68
* Add testcase for broken handling of APR_O_NONBLOCK_INHERITEDJeff Trawick2013-12-172-1/+56
| | | | | | | (as seen on FreeBSD 10). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1551650 13f79535-47bb-0310-9956-ffa450edef68