mirror of https://github.com/facebook/rocksdb.git
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
This commit is contained in:
parent
9d61a0856d
commit
ce0fc71adf
|
@ -1273,7 +1273,7 @@ TEST_P(EnvPosixTestWithParam, MultiRead) {
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(EnvPosixTest, MultiReadNonAlignedLargeNum) {
|
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.
|
// direct I/O case.
|
||||||
EnvOptions soptions;
|
EnvOptions soptions;
|
||||||
soptions.use_direct_reads = soptions.use_direct_writes = false;
|
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) {
|
TEST_F(EnvPosixTest, MultiReadIOUringError) {
|
||||||
// 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 we can't do direct I/O.
|
||||||
// direct I/O case.
|
|
||||||
EnvOptions soptions;
|
EnvOptions soptions;
|
||||||
soptions.use_direct_reads = soptions.use_direct_writes = false;
|
soptions.use_direct_reads = soptions.use_direct_writes = false;
|
||||||
std::string fname = test::PerThreadDBPath(env_, "testfile");
|
std::string fname = test::PerThreadDBPath(env_, "testfile");
|
||||||
|
@ -1429,14 +1428,15 @@ TEST_F(EnvPosixTest, MultiReadIOUringError) {
|
||||||
Status s = file->MultiRead(reqs.data(), reqs.size());
|
Status s = file->MultiRead(reqs.data(), reqs.size());
|
||||||
if (io_uring_wait_cqe_called) {
|
if (io_uring_wait_cqe_called) {
|
||||||
ASSERT_NOK(s);
|
ASSERT_NOK(s);
|
||||||
|
} else {
|
||||||
|
s.PermitUncheckedError();
|
||||||
}
|
}
|
||||||
|
|
||||||
ROCKSDB_NAMESPACE::SyncPoint::GetInstance()->DisableProcessing();
|
ROCKSDB_NAMESPACE::SyncPoint::GetInstance()->DisableProcessing();
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(EnvPosixTest, MultiReadIOUringError2) {
|
TEST_F(EnvPosixTest, MultiReadIOUringError2) {
|
||||||
// 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 we can't do direct I/O.
|
||||||
// direct I/O case.
|
|
||||||
EnvOptions soptions;
|
EnvOptions soptions;
|
||||||
soptions.use_direct_reads = soptions.use_direct_writes = false;
|
soptions.use_direct_reads = soptions.use_direct_writes = false;
|
||||||
std::string fname = test::PerThreadDBPath(env_, "testfile");
|
std::string fname = test::PerThreadDBPath(env_, "testfile");
|
||||||
|
@ -1469,6 +1469,8 @@ TEST_F(EnvPosixTest, MultiReadIOUringError2) {
|
||||||
Status s = file->MultiRead(reqs.data(), reqs.size());
|
Status s = file->MultiRead(reqs.data(), reqs.size());
|
||||||
if (io_uring_submit_and_wait_called) {
|
if (io_uring_submit_and_wait_called) {
|
||||||
ASSERT_NOK(s);
|
ASSERT_NOK(s);
|
||||||
|
} else {
|
||||||
|
s.PermitUncheckedError();
|
||||||
}
|
}
|
||||||
|
|
||||||
ROCKSDB_NAMESPACE::SyncPoint::GetInstance()->DisableProcessing();
|
ROCKSDB_NAMESPACE::SyncPoint::GetInstance()->DisableProcessing();
|
||||||
|
|
Loading…
Reference in New Issue