summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
...
* testatomic: Fix gcc-11 warnings.Yann 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 driversMladen Turk2021-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 codesMladen Turk2021-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()Mladen Turk2021-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 ↵Mladen Turk2021-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 splitGraham Leggett2021-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().Yann 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.Yann 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/gYann Ylavic2021-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.Yann 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 withJoe Orton2021-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 descriptiveJoe Orton2021-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
* * test/testlock.c (thread_mutex_function): Test that locking andJoe Orton2021-07-021-17/+36
| | | | | | | | unlocking succeed. Catch thread join errors and thread exit status throughout. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1891203 13f79535-47bb-0310-9956-ffa450edef68
* * test/testdate.c: Add regression test for r1807975.Joe Orton2021-07-021-0/+27
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1891197 13f79535-47bb-0310-9956-ffa450edef68
* testfile: don't generate .txt files since it distorts testfnmatch results.Yann Ylavic2021-03-311-8/+8
| | | | | | | Change to .dat files instead (also in svn:ignore). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1888251 13f79535-47bb-0310-9956-ffa450edef68
* testfnmatch: fix number of expected test/data/*.txt files.Yann Ylavic2021-03-111-1/+1
| | | | | | | Maybe there used to be 10 test/data/*.txt files, there are 3 only now. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1887490 13f79535-47bb-0310-9956-ffa450edef68
* Align apr_mmap()ing offset to a page boundary. PR 65158.Yann Ylavic2021-03-022-30/+68
| | | | | | | | | | | | | | | This is requirement for unix systems, and otherwise can cause failures or undefined behaviour with some filesystems. Add apr_mmap_t->poffset on unixes to track the offset to the previous page, relative to the user requested/actual offset. This allows ->mm and ->size to still point to the actual data, while munmap() still deletes the full range from the start of the page. Tests updated accordingly. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1887060 13f79535-47bb-0310-9956-ffa450edef68
* * test/testthread.c: Use a user-range apr_status_t value for theJoe Orton2020-12-171-3/+6
| | | | | | | | test thread exit code. (thread_func1): Exit if mutex lock/unlock fails. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1884544 13f79535-47bb-0310-9956-ffa450edef68
* apr_decode_base{64,32,16}: stop reading before (not including) NUL byte.Yann Ylavic2020-11-271-7/+17
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1883870 13f79535-47bb-0310-9956-ffa450edef68
* fdatasync() might return EINVAL for special files (i.e. terminal).Yann Ylavic2020-11-201-1/+1
| | | | | | | This is the case on latest Linux for instance, like 5.9. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1883666 13f79535-47bb-0310-9956-ffa450edef68
* Follow up to r1868477: add the echoargs testing tool to Makefile builds.Yann Ylavic2020-11-201-1/+6
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1883664 13f79535-47bb-0310-9956-ffa450edef68
* Follow up to r1790200: fall back to fsync() if F_FULLFSYNC is not supportedBranko Čibej2020-11-121-0/+37
| | | | | | | | | by the file descriptor, filesystem or underlying device. See, e.g.: https://github.com/vim/vim/pull/4025 git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1883340 13f79535-47bb-0310-9956-ffa450edef68
* * test/testlock.c (test_timeoutmutex): Fix test to avoid undefinedJoe Orton2020-06-011-4/+50
| | | | | | | | behaviour by relocking a non-recursive mutex; spawn a thread to hold the lock. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1878357 13f79535-47bb-0310-9956-ffa450edef68
* * strings/apr_strings.c (apr_pstrcat): Only read from the initializedJoe Orton2020-06-011-0/+14
| | | | | | | | | | | part of saved_lengths array when nargs < MAX_SAVED_LENGTHS (fixing Coverity warning). * test/teststr.c: Add trivial testcases for apr_pstrcat (though this does not reproduce any problems from the bug). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1878354 13f79535-47bb-0310-9956-ffa450edef68
* testreslist: reduce overall test time.Yann Ylavic2020-05-061-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | The time doubled in r1877447 by re-testing the whole thing with in FIFO mode, here divide all sleep delays by ten to reach a reasonable overall time. - Before: $ time test/testall testreslist testreslist : SUCCESS All tests passed. real 1m6.789s user 0m0.205s sys 0m0.599s - After: $ time test/testall testreslist testreslist : SUCCESS All tests passed. real 0m7.005s user 0m0.232s sys 0m0.478s git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1877449 13f79535-47bb-0310-9956-ffa450edef68
* testreslist: add test for APR_RESLIST_ACQUIRE_FIFO.Yann Ylavic2020-05-061-11/+17
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1877447 13f79535-47bb-0310-9956-ffa450edef68
* testatomic: Silence -Wmissing-prototypes warning.Branko Čibej2020-05-061-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1877444 13f79535-47bb-0310-9956-ffa450edef68
* testdir: Following up to r1877439, make sure that the test data getsBranko Čibej2020-05-061-19/+26
| | | | | | | populated correctly when threads are disabled. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1877443 13f79535-47bb-0310-9956-ffa450edef68
* testfile: silence -Wstring-plus-int warnings.Branko Čibej2020-05-061-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1877442 13f79535-47bb-0310-9956-ffa450edef68
* Added support for recording skipped test cases.Branko Čibej2020-05-064-11/+71
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1877441 13f79535-47bb-0310-9956-ffa450edef68
* Make test work with thread support disabled.Branko Čibej2020-05-062-0/+14
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1877439 13f79535-47bb-0310-9956-ffa450edef68
* ucs2 is a legacy name, the correct encoding namesWilliam A. Rowe Jr2019-10-291-8/+8
| | | | | | | | | | | | | | | | are now utf-8, utf-16, and utf-32, so we rename; apr_conv_utf8_to_ucs2 -> apr_conv_utf8_to_utf16 apr_conv_ucs2_to_utf8 -> apr_conv_utf16_to_utf8 This patch notices an error message printing of an internal password, which will no longer be echoed to the error stream. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1869127 13f79535-47bb-0310-9956-ffa450edef68
* apr_proc_create(): Properly escape arguments containing whitespace charactersIvan Zhakov2019-10-152-0/+113
| | | | | | | | | | | | | | | | | | | | on Windows. * CMakeLists.txt (single_source_programs): Add test/echoargs.c. * test/echoargs.c: New test app for test_proc_args test. * test/testproc.c (test_proc_args): New test. (testproc): Add test_proc_args to test list. * threadproc/win32/proc.c (quote_arg): New. Helper for apr_proc_create(). (apr_proc_create): Use quote_arg() helper to escape arguments in command line. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1868477 13f79535-47bb-0310-9956-ffa450edef68
* apr_atomic_read64(): Fix non-atomic read on 32-bit Windows.Ivan Zhakov2019-10-081-0/+38
| | | | | | | | | | | | | | * atomic/win32/apr_atomic64.c (apr_atomic_read64): Use InterlockedCompareExchange64() instead of direct memory read. * test/testatomic.c (test_atomics_threaded_setread64): New test. (test_func_set64): Helepr for test_atomics_threaded_setread64 test. * CHANGES: Add changelog entry. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1868129 13f79535-47bb-0310-9956-ffa450edef68
* Follow-up to r1866300: Add missing return value in test function.Ivan Zhakov2019-09-091-0/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1866712 13f79535-47bb-0310-9956-ffa450edef68
* Add test for WAIT_ABANDONED handling for win32 mutexes. Code works asIvan Zhakov2019-09-031-0/+42
| | | | | | expected. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1866300 13f79535-47bb-0310-9956-ffa450edef68
* Revert r1862435, r1862071 per veto from ivanJoe Orton2019-08-281-66/+1
| | | | | | | msgid: <CABw-3YcK0qbeYWDOwE684XtBj3rCT2CuVOBWWqda4gMtRyRJEw@mail.gmail.com> git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1866019 13f79535-47bb-0310-9956-ffa450edef68
* Add --tag=CC to libtool invocations. PR 62640.Graham Leggett2019-08-171-4/+4
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1865343 13f79535-47bb-0310-9956-ffa450edef68
* * include/apr_file_info.h: Clarify pool handling for apr_dir_read andJoe Orton2019-07-021-0/+32
| | | | | | | | | | | | | | apr_dir_pread. * file_io/win32/dir.c, file_io/os2/dir.c (apr_dir_read): Duplicate the returned filename so the call has no side-effects on apr_finfo_t structures passed to previous invocations of the function. * test/testdir.c (test_read_side_effects): Add test case for side-effects of apr_dir_read. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1862435 13f79535-47bb-0310-9956-ffa450edef68
* * test/testpools.c (test_tags): Fix spurious failure with APR_POOL_DEBUG.Joe Orton2019-07-021-0/+5
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1862434 13f79535-47bb-0310-9956-ffa450edef68
* Add apr_dir_pread(), a variant of apr_dir_read() which allows callersJoe Orton2019-06-251-1/+34
| | | | | | | | | | | | | | | | | to read a directory with constant memory consumption: * include/apr_file_info.h: Add warning on memory consumption for apr_dir_read; declare apr_dir_pread. * file_io/unix/dir.c (apr_dir_pread): Rename from apr_dir_read and take pool argument. (apr_dir_read): Reimplement using it. * file_io/win32/dir.c, file_io/os2/dir.c: Likewise, but untested. * test/testdir.c (test_pread) [APR_POOL_DEBUG]: Add test case. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1862071 13f79535-47bb-0310-9956-ffa450edef68
* apr_crypto_prng: Move openssl specific code into apr_crypto_openssl.Graham Leggett2019-06-101-11/+61
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1860984 13f79535-47bb-0310-9956-ffa450edef68
* Windows platform: Fix access to uninitialized memory in apr_dir_read() whenIvan Zhakov2019-06-071-0/+52
| | | | | | wanted is more than APR_FINFO_MIN. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1860747 13f79535-47bb-0310-9956-ffa450edef68
* Windows platform: Make pipe test report 'not implemented' instead of failing.Ivan Zhakov2019-05-281-1/+6
| | | | | | | | * test/testpipe.c (wait_pipe): Use apr_file_pipe_create_ex() to create non-blocking pipe. Check for APR_ENOTIMPL status code from apr_file_pipe_wait(). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1860301 13f79535-47bb-0310-9956-ffa450edef68
* Add simple tests for nested and unnested thread mutexes.Ivan Zhakov2019-05-281-0/+50
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1860190 13f79535-47bb-0310-9956-ffa450edef68
* Fix testlock failures on platforms where default mutex is nested.Ivan Zhakov2019-05-271-1/+4
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1860163 13f79535-47bb-0310-9956-ffa450edef68
* Fix bug in apr_json_double_create().Ivan Zhakov2019-05-271-0/+47
| | | | | | | | | | | | * json/apr_json.c (apr_json_double_create): Assign double number to DNUMBER instead of LNUMBER. * test/testjson.c (test_json_create): New test. (testjson): Call test_json_create test. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1860152 13f79535-47bb-0310-9956-ffa450edef68
* * test/testbuckest.c (flatten_match): Fix error message (thanks to gcc warning).Joe Orton2019-05-161-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1859391 13f79535-47bb-0310-9956-ffa450edef68
* Add simple tests for apr_xml_parser_geterror().Ivan Zhakov2019-05-121-0/+51
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1859154 13f79535-47bb-0310-9956-ffa450edef68
* Add more XML tests.Ivan Zhakov2019-05-121-0/+34
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1859153 13f79535-47bb-0310-9956-ffa450edef68