| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
clang-15+ has started diagnosing them as errors
thread.c:925:18: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
| void STATS_UNLOCK() {
| ^
| void
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
|
|
|
|
|
|
| |
GCC 12 on ppc64el complains about "key" being undefined on testapp.c.
This commit silences the error.
Signed-off-by: Sergio Durigan Junior <sergiodj@sergiodj.net>
|
| |
|
|
|
|
|
| |
This allows `make test_tls` to reliably pass when running without
parallelism.
|
|
|
|
|
|
|
|
|
| |
cache constructors/destructors were never used, which just ended up
being wasted branches. Since there's no constructor/destructor for cache
objects, we can use the memory itself for the freelist.
This removes a doubling realloc for the freelist of cache objects and
simplifies the code a bunch.
|
|
|
|
|
| |
Note: Do not fix typos in crc32.c because it's copied from an upstream
source
|
|
|
|
|
|
| |
Use the .arch_extension directive so that a config options and
special cflags aren't required. Add a few tests for both the
software and hardware implementations
|
| |
|
|
|
|
|
|
| |
When returning item to the cache and the items allocated exceeded cache->limit, we should free the item and not put it to the cache.
The current code will free any item that tried returned to the cache when cache->total < cache->limit which is true in most cases if the total objects has never exceeded the limit.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
If you have multiple keys, the order in which they are dumped is
non-deterministic because it involves iterating over a hash table.
Fix the assertions by searching for expected lines in output instead
of checking that the strings are exactly the same.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
* Remove bespoke testing system in favor of testapp.c
* Change stats_prefix_init function to take prefix delimiter.
Otherwise, we would have to include memcached.h in testapp.c to get
the settings struct, which in turn would cause a conflicting
definition of the conn struct.
|
| |
|
| |
|
|
|
|
| |
Only affects unit test application.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Most of the work done by Tharanga. Some commits squashed in by
dormando. Also reviewed by dormando.
Tested, working, but experimental implementation of TLS for memcached.
Enable with ./configure --enable-tls
Requires OpenSSL 1.1.0 or better.
See `memcached -h` output for usage.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement an aggressive version of drop_privileges(). Additionally add
similar initialization function for threads drop_worker_privileges().
This version is similar to Solaris one and prohibits memcached from
making any not approved syscalls. Current list narrows down the allowed
calls to socket sends/recvs, accept, epoll handling, futex (and
dependencies - mmap), getrusage (for stats), and signal / exit
handling.
Any incorrect behaviour will result in EACCES returned. This should be
restricted further to KILL in the future (after more testing).
The feature is only tested for i386 and x86_64. It depends on bpf
filters and seccomp enabled in the kernel. It also requires libsecomp
for abstraction to seccomp filters. All are available since Linux 3.5.
Seccomp filtering can be enabled at compile time with --enable-seccomp.
In case of local customisations which require more rights, memcached
allows disabling drop_privileges() with "-o no_drop_privileges" at
startup.
Tests have to run with "-o relaxed_privileges", since they require
disk access after the tests complete. This adds a few allowed syscalls,
but does not disable the protection system completely.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* accesses
* amount
* append
* command
* cyrillic
* daemonize
* detaches
* detail
* documentation
* dynamically
* enabled
* existence
* extra
* implementations
* incoming
* increment
* initialize
* issue
* javascript
* number
* optimization
* overall
* pipeline
* reassign
* reclaimed
* response
* responses
* sigabrt
* specific
* specificity
* tidiness
|
|
|
|
|
|
|
|
|
| |
GATKQ was incorrectly mapped to GAT instead of GATK in binary protocol
handling and thus didn't return a key in the response. Fixed that and added
test cases for GAT, GATQ, GATK and GATKQ in testapp.
Noticed this while testing a new memcahe client library, OMcache:
https://github.com/saaros/omcache/
|
| |
|
|
|
|
| |
automation (at least,... I find that it makes for better automation).
|
|
|
|
|
| |
(ed note: yes it doesn't check for a NULL and die after 20 times. this should
mitigate until we can do better with writing the pidfile)
|
|
|
|
|
|
|
|
| |
Apparently nothing tests GETK/GETKQ, so tests still have to be added.
1.6 doesn't have GATK/GATKQ because the membase folks didn't need it. I'm
adding them for completeness and because I don't want to argue about why
people can't have it. If you're reading this, please use opaques :)
|
|
|
|
|
| |
Taken from the 1.6 branch, partly written by Trond. I hope the CAS handling is
correct.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Some C compilers understand the syntax we use in memcached, but do not
ship stdbool.h or stdint.h. According to C99 inttypes.h contains the
formatting macros we use (PRInn) and is supposed to include stdint.h.
This patch tries to detect stdbool.h and inttypes.h and tries to
include them from config.h
|
| |
|
|
|
|
|
|
|
|
| |
This can potentially use a lot of memory on a host and some of the
build slaves don't like that too much.
It will run everywhere by default, but may be disabled by setting the
SKIP_TEST_101 environment variable.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This issue has coverage in the perl codebase, but relies on keys
larger than 250 bytes long working.
|
| |
|
|
|
|
|
| |
(dustin) I updated the perl test to check for this when it's doing CAS
stuff. Found some bugs in the perl test that took too long to fix.
|
| |
|
| |
|
|
|
|
| |
be reused...
|
| |
|
|
|
|
|
| |
This allows us to provide much more useful error messages for
syscalls.
|
|
|
|
|
| |
This solves the problem where certain test failures would cause
indefinite hangs as child processes refused to ever exit.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Repack the input buffer if the current command and key doesn't fit in the
input buffer (may occur if we read multiple commands in a pipeline)
(Dustin's note):
The original test was connecting to "localhost" which was resolving to
::1 on a few machines. With the ephemeral port binding, IPv4 and IPv6
were getting different ports, and the code was explicitly looking for
the IPv4 port, but implicitly connecting to ::1. Now it explicitly
connects to 127.0.0.1 over IPv4.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To ease testing you can pass -p -1 to memcached and it will create and bind
to an ephemeral port. If you set the environment variable
MEMCACHED_PORT_FILENAME to a filename memcached will write the port numbers
to the file in the following format:
TCP INET6: 5555
TCP INET: 5555
UDP INET6: 6666
UDP INET: 6666
testapp can now just tell the server to start and don't try to locate
a random port for it to use, but instead read the file and connect on
the port.
|