Skip to content

[release/1.0] services/content: fix reading a blob which is smaller than the read buffer#2234

Merged
stevvooe merged 2 commits intocontainerd:release/1.0from
AkihiroSuda:cherry-pick-2221
Mar 27, 2018
Merged

[release/1.0] services/content: fix reading a blob which is smaller than the read buffer#2234
stevvooe merged 2 commits intocontainerd:release/1.0from
AkihiroSuda:cherry-pick-2221

Conversation

@AkihiroSuda
Copy link
Copy Markdown
Member

cherry-pick #2221

…uffer.

The newly added test fails without this fix in services/content/service.go:

    $ go test -c . && sudo ./containerd.test -test.v -test.root -test.run TestContentClient
    ...
        --- FAIL: TestContentClient/SmallBlob (0.02s)
            provideringester.go:62: rpc error: code = OutOfRange desc = read
    past object length 6 bytes
            helpers.go:67: drwx------       4096
    /tmp/content-suite-ContentClient-286788688
    FAIL

Signed-off-by: Akihiro Suda <[email protected]>
@AkihiroSuda AkihiroSuda changed the base branch from master to release/1.0 March 27, 2018 03:20
@AkihiroSuda AkihiroSuda added this to the 1.0.3 milestone Mar 27, 2018
@codecov-io
Copy link
Copy Markdown

Codecov Report

Merging #2234 into release/1.0 will increase coverage by 0.22%.
The diff coverage is n/a.

Impacted file tree graph

@@               Coverage Diff               @@
##           release/1.0    #2234      +/-   ##
===============================================
+ Coverage        50.55%   50.78%   +0.22%     
===============================================
  Files               81       81              
  Lines             7176     7176              
===============================================
+ Hits              3628     3644      +16     
+ Misses            2853     2832      -21     
- Partials           695      700       +5
Flag Coverage Δ
#linux 50.78% <ø> (+0.22%) ⬆️
Impacted Files Coverage Δ
content/local/store.go 56.29% <0%> (+1.65%) ⬆️
metadata/content.go 39.18% <0%> (+2.04%) ⬆️
content/local/readerat.go 66.66% <0%> (+66.66%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 21e89eb...eaee9f5. Read the comment docs.

Copy link
Copy Markdown
Member

@estesp estesp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@stevvooe
Copy link
Copy Markdown
Member

LGTM

@stevvooe stevvooe merged commit bde0036 into containerd:release/1.0 Mar 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants