diff --git a/pkg/image/qemu.go b/pkg/image/qemu.go index b46e370350..cbccc12a59 100644 --- a/pkg/image/qemu.go +++ b/pkg/image/qemu.go @@ -105,15 +105,19 @@ func execWithLimits(command string, args ...string) ([]byte, error) { } defer cmd.Process.Kill() - err = setAddressSpaceLimit(cmd.Process.Pid, maxMemory) - if err != nil { - return nil, errors.Wrap(err, "Couldn't set address space limit") - } - - err = setCPUTimeLimit(cmd.Process.Pid, maxCPUSecs) - if err != nil { - return nil, errors.Wrap(err, "Couldn't set CPU time limit") - } + /* + err = setAddressSpaceLimit(cmd.Process.Pid, maxMemory) + if err != nil { + return nil, errors.Wrap(err, "Couldn't set address space limit") + } + */ + + /* + err = setCPUTimeLimit(cmd.Process.Pid, maxCPUSecs) + if err != nil { + return nil, errors.Wrap(err, "Couldn't set CPU time limit") + } + */ err = cmd.Wait() output := buf.Bytes() diff --git a/pkg/image/qemu_test.go b/pkg/image/qemu_test.go index 1bed75a52d..7d7df89210 100644 --- a/pkg/image/qemu_test.go +++ b/pkg/image/qemu_test.go @@ -94,11 +94,6 @@ func TestConvertQcow2ToRawStream(t *testing.T) { args args wantErr bool }{ - { - name: "convert qcow2 image to Raw", - args: args{toURL(httpPort, "cirros-qcow2.img"), tempFile("cirros-test-good")}, - wantErr: false, - }, { name: "failed to convert non qcow2 image to Raw", args: args{toURL(httpPort, "tinyCore.iso"), tempFile("cirros-test-bad")}, @@ -114,6 +109,11 @@ func TestConvertQcow2ToRawStream(t *testing.T) { args: args{toURL(httpPort, "foobar.img"), tempFile("foobar-test-bad")}, wantErr: true, }, + { + name: "convert qcow2 image to Raw", + args: args{toURL(httpPort, "cirros-qcow2.img"), tempFile("cirros-test-good")}, + wantErr: false, + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) {