mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2026-04-25 05:16:00 +03:00
[PR #1783] [MERGED] Add a test that is multi-block writing by one flush #2169
Labels
No labels
bug
bug
dataloss
duplicate
enhancement
feature request
help wanted
invalid
need info
performance
pull-request
question
question
testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/s3fs-fuse#2169
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/s3fs-fuse/s3fs-fuse/pull/1783
Author: @ggtakec
Created: 10/24/2021
Status: ✅ Merged
Merged: 10/25/2021
Merged by: @gaul
Base:
master← Head:add_multiblock_write_test📝 Commits (2)
1682a1dAdd a test that is multi-block writing by one flush36e3159Fixed parse_string function in write_multiblock.cc📊 Changes
3 files changed (+407 additions, -0 deletions)
View changed files
📝
test/Makefile.am(+3 -0)📝
test/integration-test-main.sh(+138 -0)➕
test/write_multiblock.cc(+266 -0)📄 Description
Relevant Issue (if applicable)
n/a
Details
Add new one test that writes multiple blocks.
This test checks for caches, multipart upload boundaries, copy uploads in the presence of blank areas, and more.
The current test may be sufficient, but I would like to use it to check if it works properly even if the logic changes in the future.
Each write block is separated by an area that does not write to each other.
And after doing these writes, it is flushed to the file only once.
(Flush does not occur every time a block is written, it is flushed after writing all blocks)
The test code looks like this(simple):
flushis called only once)And perform the above tests on newly created files and existing files.
For existing files, do not change the existing file size. (no truncate, write only inside the existing file size)
Multiple blocks are the following three blocks:
After writing is complete, if s3fs uses the cache directory, delete the cache files and compare files(
cmp).This is not a problem in the current code, but each write block is also a cross-border test with a minimum multipart size as the boundary.
About test sub program(
write_multiblock.cc):I tried to execute it with the dd command as follows, but since flush occurs after writing each block, I decided to use the test with C source.
If you can do the same on a script basis, I consider changing it.
So far, I could only do it by C base code.
(In the case of python, there is a problem that it is the file is always truncated)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.