Skip to content

Commit

Permalink
Create test for broken lz4 legacy compressor
Browse files Browse the repository at this point in the history
Issue #117
  • Loading branch information
anatol committed Feb 20, 2022
1 parent 00cae55 commit 615037e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion generator/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/google/renameio v1.0.1
github.com/jessevdk/go-flags v1.5.0
github.com/klauspost/compress v1.14.3
github.com/pierrec/lz4/v4 v4.1.14
github.com/pierrec/lz4/v4 v4.1.15-0.20220212190856-bc1239ba9073
github.com/stretchr/testify v1.7.0
github.com/ulikunitz/xz v0.5.10
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8
Expand Down
4 changes: 2 additions & 2 deletions generator/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ github.com/jessevdk/go-flags v1.5.0 h1:1jKYvbxEjfUl0fmqTCOfonvskHHXMjBySTLW4y9LF
github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4=
github.com/klauspost/compress v1.14.3 h1:DQv1WP+iS4srNjibdnHtqu8JNWCDMluj5NzPnFJsnvk=
github.com/klauspost/compress v1.14.3/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk=
github.com/pierrec/lz4/v4 v4.1.14 h1:+fL8AQEZtz/ijeNnpduH0bROTu0O3NZAlPjQxGn8LwE=
github.com/pierrec/lz4/v4 v4.1.14/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=
github.com/pierrec/lz4/v4 v4.1.15-0.20220212190856-bc1239ba9073 h1:ttbN8g6bKEufjaBwMwqPs4txLXxV3njCrpWkGT8f7CY=
github.com/pierrec/lz4/v4 v4.1.15-0.20220212190856-bc1239ba9073/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
Expand Down
14 changes: 14 additions & 0 deletions tests/compression_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,17 @@ func TestLz4ImageCompression(t *testing.T) {

require.NoError(t, vm.ConsoleExpect("Hello, booster!"))
}

// Tests for https://github.com/anatol/booster/issues/117
func TestLargeLz4ImageCompression(t *testing.T) {
vm, err := buildVmInstance(t, Opts{
compression: "lz4",
modules: "nvidia,nvidia_modeset,nvidia_drm,nvidia_uvm,amdgpu",
disk: "assets/ext4.img",
kernelArgs: []string{"root=UUID=5c92fc66-7315-408b-b652-176dc554d370"},
})
require.NoError(t, err)
defer vm.Shutdown()

require.NoError(t, vm.ConsoleExpect("Hello, booster!"))
}

0 comments on commit 615037e

Please sign in to comment.