Add unit test for pax-header tar and clean up - #353
Merged
Conversation
Return an error code when encountering a bad map file. Signed-off-by: Hongzhen Luo <hongzhen@linux.alibaba.com>
hsiangkao
reviewed
Nov 14, 2024
| protected: | ||
| photon::fs::IFileSystem *host_fs; | ||
| std::string workdir = "/tmp/pax_test"; | ||
| std::string src_url = "https://github.com/salvete/erofs-imgs/raw/main/pax.tar"; |
Member
There was a problem hiding this comment.
Can we just keep gzipped data in the testcase itself so that it won't rely on the network?
see https://github.com/containerd/overlaybd/pull/353/files#diff-eb6cf39198971c1db93f32d0f8bcb91f32e5cc73dd97fb29585bfe40ea90a2c8L198
Member
Author
There was a problem hiding this comment.
OK, I will give it a try.
hsiangkao
reviewed
Nov 14, 2024
| delete sha256_f, sha256file; | ||
| } | ||
|
|
||
|
|
hsiangkao
reviewed
Nov 14, 2024
|
|
||
| TEST_F(ErofsPax, pax_test) { | ||
|
|
||
| unsigned char tar_zipped[3149] = { |
hsiangkao
reviewed
Nov 14, 2024
| DEFER((void)inflateEnd(&strm)); | ||
| strm.avail_in = size; | ||
| strm.next_in = data; | ||
| //int fd = open(std::string(workdir + "/test.tar").c_str(), O_WRONLY | O_TRUNC | O_CREAT, 0644); |
salvete
force-pushed
the
main
branch
2 times, most recently
from
November 16, 2024 09:02
61be8f9 to
b52ee4b
Compare
Signed-off-by: Hongzhen Luo <hongzhen@linux.alibaba.com>
Member
|
LGTM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
Test results using the old version of liberofs:

Test results using the latest version of liberofs:

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: