summaryrefslogtreecommitdiff
path: root/t/lib/MemcachedTest.pm
Commit message (Collapse)AuthorAgeFilesLines
* proxy: let tests use unix socket for proxy daemondormando2023-04-281-3/+2
| | | | | | | | | | | A long sleep in the unix startup code made backends hit the connection timeout before the backends were configured. Make all the proxy tests use the unix socket instead of listening on a hardcoded port. Proxy code is completely equivalent from the client standpoint. This fix should make the whole test suite run a bit faster too.
* proxy: new integration tests.dormando2023-01-251-0/+5
| | | | | | | | uses mocked backend servers so we can test: - end to end client to backend proxying - lua API functions - configuration reload - various error conditions
* Fix full unit test suite under test_tlsKevin Lin2021-11-231-1/+7
| | | | | This allows `make test_tls` to reliably pass when running without parallelism.
* proxy: initial commit.dormando2021-10-051-1/+7
| | | | | | | | | | | | | | | See BUILD for compilation details. See t/startfile.lua for configuration examples. (see also https://github.com/memcached/memcached-proxylibs for extensions, config libraries, more examples) NOTE: io_uring mode is _not stable_, will crash. As of this commit it is not recommended to run the proxy in production. If you are interested please let us know, as we are actively stabilizing for production use.
* Fix expiration test to use debugtime commandminkikim892021-06-071-1/+8
|
* improve shutdown tests1.6.9dormando2020-11-201-0/+7
| | | | | | | new tests were flaky for slow systems; for some reason writing to the closet socket would exit prove instead of throw any kind of error. Instead we check that the child pid actually exits and loop a bit to avoid the race.
* start of valgrind test modedormando2020-05-121-12/+39
| | | | | | | heavily influenced by @jefyt's example. needs: valgrind is silenced, but any way to "fail the test" with valgrind-died error?
* Add build option to disable unix socket functionality.Jefty Negapatan2020-04-111-7/+21
| | | | | | 1. configure.ac - Add --disable-unix-socket to disable and define DISABLE_UNIX_SOCKET. 2. memcached.* - Guard all unix socket-related codes with DISABLE_UNIX_SOCKET. Take note of negative checking (#ifndef DISABLE_UNIX_SOCKET instead of #ifdef UNIX_SOCKET). This is just to make sure that current code even without a config file is the default or supports unix socket. 3. t/ - Check first if unix socket is supported before executing some unix socket-related tests.
* Add: `-o ssl_session_cache`, disabled by defaultKevin Lin2020-03-271-0/+4
| | | | Enables server-side TLS session caching.
* tests: wait a lot longer to connect to memcacheddormando2020-03-101-1/+1
| | | | travis tests are absolutely glacial, causes this to be flaky.
* adding missing defaults to the --help outputTharanga Gamaethige2020-01-211-4/+14
|
* restartable cachedormando2019-09-171-0/+6
| | | | | | | | | | | | | | | "-e /path/to/tmpfsmnt/file" SIGUSR1 for graceful stop restart requires the same memory limit, slab sizes, and some other infrequently changed details. Most other options and features can change between restarts. Binary can be upgraded between restarts. Restart does some fixup work on start for every item in cache. Can take over a minute with more than a few hundred million items in cache. Keep in mind when a cache is down it may be missing invalidations, updates, and so on.
* -Y [filename] for ascii authentication modedormando2019-05-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Loads "username:password\n" tokens (up to 8) out of a supplied authfile. If enabled, disables binary protocol (though may be able to enable both if sasl is also used?). authentication is done via the "set" command. A separate handler is used to avoid some hot path conditionals and narrow the code executed in an unauthenticated state. ie: set foo 0 0 7\r\n foo bar\r\n returns "STORED" on success. Else returns CLIENT_ERROR with some information. Any key is accepted: if using a client that doesn't try to authenticate when connecting to a pool of servers, the authentication set can be tried with the same key as one that failed to coerce the client to routing to the correct server. Else an "auth" or similar key would always go to the same server.
* Fix "qw" in "MemcachedTest.pm" so "wait_ext_flush" is exported properlyTianon Gravi2019-04-261-1/+1
| | | | | | | | | | | | | Without this change, I get the following when running the `t/extstore-jbod.t` test: Undefined subroutine &main::wait_ext_flush called at t/extstore-jbod.t line 42. t/extstore-jbod.t ........... Dubious, test returned 29 (wstat 7424, 0x1d00) No subtests run After this change: t/extstore-jbod.t ........... ok
* Basic implementation of TLS for memcached.1.5.13Tharanga Gamaethige2019-04-151-6/+80
| | | | | | | | | | | | | 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.
* extstore JBOD supportdormando2018-08-061-1/+21
| | | | | | | | | | | | | | | | Just a Bunch Of Devices :P code exists for routing specific devices to specific buckets (lowttl/compact/etc), but enabling it requires significant fixes to compaction algorithm. Thus it is disabled as of this writing. code cleanups and future work: - pedantically freeing memory and closing fd's on exit - unify and flatten the free_bucket code - defines for free buckets - page eviction adjustment (force min-free per free bucket) - fix default calculation for compact_under and drop_under - might require forcing this value only on default bucket
* extstore: configure and start time gatingdormando2017-11-281-1/+7
| | | | | ./configure --enable-extstore to compile the feature in specify -o ext_path=/whatever to start.
* Add drop_privileges() for LinuxStanisław Pitucha2017-08-231-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* move the test root user check back to right placedormando2017-07-261-3/+4
|
* default to unix sockets for testsdormando2017-07-261-8/+24
| | | | | | | | | | | | | | | Tests have randomly failed to start since the beginning of time, due largely to port assignment. A random local port is tested, then passed onto the daemon to try. If that port (on 0.0.0.0) becomes used in the meantime, it fails. Now, tests default to using unix sockets unique to the pid of the test parent. Some tests still run via the network and have been changed to 127.0.0.1, which should collide less with normal internet connections. Some tests require that due to some timing issues that unix sockets seem to create, and others expect a network in a few cases. Ran the tests with `PARALLEL=9 make test` on my machine for two hours and they didn't fail once.
* Testing SASL auth in binary protocol.CaptTofu2009-10-251-1/+9
|
* Allow using an external daemon for perl tests.dormando2009-10-071-1/+17
| | | | | Set T_MEMD_USE_DAEMON="127.0.0.1:11211" or similar to use an external daemon. In a debugger, verbosely, or whatever.
* Make item size max start time configurable.dormando2009-10-071-0/+5
| | | | Adds new option -I, accepts bytes, or NNk or NNm.
* Wider reaching whitespace cleanup.Dustin Sallings2009-09-141-46/+46
|
* Put a time limit on memcached processes started from within tests.Dustin Sallings2009-08-141-1/+1
| | | | | This solves the problem where certain test failures would cause indefinite hangs as child processes refused to ever exit.
* Test cachedump on text protocol.Dustin Sallings2009-02-121-2/+2
|
* Added support for test code coverage output for "make test" targetVictor Kirkebo2009-01-291-1/+1
|
* Support multiple interfaces returned by IPv6 interfaces. By Brian Aker ↵Brian Aker2008-02-181-2/+2
| | | | | | <brian@tangent.org> git-svn-id: http://code.sixapart.com/svn/memcached/trunk/server@701 b0b603af-a30f-0410-a34e-baf09ae79d0b
* Allow running tests in a build directory different from source directory. ↵Tomash Brechko2007-11-161-3/+8
| | | | | | (Tomash Brechko tomash.brechko@gmail.com) git-svn-id: http://code.sixapart.com/svn/memcached/trunk/server@641 b0b603af-a30f-0410-a34e-baf09ae79d0b
* add tests for CAS functionality (missed this first time around and wrote my ↵Paul Lindner2007-10-031-1/+59
| | | | | | own..) git-svn-id: http://code.sixapart.com/svn/memcached/trunk/server@617 b0b603af-a30f-0410-a34e-baf09ae79d0b
* wait for unix socket to be createdPaul Lindner2007-06-051-1/+2
| | | | git-svn-id: http://code.sixapart.com/svn/memcached/trunk/server@563 b0b603af-a30f-0410-a34e-baf09ae79d0b
* updated unit tests, better spec filePaul Lindner2007-05-121-11/+33
| | | | git-svn-id: http://code.sixapart.com/svn/memcached/trunk/server@557 b0b603af-a30f-0410-a34e-baf09ae79d0b
* to stay in sync with 1.1.x test library.Brad Fitzpatrick2006-09-091-1/+10
| | | | git-svn-id: http://code.sixapart.com/svn/memcached/trunk/server@381 b0b603af-a30f-0410-a34e-baf09ae79d0b
* failing UDP testBrad Fitzpatrick2006-09-071-3/+18
| | | | git-svn-id: http://code.sixapart.com/svn/memcached/trunk/server@376 b0b603af-a30f-0410-a34e-baf09ae79d0b
* automake foo from Robin H. Johnson: build two targets, and test on the ↵Brad Fitzpatrick2006-09-061-1/+1
| | | | | | debug one with asserts git-svn-id: http://code.sixapart.com/svn/memcached/trunk/server@375 b0b603af-a30f-0410-a34e-baf09ae79d0b
* rename 'test' to 't'.Brad Fitzpatrick2006-09-051-0/+129
git-svn-id: http://code.sixapart.com/svn/memcached/trunk/server@370 b0b603af-a30f-0410-a34e-baf09ae79d0b