1. 10 Sep, 2020 7 commits
    • Oran Agra's avatar
      Improve valgrind support for cluster tests (#7725) · d410dc31
      Oran Agra authored
      - redirect valgrind reports to a dedicated file rather than console
      - try to avoid killing instances with SIGKILL so that we get the memory
        leak report (killing with SIGTERM before resorting to SIGKILL)
      - search for valgrind reports when done, print them and fail the tests
      - add --dont-clean option to keep the logs on exit
      - fix exit error code when crash is found (would have exited with 0)
      
      changes that affect the normal redis test suite:
      - refactor check_valgrind_errors into two functions one to search and
        one to report
      - move the search half into util.tcl to serve the cluster tests too
      - ignore "address range perms" valgrind warnings which seem non relevant.
      
      (cherry picked from commit 2b998de4)
      d410dc31
    • Oran Agra's avatar
      test infra - add durable mode to work around test suite crashing · 41c7c791
      Oran Agra authored
      in some cases a command that returns an error possibly due to a timing
      issue causes the tcl code to crash and thus prevents the rest of the
      tests from running. this adds an option to make the test proceed despite
      the crash.
      maybe it should be the default mode some day.
      
      (cherry picked from commit fe5da2e6)
      41c7c791
    • Oran Agra's avatar
      test infra - wait_done_loading · db6c763d
      Oran Agra authored
      reduce code duplication in aof.tcl.
      move creation of clients into the test so that it can be skipped
      
      (cherry picked from commit 1b7ba44e)
      db6c763d
    • Oran Agra's avatar
      test infra - flushall between tests in external mode · 72d6f966
      Oran Agra authored
      (cherry picked from commit b65e5aca)
      72d6f966
    • Oran Agra's avatar
      test infra - improve test skipping ability · 28e07460
      Oran Agra authored
      - skip full units
      - skip a single test (not just a list of tests)
      - when skipping tag, skip spinning up servers, not just the tests
      - skip tags when running against an external server too
      - allow using multiple tags (split them)
      
      (cherry picked from commit 677d14c2)
      28e07460
    • Oran Agra's avatar
      test infra - reduce disk space usage · 5b8de5b7
      Oran Agra authored
      this is important when running a test with --loop
      
      (cherry picked from commit e3e69c25)
      5b8de5b7
    • Oran Agra's avatar
      test infra - write test name to logfile · bce350c6
      Oran Agra authored
      (cherry picked from commit 9d527d07)
      bce350c6
  2. 01 Sep, 2020 20 commits
  3. 20 Jul, 2020 13 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