19 Commits

Author SHA1 Message Date
David CARLIER
d535a5061c Add support for Haiku OS (#7435) 2020-09-29 15:52:13 +03:00
antirez
2305500353 Hopefully better memory test on crash.
The old test, designed to do a transformation on the bits that was
invertible, in order to avoid touching the original memory content, was
not effective as it was redis-server --test-memory. The former often
reported OK while the latter was able to spot the error.

So the test was substituted with one that may perform better, however
the new one must backup the memory tested, so it tests memory in small
pieces. This limits the effectiveness because of the CPU caches. However
some attempt is made in order to trash the CPU cache between the fill
and the check stages, but not for the addressing test unfortunately.

We'll see if this test will be able to find errors where the old failed.
2015-12-16 17:41:22 +01:00
antirez
a2dbc186de memtest.c now can be called as API in non interactive mode. 2015-12-16 12:31:42 +01:00
antirez
26b5bd7ef5 Include stropts only if __sun is defined. 2014-12-09 12:59:46 +01:00
Jan-Erik Rediger
c3539abccb Fix implicit declaration of ioctl on Solaris 2014-12-01 23:22:03 +01:00
Xian Li
c587be90b1 memtest: Add missing free()
Closes #1614
2014-08-08 10:30:14 +02:00
antirez
e1b7c4db5c Fixed a bug in memtest progress bar, that had no actual effects.
This closes issue #859, thanks to @erbenmo.
2013-01-21 12:34:22 +01:00
antirez
8f5635d339 On crash memory test rewrote so that it actaully works.
1) We no longer test location by location, otherwise the CPU write cache
completely makes our business useless.
2) We still need a memory test that operates in steps from the first to
the last location in order to never hit the cache, but that is still
able to retain the memory content.

This was tested using a Linux box containing a bad memory module with a
zingle bit error (always zero).

So the final solution does has an error propagation step that is:

1) Invert bits at every location.
2) Swap adiacent locations.
3) Swap adiacent locations again.
4) Invert bits at every location.
5) Swap adiacent locations.
6) Swap adiacent locations again.

Before and after these steps, and after step 4, a CRC64 checksum is computed.
If the three CRC64 checksums don't match, a memory error was detected.
2012-11-29 10:24:35 +01:00
antirez
022bd293a6 Fast memory test on Redis crash. 2012-11-21 13:24:44 +01:00
antirez
a32d1ddff6 BSD license added to every C source and header file. 2012-11-08 18:31:32 +01:00
antirez
961276ba4f memtest.c fixed to actually use v1 and v2 in memtest_fill_value(). 2012-04-27 16:29:44 +02:00
antirez
ccf1131784 memtest.c: integer overflow fixed. 2012-04-12 11:49:52 +02:00
antirez
5c68789db5 Macros ULONG_ONEZERO / ULONG_ZEROONE were inverted in #ifdef to test 32/64 bit arch. 2012-04-11 11:32:22 +02:00
antirez
49432f6def Memory addressing test implemented. 2012-03-19 14:02:34 +01:00
antirez
c577014461 More memory tests implemented. Default number of iterations lowered to a more acceptable value of 50. 2012-03-18 18:03:27 +01:00
antirez
82003f2f1f Fixed typo. 2012-03-18 17:27:56 +01:00
antirez
eec3337856 Number of iteration of --test-memory is now 300 (several minutes per gigabyte). Memtest86 and Memtester links are also displayed while running the test. 2012-03-18 17:25:00 +01:00
antirez
fd5faf15fc Memory test function now less boring thanks to screen-wide progress bar. 2012-03-16 21:19:53 +01:00
antirez
76d3f5b068 Hem... actual memtest.c file added. 2012-03-16 17:21:49 +01:00