diff --git a/containerd-shim/main.go b/containerd-shim/main.go index 50ed4617..6b59f4ee 100644 --- a/containerd-shim/main.go +++ b/containerd-shim/main.go @@ -156,7 +156,6 @@ func start(log *os.File) error { } } } - return nil } func writeInt(path string, i int) error { diff --git a/runtime/container.go b/runtime/container.go index 43351cab..a9677c4a 100644 --- a/runtime/container.go +++ b/runtime/container.go @@ -544,7 +544,6 @@ func (c *container) createCmd(ctx context.Context, pid string, cmd *exec.Cmd, p case err := <-ch: return err } - return nil } func hostIDFromMap(id uint32, mp []ocs.LinuxIDMapping) int { diff --git a/runtime/process.go b/runtime/process.go index 22d01927..2df67d95 100644 --- a/runtime/process.go +++ b/runtime/process.go @@ -233,7 +233,7 @@ func (p *process) updateExitStatusFile(status uint32) (uint32, error) { p.stateLock.Lock() p.state = Stopped p.stateLock.Unlock() - err := ioutil.WriteFile(filepath.Join(p.root, ExitStatusFile), []byte(fmt.Sprintf("%u", status)), 0644) + err := ioutil.WriteFile(filepath.Join(p.root, ExitStatusFile), []byte(fmt.Sprintf("%d", status)), 0644) return status, err } diff --git a/runtime/runtime_test.go b/runtime/runtime_test.go index 83e2e83b..98c8e4e8 100644 --- a/runtime/runtime_test.go +++ b/runtime/runtime_test.go @@ -157,7 +157,7 @@ func BenchmarkBusyboxSh(b *testing.B) { }) if err != nil { - b.Fatalf("Error creating a New container: ", err) + b.Fatalf("Error creating a New container: %v", err) } benchmarkStartContainer(b, c, s, bundleName) diff --git a/testutils/testutils.go b/testutils/testutils.go index 2feb0cc2..85e50a94 100644 --- a/testutils/testutils.go +++ b/testutils/testutils.go @@ -36,7 +36,7 @@ func untarRootfs(source string, destination string) error { rootfs := filepath.Join(destination, "rootfs") if err := os.MkdirAll(rootfs, 0755); err != nil { - fmt.Println("untarRootfs os.MkdirAll failed with err %v", err) + fmt.Printf("untarRootfs os.MkdirAll failed with err %v", err) return nil } tar := exec.Command("tar", "-C", rootfs, "-xf", source)