-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add stress test for erofs #358
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Hongzhen Luo <[email protected]>
This adds test case 002. The previous stress test was only for empty files; this patch generates small files with random content. Signed-off-by: Hongzhen Luo <[email protected]>
Signed-off-by: Hongzhen Luo <[email protected]>
Signed-off-by: Hongzhen Luo <[email protected]>
Signed-off-by: Hongzhen Luo <[email protected]>
Signed-off-by: Hongzhen Luo <[email protected]>
Signed-off-by: Hongzhen Luo <[email protected]>
Signed-off-by: Hongzhen Luo <[email protected]>
To prepare for: 1. ontrol the overlap between the upper layer and lower layer 2. generate .wh.* Relevant tests will be added later. Signed-off-by: Hongzhen Luo <[email protected]>
Signed-off-by: Hongzhen Luo <[email protected]>
Add tests for cases where file and directory have the same name. Signed-off-by: Hongzhen Luo <[email protected]>
Add tests for deleting directories and files. Signed-off-by: Hongzhen Luo <[email protected]>
This test case is used to test the deletion of a directory/file first, followed by the creation of a directory/file with the same name. Signed-off-by: Hongzhen Luo <[email protected]>
erofs_stree_test requires root privileges to perform stress testing, so execute ctest as root. Signed-off-by: Hongzhen Luo <[email protected]>
items.emplace_back(cur + "/" + std::string(dent->d_name)); | ||
} while (dir->next()); | ||
} | ||
dir->closedir(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lack of stat judgement.
node = new StressNode(cur, NODE_REGULAR); | ||
if (!file || ! node) | ||
LOG_ERROR_RETURN(0, false, "fail to open file or node `", cur); | ||
ret = verify_gen_mod(node, file) && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it should check if the whole stat() equals.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change itself looks good to me, but it might be better to improve as I mentioned above.
What this PR does / why we need it:
Add stress testing for EROFS, including:
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #
Please check the following list: