| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1909590 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
them if they are not usable any longer.
* memcache/apr_memcache.c::ms_find_conn:
Check if the socket returned from the connection pool is still readable. If
not then invalidate the connection in the pool and request a new one
from the connection pool. Repeat this until a valid socket is returned
or this was done the maximum number of connections in the pool plus one.
This ensures that at least one new socket was created. If a new socket
does not work this indicates a broken backend and not just a restart in
the past. In this case return an error like previously.
* test/testmemcache.c:
Add new test for connection validation.
* test/memcachedmock.c:
For the new test we need a memcached mock server that we control and
can restart.
* test/testmemcache.h:
Shared defines between test/testmemcache.c and test/memcachedmock.c.
* test/Makefile.in:
* test/Makefile.win:
* test/NWGNUmakefile:
* test/NWGNUmemcachedmock:
Needed changes to build test/memcachedmock.c on different platforms.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1909585 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1909310 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
| |
was causing the content to be written at offset 0, rather than appended
(see r1909088).
* test/testfile.c
(test_append_buffered): New test.
(testfile): Run the new test.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1909089 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
APR_FOPEN_APPEND).
While this change fixed an issue where Windows and Unix reported different
offsets after opening files for append, it also caused a regression: for
files opened with APR_FOPEN_APPEND | APR_FOPEN_BUFFERED, flushing their
contents would cause the contents to be written at offset 0, rather than
appended.
This happens because flushes and regular writes use different code paths.
And while regular writes guarantee that an append will happen to the end of
the file, a buffer flush uses a regular WriteFile(), assuming the file pointer
has been properly set before.
To fix both issues, we'd probably need to rework this part and make all
writes use the same approach. But for now let's revert this change to fix
the regression, that was also reported in [1].
I'll add a regression test for this problem separately.
[1] https://lists.apache.org/thread/56gnyc3tc0orjh5mfsqo9gpq1br59b01
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1909088 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* configure.in:
Small epoll_wait() loop to check timeout reliability and set
HAVE_EPOLL_WAIT_RELIABLE_TIMEOUT.
* test/testpoll.c(justsleep):
Allow some jiffy is !HAVE_EPOLL_WAIT_RELIABLE_TIMEOUT.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1908616 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1908433 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1907987 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1907986 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1907985 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
Just in case the test is later reordered (e.g. test_atomics_threaded64
and test_atomics_threaded_setread64 use the same atomic_ops64 variable).
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1907677 13f79535-47bb-0310-9956-ffa450edef68
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
* 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
|
| |
| |
| |
| |
| |
| | |
API to get/set thread name.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/thread-name@1902297 13f79535-47bb-0310-9956-ffa450edef68
|
| |
| |
| |
| | |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1905414 13f79535-47bb-0310-9956-ffa450edef68
|
| |
| |
| |
| | |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1905407 13f79535-47bb-0310-9956-ffa450edef68
|
|/
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902583 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902286 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
| |
(try 2).
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902285 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902284 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
| |
popup message box on Windows.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902283 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902282 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
| |
* 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.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.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
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902184 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
* 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.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(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
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902155 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902108 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902107 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
(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
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902073 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902071 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902070 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
to run.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902015 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1901212 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
warnings with sprintf.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1897646 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1896805 13f79535-47bb-0310-9956-ffa450edef68
|