1. 14 Nov, 2014 1 commit
    • Matt Stancliff's avatar
      Lua: Add bitop · 1e501d9f
      Matt Stancliff authored
      A few people have written custom C commands because bit
      manipulation isn't exposed through Lua.  Let's give
      them Mike Pall's bitop.
      
      This adds bitop 1.0.2 (2012-05-08) from http://bitop.luajit.org/
      
      bitop is imported as "bit" into the global namespace.
      
      New Lua commands: bit.tobit, bit.tohex, bit.bnot, bit.band, bit.bor, bit.bxor,
      bit.lshift, bit.rshift, bit.arshift, bit.rol, bit.ror, bit.bswap
      
      Verification of working (the asserts would abort on error, so (nil) is correct):
      127.0.0.1:6379> eval "assert(bit.tobit(1) == 1); assert(bit.band(1) == 1); assert(bit.bxor(1,2) == 3); assert(bit.bor(1,2,4,8,16,32,64,128) == 255)" 0
      (nil)
      127.0.0.1:6379> eval 'assert(0x7fffffff == 2147483647, "broken hex literals"); assert(0xffffffff == -1 or 0xffffffff == 2^32-1, "broken hex literals"); assert(tostring(-1) == "-1", "broken tostring()"); assert(tostring(0xffffffff) == "-1" or tostring(0xffffffff) == "4294967295", "broken tostring()")' 0
      (nil)
      
      Tests also integrated into the scripting tests and can be run with:
      ./runtest --single unit/scripting
      
      Tests are excerpted from `bittest.lua` included in the bitop distribution.
      1e501d9f
  2. 29 Oct, 2014 1 commit
  3. 06 Oct, 2014 4 commits
  4. 16 Sep, 2014 1 commit
    • antirez's avatar
      Better truncated AOF loading tests. · 5e38bc38
      antirez authored
      Now there are tests to write more data after loading a truncated AOF,
      testing that the loaded data is correct, appending more, and testing
      again.
      5e38bc38
  5. 08 Sep, 2014 4 commits
  6. 01 Sep, 2014 1 commit
  7. 27 Aug, 2014 5 commits
  8. 22 Jul, 2014 1 commit
  9. 18 Jul, 2014 2 commits
  10. 10 Jul, 2014 4 commits
  11. 30 Jun, 2014 1 commit
  12. 27 Jun, 2014 2 commits
  13. 26 Jun, 2014 1 commit
  14. 23 Jun, 2014 2 commits
    • antirez's avatar
      Sentinel test: more correct sentinels config reset. · 5d16a838
      antirez authored
      In the initialization test for each instance we used to unregister the
      old master and register it again to clear the config.
      However there is a race condition doing this: as soon as we unregister
      and re-register "mymaster", another Sentinel can update the new
      configuration with the old state because of gossip "hello" messages.
      
      So the correct procedure is instead, unregister "mymaster" from all the
      sentinel instances, and re-register it everywhere again.
      5d16a838
    • antirez's avatar
      Basic tests for the ROLE command. · 9a5408f2
      antirez authored
      9a5408f2
  15. 21 Jun, 2014 1 commit
  16. 19 Jun, 2014 3 commits
  17. 18 Jun, 2014 6 commits