Skip to content

Commit 45de9eb

Browse files
committed
Fix up opengcs CI issues/remove ginkgo from Makefile
We're not using ginkgo for any of our tests anymore (that I can see) so for Makefile test just swap to running every test in /internal/guest which comprises (mostly) all of the Linux specific guest features. This commit also adds linter tags to a couple things to fix up deadcode warnings as well as fixes a casing mistake on the setSubreaper function in /internal/guest/runtime/runc/runc.go Signed-off-by: Daniel Canter <dcanter@microsoft.com>
1 parent 6eb45b1 commit 45de9eb

File tree

6 files changed

+5
-13
lines changed

6 files changed

+5
-13
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,6 @@ jobs:
9797
with:
9898
go-version: '^1.15.0'
9999

100-
- name: Install ginkgo
101-
run: |
102-
go get github.com/onsi/ginkgo/ginkgo
103-
104-
- name: Turn off goproxy
105-
run: |
106-
GOPROXY=off
107-
108100
- name: Pull busybox image
109101
run: docker pull busybox
110102

Makefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ clean:
2929
rm -rf bin deps rootfs out
3030

3131
test:
32-
cd $(SRCROOT) && go test ./service/gcsutils/...
33-
cd $(SRCROOT) && go test ./...
34-
cd $(SRCROOT)/cmd/gcs && ginkgo -r -keepGoing
32+
cd $(SRCROOT) && go test ./internal/guest/...
3533

3634
out/delta.tar.gz: bin/init bin/vsockexec bin/cmd/gcs bin/cmd/gcstools Makefile
3735
@mkdir -p out

internal/guest/gcserr/errors.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ func (e *wrappingHresultError) Format(s fmt.State, verb rune) {
106106
}
107107
fallthrough
108108
case 's':
109-
io.WriteString(s, e.Error())
109+
_, _ = io.WriteString(s, e.Error())
110110
case 'q':
111111
fmt.Fprintf(s, "%q", e.Error())
112112
}

internal/guest/prot/protocol.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import (
2626
// III - 12 Bits Message Id
2727
// VV - 8 Bits Version
2828

29+
//nolint:deadcode,varcheck
2930
const (
3031
messageTypeMask = 0xF0000000
3132
messageCategoryMask = 0x0FF00000

internal/guest/runtime/runc/runc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const (
3030
initPidFilename = "initpid"
3131
)
3232

33-
func setSubReaper(i int) error {
33+
func setSubreaper(i int) error {
3434
return unix.Prctl(unix.PR_SET_CHILD_SUBREAPER, uintptr(i), 0, 0, 0)
3535
}
3636

internal/guest/transport/vsock.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
"github.com/sirupsen/logrus"
1111
)
1212

13+
//nolint:deadcode,varcheck
1314
const (
1415
vmaddrCidHost = 2
1516
vmaddrCidAny = 0xffffffff

0 commit comments

Comments
 (0)