google / leveldb

LevelDB is a fast key-value storage library written at Google that provides an ordered mapping from string keys to string values.
BSD 3-Clause "New" or "Revised" License
36.19k stars 7.78k forks source link

issue320_test failure #723

Open kylezh opened 5 years ago

kylezh commented 5 years ago

When configuring build type as Debug, it fails as

issue320_test: /[PATH]/leveldb/table/table_builder.cc:97: void leveldb::TableBuilder::Add(const leveldb::Slice&, const leveldb::Slice&): Assertion `r->options.comparator->Compare(key, Slice(r->last_key)) > 0' failed.

When configuring build type as Release it fails as

/[PATH]/leveldb/issues/issue320_test.cc:86: NotFound:

The codebase is 20fb601, just the same as https://github.com/google/leveldb/pull/339

kylezh commented 5 years ago

It seems quite weird.

I backported 20fb601 to old versions, and there is no error. But after CMake was introduced, the error can be reproduced.

I tested at the commit 739c251 where CMake is firstly introduced and Makefile has not been removed. The binary compiled by Makefile can pass while the binary compiled by CMake cannot.

PS: I have removed -DNDEBUG for all Makefile test.

pwnall commented 5 years ago

The test suite, including that test, runs on Travis CI and AppVeyor. I spot-checked the output of the latest builds, and the test passes.

I suspect you're running the tests in an unusual way. Is it possible that you're running them from the wrong directory?