Commit Graph

14 Commits

Author SHA1 Message Date
antirez
a31ca8d753 stringmatchlen() fuzz test added.
Verified to be able to trigger at least #5632. Does not report other
issues.
2018-12-11 13:29:30 +01:00
David Carlier
0b73d0a8d2 Fix non Linux build.
timezone global is a linux-ism whereas it is a function under BSD.
Here a helper to get the timezone value in a more portable manner.
2018-10-26 14:02:09 +00:00
Guy Benoish
56c01c959a enlarged buffer given to ld2string 2017-01-11 19:24:19 +02:00
antirez
71aa9b75f2 Fix HINCRBYFLOAT to work with long doubles.
During the refactoring needed for lazy free, specifically the conversion
of t_hash from struct robj to plain SDS strings, HINCRBFLOAT was
accidentally moved away from long doubles to doubles for internal
processing of increments and formatting.

The diminished precision created more obvious artifacts in the way small
numbers are formatted once we convert from decimal number in radix 10 to
double and back to its string in radix 10.

By using more precision, we now have less surprising results at least
with small numbers like "1.23", exactly like in the previous versions of
Redis.

See issue #2846.
2015-11-04 17:16:34 +01:00
antirez
777396aeba Lazyfree: Hash converted to use plain SDS WIP 2. 2015-10-01 13:02:24 +02:00
antirez
1c247556c6 Lazyfree: Hash converted to use plain SDS WIP 1. 2015-10-01 13:02:24 +02:00
antirez
0e5e8ca9e6 Utils: Include stdint.h and fix signess in sdigits10(). 2015-02-27 16:03:02 +01:00
antirez
c95507881a Utils: added function to get radix 10 string length of signed integer. 2015-02-27 15:22:10 +01:00
Matt Stancliff
8febcffdc5 Allow all code tests to run using Redis args
Previously, many files had individual main() functions for testing,
but each required being compiled with their own testing flags.
That gets difficult when you have 8 different flags you need
to set just to run all tests (plus, some test files required
other files to be compiled aaginst them, and it seems some didn't
build at all without including the rest of Redis).

Now all individual test main() funcions are renamed to a test
function for the file itself and one global REDIS_TEST define enables
testing across the entire codebase.

Tests can now be run with:
  - `./redis-server test <test>`

  e.g. ./redis-server test ziplist

If REDIS_TEST is not defined, then no tests get included and no
tests are included in the final redis-server binary.
2014-12-23 09:31:03 -05:00
antirez
6978aeb3bf pathIsBaseName() added to utils.c
The function is used to test that the specified string looks like just
as the basename of a path, without any absolute or relative path.
2013-07-02 12:08:07 +02:00
antirez
0781ad6899 getAbsolutePath() moved into utils.c 2013-07-02 11:56:52 +02:00
antirez
4365e5b2d3 BSD license added to every C source and header file. 2012-11-08 18:31:32 +01:00
Pieter Noordhuis
9ea54feef0 string2* functions take a const pointer 2012-01-02 15:24:50 -08:00
Pieter Noordhuis
5d08193126 Tests for string2ll; move isObject* to object.c 2011-05-05 16:26:50 +02:00