]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
tests/test_bluestore_types: cast duration to ceph::timespan 38882/head
authorKefu Chai <kchai@redhat.com>
Wed, 13 Jan 2021 13:01:43 +0000 (21:01 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 13 Jan 2021 13:05:30 +0000 (21:05 +0800)
commitbb4bb800fd56a0279224768990611d558ed38e7a
treefb9a9ebfda46b72adfb20202493bfc2acb467135
parent058cbfbcaaeafe756b4bd93383ff8ff3fd37f6e6
tests/test_bluestore_types: cast duration to ceph::timespan

on FreeBSD + Clang + libc++ + amd64, std::chrono::nanoseconds::rep is `long
long` instead of `long`, so the explictly instantiated template
operator<< operator instances in `src/common/ceph_time.cc` are not able to
cover this use case. so in this change, the duration is casted to
ceph::timespan instead of nanoseconds. so we can ensure that `operator<<` is
always available in this case.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/test/objectstore/test_bluestore_types.cc