1. 01 Sep, 2020 6 commits
    • Oran Agra's avatar
      Fix failing tests due to issues with wait_for_log_message (#7572) · 67750ce3
      Oran Agra authored
      - the test now waits for specific set of log messages rather than wait for
        timeout looking for just one message.
      - we don't wanna sample the current length of the log after an action, due
        to a race, we need to start the search from the line number of the last
        message we where waiting for.
      - when attempting to trigger a full sync, use multi-exec to avoid a race
        where the replica manages to re-connect before we completed the set of
        actions that should force a full sync.
      - fix verify_log_message which was broken and unused
      
      (cherry picked from commit 109b5ccd)
      67750ce3
    • Jiayuan Chen's avatar
      Add optional tls verification (#7502) · 096285ab
      Jiayuan Chen authored
      
      
      Adds an `optional` value to the previously boolean `tls-auth-clients` configuration keyword.
      Co-authored-by: default avatarYossi Gottlieb <yossigo@gmail.com>
      (cherry picked from commit f31260b0)
      096285ab
    • Oran Agra's avatar
      Stabilize bgsave test that sometimes fails with valgrind (#7559) · 6daa8b9a
      Oran Agra authored
      on ci.redis.io the test fails a lot, reporting that bgsave didn't end.
      increaseing the timeout we wait for that bgsave to get aborted.
      in addition to that, i also verify that it indeed got aborted by
      checking that the save counter wasn't reset.
      
      add another test to verify that a successful bgsave indeed resets the
      change counter.
      
      (cherry picked from commit 8a57969f)
      6daa8b9a
    • Oran Agra's avatar
      testsuite may leave servers alive on error (#7549) · e8aa5583
      Oran Agra authored
      in cases where you have
      test name {
        start_server {
          start_server {
            assert
          }
        }
      }
      
      the exception will be thrown to the test proc, and the servers are
      supposed to be killed on the way out. but it seems there was always a
      bug of not cleaning the server stack, and recently (#7404) we started
      relying on that stack in order to kill them, so with that bug sometimes
      we would have tried to kill the same server twice, and leave one alive.
      
      luckly, in most cases the pattern is:
      start_server {
        test name {
        }
      }
      
      (cherry picked from commit 36b94943)
      e8aa5583
    • Yossi Gottlieb's avatar
      Tests: drop TCL 8.6 dependency. (#7548) · f1d5d5d2
      Yossi Gottlieb authored
      This re-implements the redis-cli --pipe test so it no longer depends on a close feature available only in TCL 8.6.
      
      Basically what this test does is run redis-cli --pipe, generates a bunch of commands and pipes them through redis-cli, and inspects the result in both Redis and the redis-cli output.
      
      To do that, we need to close stdin for redis-cli to indicate we're done so it can flush its buffers and exit. TCL has bi-directional channels can only offers a way to "one-way close" a channel with TCL 8.6. To work around that, we now generate the commands into a file and feed that file to redis-cli directly.
      
      As we're writing to an actual file, the number of commands is now reduced.
      
      (cherry picked from commit f57e844b)
      f1d5d5d2
    • Remi Collet's avatar
      Fix deprecated tail syntax in tests (#7543) · af907e4b
      Remi Collet authored
      
      (cherry picked from commit 3f2fbc4c)
      af907e4b
  2. 20 Jul, 2020 15 commits
    • WuYunlong's avatar
      Fix command help for unexpected options (#7476) · b1a01fda
      WuYunlong authored
      
      (cherry picked from commit 93bdbf5a)
      b1a01fda
    • Oran Agra's avatar
      redis-cli tests, fix valgrind timing issue (#7519) · 05f8975d
      Oran Agra authored
      this test when run with valgrind on github actions takes 160 seconds
      
      (cherry picked from commit 254c9625)
      05f8975d
    • WuYunlong's avatar
      Fix out of update help info in tcl tests. (#7516) · 4780cc5e
      WuYunlong authored
      Before this commit, the output of "./runtest-cluster --help" is incorrect.
      After this commit, the format of the following 3 output is consistent:
      ./runtest --help
      ./runtest-cluster --help
      ./runtest-sentinel --help
      
      (cherry picked from commit 8128d397)
      4780cc5e
    • Oran Agra's avatar
      fix recently added time sensitive tests failing with valgrind (#7512) · aea4db2f
      Oran Agra authored
      interestingly the latency monitor test fails because valgrind is slow
      enough so that the time inside PEXPIREAT command from the moment of
      the first mstime() call to get the basetime until checkAlreadyExpired
      calls mstime() again is more than 1ms, and that test was too sensitive.
      
      using this opportunity to speed up the test (unrelated to the failure)
      the fix is just the longer time passed to PEXPIRE.
      
      (cherry picked from commit e5227aab)
      aea4db2f
    • Oran Agra's avatar
      runtest --stop pause stops before terminating the redis server (#7513) · b5c5f870
      Oran Agra authored
      in the majority of the cases (on this rarely used feature) we want to
      stop and be able to connect to the shard with redis-cli.
      since these are two different processes interracting with the tty we
      need to stop both, and we'll have to hit enter twice, but it's not that
      bad considering it is rarely used.
      
      (cherry picked from commit 02ef355f)
      b5c5f870
    • WuYunlong's avatar
      Add missing latency-monitor tcl test to test_helper.tcl. (#6782) · f838df92
      WuYunlong authored
      
      (cherry picked from commit d792db79)
      f838df92
    • Yossi Gottlieb's avatar
      TLS: Session caching configuration support. (#7420) · 7a536c29
      Yossi Gottlieb authored
      * TLS: Session caching configuration support.
      * TLS: Remove redundant config initialization.
      
      (cherry picked from commit 3e6f2b1a)
      7a536c29
    • Yossi Gottlieb's avatar
      TLS: Add missing redis-cli options. (#7456) · b057ff81
      Yossi Gottlieb authored
      * Tests: fix and reintroduce redis-cli tests.
      
      These tests have been broken and disabled for 10 years now!
      
      * TLS: add remaining redis-cli support.
      
      This adds support for the redis-cli --pipe, --rdb and --replica options
      previously unsupported in --tls mode.
      
      * Fix writeConn().
      
      (cherry picked from commit d9f970d8)
      b057ff81
    • Oran Agra's avatar
      RESTORE ABSTTL won't store expired keys into the db (#7472) · 95ba01b5
      Oran Agra authored
      Similarly to EXPIREAT with TTL in the past, which implicitly deletes the
      key and return success, RESTORE should not store key that are already
      expired into the db.
      When used together with REPLACE it should emit a DEL to keyspace
      notification and replication stream.
      
      (cherry picked from commit 5977a948)
      95ba01b5
    • Oran Agra's avatar
      skip a test that uses +inf on valgrind (#7440) · 33ca884c
      Oran Agra authored
      On some platforms strtold("+inf") with valgrind returns a non-inf result
      
      [err]: INCRBYFLOAT does not allow NaN or Infinity in tests/unit/type/incr.tcl
      Expected 'ERR*would produce*' to equal or match '1189731495357231765085759.....'
      
      (cherry picked from commit 909bc97c)
      33ca884c
    • Oran Agra's avatar
      stabilize tests that look for log lines (#7367) · 2b5f2319
      Oran Agra authored
      tests were sensitive to additional log lines appearing in the log
      causing the search to come empty handed.
      
      instead of just looking for the n last log lines, capture the log lines
      before performing the action, and then search from that offset.
      
      (cherry picked from commit 8e76e134)
      2b5f2319
    • Oran Agra's avatar
      tests/valgrind: don't use debug restart (#7404) · 1104113c
      Oran Agra authored
      * tests/valgrind: don't use debug restart
      
      DEBUG REATART causes two issues:
      1. it uses execve which replaces the original process and valgrind doesn't
         have a chance to check for errors, so leaks go unreported.
      2. valgrind report invalid calls to close() which we're unable to resolve.
      
      So now the tests use restart_server mechanism in the tests, that terminates
      the old server and starts a new one, new PID, but same stdout, stderr.
      
      since the stderr can contain two or more valgrind report, it is not enough
      to just check for the absence of leaks, we also need to check for some known
      errors, we do both, and fail if we either find an error, or can't find a
      report saying there are no leaks.
      
      other changes:
      - when killing a server that was already terminated we check for leaks too.
      - adding DEBUG LEAK which was used to test it.
      - adding --trace-children to valgrind, although no longer needed.
      - since the stdout contains two or more runs, we need slightly different way
        of checking if the new process is up (explicitly looking for the new PID)
      - move the code that handles --wait-server to happen earlier (before
        watching the startup message in the log), and serve the restarted server too.
      
      * squashme - CR fixes
      
      (cherry picked from commit 69ade873)
      1104113c
    • antirez's avatar
      LPOS: option FIRST renamed RANK. · 17aaf5ec
      antirez authored
      (cherry picked from commit a5a3a7bb)
      17aaf5ec
    • Oran Agra's avatar
      EXEC always fails with EXECABORT and multi-state is cleared · 05e483cb
      Oran Agra authored
      In order to support the use of multi-exec in pipeline, it is important that
      MULTI and EXEC are never rejected and it is easy for the client to know if the
      connection is still in multi state.
      
      It was easy to make sure MULTI and DISCARD never fail (done by previous
      commits) since these only change the client state and don't do any actual
      change in the server, but EXEC is a different story.
      
      Since in the past, it was possible for clients to handle some EXEC errors and
      retry the EXEC, we now can't affort to return any error on EXEC other than
      EXECABORT, which now carries with it the real reason for the abort too.
      
      Other fixes in this commit:
      - Some checks that where performed at the time of queuing need to be re-
        validated when EXEC runs, for instance if the transaction contains writes
        commands, it needs to be aborted. there was one check that was already done
        in execCommand (-READONLY), but other checks where missing: -OOM, -MISCONF,
        -NOREPLICAS, -MASTERDOWN
      - When a command is rejected by processCommand it was rejected with addReply,
        which was not recognized as an error in case the bad command came from the
        master. this will enable to count or MONITOR these errors in the future.
      - make it easier for tests to create additional (non deferred) clients.
      - add tests for the fixes of this commit.
      
      (cherry picked from commit 65a3307b)
      05e483cb
    • meir@redislabs.com's avatar
      Fix RM_ScanKey module api not to return int encoded strings · 51e17845
      meir@redislabs.com authored
      The scan key module API provides the scan callback with the current
      field name and value (if it exists). Those arguments are RedisModuleString*
      which means it supposes to point to robj which is encoded as a string.
      Using createStringObjectFromLongLong function might return robj that
      points to an integer and so break a module that tries for example to
      use RedisModule_StringPtrLen on the given field/value.
      
      The PR introduces a fix that uses the createObject function and sdsfromlonglong function.
      Using those function promise that the field and value pass to the to the
      scan callback will be Strings.
      
      The PR also changes the Scan test module to use RedisModule_StringPtrLen
      to catch the issue. without this, the issue is hidden because
      RedisModule_ReplyWithString knows to handle integer encoding of the
      given robj (RedisModuleString).
      
      The PR also introduces a new test to verify the issue is solved.
      
      (cherry picked from commit a89bf734)
      51e17845
  3. 12 Jun, 2020 1 commit
  4. 09 Jun, 2020 2 commits
  5. 06 Jun, 2020 1 commit
  6. 28 May, 2020 10 commits
  7. 22 May, 2020 5 commits