summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Merge thread-name branch (PR 60587) [1]:ivan2023-01-211-0/+31
| | | | | | | | | * Introduce apr_thread_name_set() and apr_thread_name_get(). [1] https://bz.apache.org/bugzilla/show_bug.cgi?id=60587 [2] https://lists.apache.org/thread/z24logzc6v8tc0p2q3375cc10qo9y5yw git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1906889 13f79535-47bb-0310-9956-ffa450edef68
* Remove trailing whitespaces in *.c.ivan2022-11-2060-455/+455
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1905414 13f79535-47bb-0310-9956-ffa450edef68
* Remove trailing whitespaces in all *.h.ivan2022-11-192-4/+4
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1905407 13f79535-47bb-0310-9956-ffa450edef68
* Replace tabs to spaces.ivan2022-07-081-15/+15
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902583 13f79535-47bb-0310-9956-ffa450edef68
* testencode: Follow up to r1902281: Inline, no calling convention assumptions.ylavic2022-06-271-54/+64
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902286 13f79535-47bb-0310-9956-ffa450edef68
* testencode: Follow up to r1902281: Correct call convention for encdec_fn ↵ylavic2022-06-271-1/+5
| | | | | | (try 2). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902285 13f79535-47bb-0310-9956-ffa450edef68
* testencode: Follow up to r1902281: Correct call convention for encdec_fn.ylavic2022-06-271-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902284 13f79535-47bb-0310-9956-ffa450edef68
* tests: Configure VC runtime to write errors to stderr instead of displayingivan2022-06-271-0/+17
| | | | | | popup message box on Windows. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902283 13f79535-47bb-0310-9956-ffa450edef68
* testencode: Follow up to r1902281: error tests for apr_decode_base16_binary.ylavic2022-06-271-2/+28
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902282 13f79535-47bb-0310-9956-ffa450edef68
* encoding: Better check inputs of apr_{encode,decode}_* functions.ylavic2022-06-271-0/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check that the given sources can be encoded without overflowing. Return APR_EINVAL if the given "slen" is negative, APR_NOTFOUND if "dest" is not NULL and "src" is NULL, or APR_ENOSPC if "dest" is NULL and the source length (based on "slen" or APR_ENCODE_STRING) is too big to encode. * include/private/apr_encode_private.h(): Rename ENCODE_TO_ASCII() and ENCODE_TO_NATIVE() to respectively TO_ASCII() and TO_ENCODE(), and make them return an unsigned char. * encoding/apr_escape.c(): Use the new TO_ASCII() and TO_NATIVE(). * encoding/apr_encode.c(apr_encode_*, apr_decode_*): Forbid negative "slen" but APR_ENCODE_STRING, and use apr_size_t arithmetics to check for overflows when encoding. When "dest" is NULL, "src" can be NULL too. Better check for trailing '='s or base16's APR_ENCODE_COLON ':' separators. Rename ENCODE_TO_ASCII and ENCODE_TO_NATIVE to their new names, and remove casts to (unsigned char) now unnecessary. * include/apr_encode.h(): Update dox about acceptable inputs and returned errors. * test/testencode.c(): Tests for error conditions. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902281 13f79535-47bb-0310-9956-ffa450edef68
* test/testshm: Fix synchronization of msgput/msgwait IPC functions.ylavic2022-06-264-62/+65
| | | | | | | | | | | | | | | | * test/testshm.h(): Move (APR_INLINE) common msgput/msgwait() functions there. * test/testshm.h(msgput, msgwait): Use atomics (cas) to prevent producer and consumer from writing to the same box. * testshm.c, testshmconsumer.c, testshmproducer.c: Use common helpers. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902267 13f79535-47bb-0310-9956-ffa450edef68
* poll: Follow up to r1902236: Fix poll() sleeps cases.ylavic2022-06-261-3/+3
| | | | | | | | | | Don't convert timeout to milliseconds before potentially callig apr_sleep(). Tests for "poll() didn't sleep" now use the real timeout as lower limit. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902258 13f79535-47bb-0310-9956-ffa450edef68
* tests: Fix numeric types warnings.ylavic2022-06-235-9/+12
| | | | | | | | By using the right numeric comparison assertions and some explicit casts. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902205 13f79535-47bb-0310-9956-ffa450edef68
* testatomic: Follow up to r1902199: More numeric types assertions.ylavic2022-06-231-2/+2
| | | | | | | | | | | | * test/testatomic.c(busyloop_dec32): Use ABTS_UINT_EQUAL(). * test/testatomic.c(busyloop_dec64): Use ABTS_ULLONG_EQUAL(). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902204 13f79535-47bb-0310-9956-ffa450edef68
* testatomic: Use new numeric types assertions from r1902191 to avoid warnings.ylavic2022-06-231-46/+46
| | | | | | | | | | * test/testatomic.c(): Use ABTS_UINT_EQUAL() to compare apr_uint32_t atomics, and ABTS_ULLONG_EQUAL() for apr_uint64_t ones. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902199 13f79535-47bb-0310-9956-ffa450edef68
* test/abts: Follow up to r1902191: Fix IMPL_abts_T_nequal.ylavic2022-06-231-1/+1
| | | | | | | | | * test/abts.c(IMPL_abts_T_nequal): Invert logic from IMPL_abts_T_equal (bad copypasta) git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902192 13f79535-47bb-0310-9956-ffa450edef68
* test/abts: More numeric types to compare/assert.ylavic2022-06-232-45/+78
| | | | | | | | | | | | | * test/abts.h(): Declare abts_{uint,long,ulong,llong,ullong}_{n,}equal() and the corresponding ABTS_{UINT,LONG,ULONG,LLONG,ULLONG}_{N,}EQUAL() wrappers. * test/abts.c(): Implement abts_{uint,long,ulong,llong,ullong}_{n,}equal() using a common macro. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902191 13f79535-47bb-0310-9956-ffa450edef68
* debug for CIcovener2022-06-231-4/+4
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902184 13f79535-47bb-0310-9956-ffa450edef68
* test/testmutexscope: Fix -Wvoid-pointer-to-enum-castylavic2022-06-231-2/+2
| | | | | | | | | * test/testmutexscope.c(test_mech_mode, eachThread): Cast to apr_uintptr_t first before converting pointer to/from enum. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902182 13f79535-47bb-0310-9956-ffa450edef68
* test/testlock: Fix -Werror=return-typeylavic2022-06-231-0/+2
| | | | | | | | | | * test/testlock.c(thread_mutex_function, thread_mutex_sleep_function): Thread (APR_THREAD_FUNC) functions should return a pointer (NULL). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902181 13f79535-47bb-0310-9956-ffa450edef68
* test/testfile.c: apr_file_datasync() fails with ENOTSUP for streams on macos.ylavic2022-06-231-0/+4
| | | | | | | | | * test/testfile.c(test_datasync_on_stream): Handle ENOTSUP on macos. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902180 13f79535-47bb-0310-9956-ffa450edef68
* testfile: try to determine how apr_file_datasync() fails for streams on macos.ylavic2022-06-221-1/+3
| | | | | | | | | * test/testfile.c(test_datasync_on_stream): Let ABTS_INT_EQUAL show the actual errno. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902175 13f79535-47bb-0310-9956-ffa450edef68
* Fix compiler warning.ivan2022-06-211-2/+2
| | | | | | | * test/sockperf.c: Use apr_size_t instead of int. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902157 13f79535-47bb-0310-9956-ffa450edef68
* Fix compiler warning.ivan2022-06-211-1/+1
| | | | | | | | * test/testmd4.c (test_md4sum): Use size_t instead of int. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902156 13f79535-47bb-0310-9956-ffa450edef68
* * test/testskiplist.c: Use ABTS_SIZE_EQUAL() where it makes sense.ivan2022-06-211-24/+24
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902155 13f79535-47bb-0310-9956-ffa450edef68
* Fix compiler warning.ivan2022-06-211-1/+1
| | | | | | | | * test/testskiplist.c (skiplist_get_size): Return size_t instead of int. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902154 13f79535-47bb-0310-9956-ffa450edef68
* Revert r1902107.ivan2022-06-201-3/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902108 13f79535-47bb-0310-9956-ffa450edef68
* * test/testmmap.c: Create test files in data directory instead of drive root.ivan2022-06-201-3/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902107 13f79535-47bb-0310-9956-ffa450edef68
* * test/internal/testutf.c:ivan2022-06-191-1/+1
| | | | | | | (displaynw): Use apr_size_t instead of int. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902074 13f79535-47bb-0310-9956-ffa450edef68
* Use ABTS_SIZE_EQUAL in test suite.ivan2022-06-192-37/+37
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902073 13f79535-47bb-0310-9956-ffa450edef68
* Follow-up to r1902070: Use TESTBINPATH in code.ivan2022-06-191-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902071 13f79535-47bb-0310-9956-ffa450edef68
* * test/test/testproc.c: Use BINPATH in path for child process.ivan2022-06-191-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902070 13f79535-47bb-0310-9956-ffa450edef68
* tests: Follow up to r1902015: Fix warnings.ylavic2022-06-172-4/+2
| | | | | | | | | testmemcache.c:193:12: error: function declaration isn’t a prototype [-Werror=strict-prototypes] testmemcache.c:667:18: error: unused variable ‘rv’ [-Werror=unused-variable] git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902024 13f79535-47bb-0310-9956-ffa450edef68
* tests: Check for memcache/redis servers only if memcache/redis tests configuredivan2022-06-172-163/+258
| | | | | | to run. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902015 13f79535-47bb-0310-9956-ffa450edef68
* Normalize ucs-4 to utf-32 (documentation change)wrowe2022-05-242-13/+13
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1901212 13f79535-47bb-0310-9956-ffa450edef68
* Fix various harmless cases of undefined behaviour, and add a Travisjorton2022-02-141-1/+2
| | | | | | | | | | | | | | | | | | | job testing under UBSan. * poll/unix/poll.c (apr_poll): For the on-stack array allocation use num+1 since allocating a 0-length array is undefined behaviour. * tables/apr_skiplist.c (get_b_rand): Use unsigned integers to avoid signed integer overflow in the left shift. (skiplist_qpush): Avoid calling memcpy(,NULL,0). * random/unix/apr_random.c (apr_random_add_entropy): Avoid calling memcpy(,NULL,0). * test/teststr.c (overflow_strfsize): Avoid signed integer overflow. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1898076 13f79535-47bb-0310-9956-ffa450edef68
* * test/testbuckets.c (flatten_match): Avoid GCC 12 -Wformat-overflowjorton2022-02-011-4/+4
| | | | | | | warnings with sprintf. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1897646 13f79535-47bb-0310-9956-ffa450edef68
* testcrypto: Fix warnings about unused functions (depending on the libs avail).ylavic2022-01-071-11/+55
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1896805 13f79535-47bb-0310-9956-ffa450edef68
* testatomic: Fix gcc-11 warnings.ylavic2022-01-071-9/+9
| | | | | | | | | | Not sure why it wants the "a" local variable to point to something since we only use its pointer, but that's how it is.. While at it let's initialize "b" too. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1896803 13f79535-47bb-0310-9956-ffa450edef68
* Fix testcrypto ensuring it runs only compiled driversmturk2021-12-031-51/+34
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1895522 13f79535-47bb-0310-9956-ffa450edef68
* Fix xml test suite. External parsers do not return APR error codesmturk2021-12-021-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1895513 13f79535-47bb-0310-9956-ffa450edef68
* Add missing header for getpid()mturk2021-12-022-1/+7
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1895498 13f79535-47bb-0310-9956-ffa450edef68
* Fix compile error for C compilers that do not allow variable declarations ↵mturk2021-11-171-2/+4
| | | | | | after npn-declaration instructions git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1895116 13f79535-47bb-0310-9956-ffa450edef68
* apr_brigades: Add apr_brigade_split_boundary(), allowing us to splitminfrin2021-10-191-0/+57
| | | | | | | brigades on boundaries of arbitrary length. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1894380 13f79535-47bb-0310-9956-ffa450edef68
* testcrypto: really change one bit of the seed (only) in test_crypto_prng().ylavic2021-09-121-4/+4
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1893275 13f79535-47bb-0310-9956-ffa450edef68
* testcrypto: run non-threaded cprng tests without APR_CRYPTO_PRNG_PER_THREAD.ylavic2021-09-121-24/+10
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1893274 13f79535-47bb-0310-9956-ffa450edef68
* apr_crypto: s/APR_CRYPTO_CIPHER_CHACHA20_CTR/APR_CRYPTO_CIPHER_CHACHA20/gylavic2021-09-101-1/+1
| | | | | | | Chacha is a stream cipher, not a block cipher in counter mode. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1893203 13f79535-47bb-0310-9956-ffa450edef68
* test: fix memory leaks of the test framework at exit.ylavic2021-09-103-5/+21
| | | | | | | To please memory leak analysers.. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1893202 13f79535-47bb-0310-9956-ffa450edef68
* * test/proc_child.c (main): Avoid gcc -Wunused-result warning withjorton2021-07-061-3/+3
| | | | | | | write() return value. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1891310 13f79535-47bb-0310-9956-ffa450edef68
* * test/testsockets.c (sendto_receivefrom_helper): Add descriptivejorton2021-07-061-1/+3
| | | | | | | error message on failure case. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1891308 13f79535-47bb-0310-9956-ffa450edef68