Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
levy5307 committed Jul 8, 2020
1 parent f62eb69 commit 334fde0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/aio/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ set(MY_BINPLACES
"${CMAKE_CURRENT_SOURCE_DIR}/config.ini"
"${CMAKE_CURRENT_SOURCE_DIR}/clear.sh"
"${CMAKE_CURRENT_SOURCE_DIR}/run.sh"
"${CMAKE_CURRENT_SOURCE_DIR}/command.txt"
"${CMAKE_CURRENT_SOURCE_DIR}/copy_source.txt"
)

dsn_add_test()
8 changes: 4 additions & 4 deletions src/aio/tests/aio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,12 @@ struct aio_result
TEST(core, dsn_file)
{
int64_t fin_size, fout_size;
ASSERT_TRUE(utils::filesystem::file_size("command.txt", fin_size));
ASSERT_TRUE(utils::filesystem::file_size("copy_source.txt", fin_size));
ASSERT_LT(0, fin_size);

dsn::disk_file *fin = file::open("command.txt", O_RDONLY, 0);
dsn::disk_file *fin = file::open("copy_source.txt", O_RDONLY, 0);
ASSERT_NE(nullptr, fin);
dsn::disk_file *fout = file::open("command.copy.txt", O_RDWR | O_CREAT | O_TRUNC, 0666);
dsn::disk_file *fout = file::open("copy_dest.txt", O_RDWR | O_CREAT | O_TRUNC, 0666);
ASSERT_NE(nullptr, fout);
char buffer[1024];
uint64_t offset = 0;
Expand Down Expand Up @@ -268,6 +268,6 @@ TEST(core, dsn_file)
ASSERT_EQ(ERR_OK, file::close(fout));
ASSERT_EQ(ERR_OK, file::close(fin));

ASSERT_TRUE(utils::filesystem::file_size("command.copy.txt", fout_size));
ASSERT_TRUE(utils::filesystem::file_size("copy_dest.txt", fout_size));
ASSERT_EQ(fin_size, fout_size);
}
2 changes: 1 addition & 1 deletion src/aio/tests/clear.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh

rm -rf data dsn_aio_test.xml command.copy.txt
rm -rf data dsn_aio_test.xml copy_dest.txt
File renamed without changes.

0 comments on commit 334fde0

Please sign in to comment.