test/rocksdb: fix db_bench build with gcc9

GCC9 complains:
./db/version_edit.h:134:71: error: implicitly-declared "constexpr
rocksdb::FileDescriptor::FileDescriptor(const
rocksdb::FileDescriptor&)" is deprecated [-Werror=deprecated-copy]

From what I see this can be fixed by explicitly
defining some constructors and assignment operators,
even setting them to `= default;`. I didn't dig into
this further, just ignore the warning for now.

Change-Id: Ia0ee0cc5fc1dce36f7098959d383b08855a825df
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1082
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Darek Stojaczyk 2020-03-02 12:59:40 +01:00 committed by Tomasz Zawadzki
parent d4653a31e0
commit a5bcbbefcb

View File

@ -57,7 +57,14 @@ pushd $DB_BENCH_DIR
if [ -z "$SKIP_GIT_CLEAN" ]; then
git clean -x -f -d
fi
$MAKE db_bench $MAKEFLAGS $MAKECONFIG DEBUG_LEVEL=0 SPDK_DIR=$rootdir
EXTRA_CXXFLAGS=""
GCC_VERSION=$(cc -dumpversion | cut -d. -f1)
if (( GCC_VERSION >= 9 )); then
EXTRA_CXXFLAGS+="-Wno-deprecated-copy -Wno-pessimizing-move"
fi
$MAKE db_bench $MAKEFLAGS $MAKECONFIG DEBUG_LEVEL=0 SPDK_DIR=$rootdir EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS"
popd
timing_exit db_bench_build