From ce0fc71adf5b767694d3c2d7f3125792110f75bf Mon Sep 17 00:00:00 2001 From: sdong Date: Wed, 19 May 2021 10:24:12 -0700 Subject: [PATCH] Minor improvements in env_test (#8317) Summary: Fix typo in comments in env_test and add PermitUncheckedError() to two statuses. Pull Request resolved: https://github.com/facebook/rocksdb/pull/8317 Reviewed By: jay-zhuang Differential Revision: D28525093 fbshipit-source-id: 7a1ed3e45b6f500b8d2ae19fa339c9368111e922 --- env/env_test.cc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/env/env_test.cc b/env/env_test.cc index c1d7173ffb..1dd3c04491 100644 --- a/env/env_test.cc +++ b/env/env_test.cc @@ -1273,7 +1273,7 @@ TEST_P(EnvPosixTestWithParam, MultiRead) { } TEST_F(EnvPosixTest, MultiReadNonAlignedLargeNum) { - // In this test we don't do aligned read, wo it doesn't work for + // In this test we don't do aligned read, so it doesn't work for // direct I/O case. EnvOptions soptions; soptions.use_direct_reads = soptions.use_direct_writes = false; @@ -1401,8 +1401,7 @@ void GenerateFilesAndRequest(Env* env, const std::string& fname, } TEST_F(EnvPosixTest, MultiReadIOUringError) { - // In this test we don't do aligned read, wo it doesn't work for - // direct I/O case. + // In this test we don't do aligned read, so we can't do direct I/O. EnvOptions soptions; soptions.use_direct_reads = soptions.use_direct_writes = false; std::string fname = test::PerThreadDBPath(env_, "testfile"); @@ -1429,14 +1428,15 @@ TEST_F(EnvPosixTest, MultiReadIOUringError) { Status s = file->MultiRead(reqs.data(), reqs.size()); if (io_uring_wait_cqe_called) { ASSERT_NOK(s); + } else { + s.PermitUncheckedError(); } ROCKSDB_NAMESPACE::SyncPoint::GetInstance()->DisableProcessing(); } TEST_F(EnvPosixTest, MultiReadIOUringError2) { - // In this test we don't do aligned read, wo it doesn't work for - // direct I/O case. + // In this test we don't do aligned read, so we can't do direct I/O. EnvOptions soptions; soptions.use_direct_reads = soptions.use_direct_writes = false; std::string fname = test::PerThreadDBPath(env_, "testfile"); @@ -1469,6 +1469,8 @@ TEST_F(EnvPosixTest, MultiReadIOUringError2) { Status s = file->MultiRead(reqs.data(), reqs.size()); if (io_uring_submit_and_wait_called) { ASSERT_NOK(s); + } else { + s.PermitUncheckedError(); } ROCKSDB_NAMESPACE::SyncPoint::GetInstance()->DisableProcessing();