Skip to content
This repository has been archived by the owner on May 8, 2024. It is now read-only.

Support for OpenBSD / NetBSD #211

Closed
nbyavuz opened this issue Feb 16, 2022 · 1 comment · Fixed by #212
Closed

Support for OpenBSD / NetBSD #211

nbyavuz opened this issue Feb 16, 2022 · 1 comment · Fixed by #212
Assignees

Comments

@nbyavuz
Copy link

nbyavuz commented Feb 16, 2022

Hi,

I am trying to install agent on both OpenBSD / NetBSD (cirruslabs/cirrus-ci-docs#970). Right now agent's tests are failing with:

On OpenBSD:

?   	github.com/cirruslabs/cirrus-ci-agent/api	[no test files]
# github.com/mitchellh/go-ps
../go/pkg/mod/github.com/mitchellh/go-ps@v1.0.0/process.go:31:9: undefined: processes
../go/pkg/mod/github.com/mitchellh/go-ps@v1.0.0/process.go:39:9: undefined: findProcess
ok  	github.com/cirruslabs/cirrus-ci-agent/cmd/agent	(cached)
?   	github.com/cirruslabs/cirrus-ci-agent/cmd/metrics	[no test files]
ok  	github.com/cirruslabs/cirrus-ci-agent/internal/cirrusenv	(cached)
?   	github.com/cirruslabs/cirrus-ci-agent/internal/client	[no test files]
FAIL	github.com/cirruslabs/cirrus-ci-agent/internal/executor [build failed]
--- FAIL: TestMetrics (0.00s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x875e04]

goroutine 6 [running]:
testing.tRunner.func1.2({0x8da540, 0xd30290})
	/usr/local/go/src/testing/testing.go:1209 +0x339
testing.tRunner.func1(0xc000091a00)
	/usr/local/go/src/testing/testing.go:1212 +0x256
panic({0x8da540, 0xd30290})
	/usr/local/go/src/runtime/panic.go:1038 +0x25b
github.com/cirruslabs/cirrus-ci-agent/internal/executor/metrics_test.TestMetrics(0xc000091a00)
	/home/postgres/cirrus-ci-agent/internal/executor/metrics/metrics_test.go:20 +0xe4
testing.tRunner(0xc000091a00, 0x988b18)
	/usr/local/go/src/testing/testing.go:1259 +0x102
created by testing.(*T).Run
	/usr/local/go/src/testing/testing.go:1306 +0x3ab
FAIL	github.com/cirruslabs/cirrus-ci-agent/internal/executor/metrics	0.075s
?   	github.com/cirruslabs/cirrus-ci-agent/internal/executor/metrics/source	[no test files]
?   	github.com/cirruslabs/cirrus-ci-agent/internal/executor/metrics/source/cgroup	[no test files]
?   	github.com/cirruslabs/cirrus-ci-agent/internal/executor/metrics/source/cgroup/cpu	[no test files]
?   	github.com/cirruslabs/cirrus-ci-agent/internal/executor/metrics/source/cgroup/memory	[no test files]
ok  	github.com/cirruslabs/cirrus-ci-agent/internal/executor/metrics/source/cgroup/parser	(cached)
?   	github.com/cirruslabs/cirrus-ci-agent/internal/executor/metrics/source/cgroup/resolver	[no test files]
?   	github.com/cirruslabs/cirrus-ci-agent/internal/executor/metrics/source/cgroup/subsystem	[no test files]
?   	github.com/cirruslabs/cirrus-ci-agent/internal/executor/metrics/source/system	[no test files]
?   	github.com/cirruslabs/cirrus-ci-agent/internal/executor/piper	[no test files]
?   	github.com/cirruslabs/cirrus-ci-agent/internal/executor/processdumper	[no test files]
ok  	github.com/cirruslabs/cirrus-ci-agent/internal/executor/terminalwrapper	(cached)
?   	github.com/cirruslabs/cirrus-ci-agent/internal/executor/updatebatcher	[no test files]
ok  	github.com/cirruslabs/cirrus-ci-agent/internal/hasher	(cached)
?   	github.com/cirruslabs/cirrus-ci-agent/internal/http_cache	[no test files]
ok  	github.com/cirruslabs/cirrus-ci-agent/internal/network	(cached)
?   	github.com/cirruslabs/cirrus-ci-agent/internal/shellwords	[no test files]
?   	github.com/cirruslabs/cirrus-ci-agent/internal/signalfilter	[no test files]
ok  	github.com/cirruslabs/cirrus-ci-agent/internal/targz	(cached)
?   	github.com/cirruslabs/cirrus-ci-agent/internal/testutil	[no test files]
ok  	github.com/cirruslabs/cirrus-ci-agent/pkg/grpchelper	(cached)
FAIL

On NetBSD:

# github.com/mitchellh/go-ps
../go/pkg/mod/github.com/mitchellh/go-ps@v1.0.0/process.go:31:9: undefined: processes
../go/pkg/mod/github.com/mitchellh/go-ps@v1.0.0/process.go:39:9: undefined: findProcess
?       github.com/cirruslabs/cirrus-ci-agent/api       [no test files]
ok      github.com/cirruslabs/cirrus-ci-agent/cmd/agent (cached)
?       github.com/cirruslabs/cirrus-ci-agent/cmd/metrics       [no test files]
ok      github.com/cirruslabs/cirrus-ci-agent/internal/cirrusenv        (cached)
?       github.com/cirruslabs/cirrus-ci-agent/internal/client   [no test files]
FAIL    github.com/cirruslabs/cirrus-ci-agent/internal/executor [build failed]
Error #0: failed to query CPU usage using gopsutil on netbsd/amd64: not implemented yet
Error #1: failed to query memory usage using gopsutil on netbsd/amd64: not implemented yet
--- FAIL: TestMetrics (4.52s)
    metrics_test.go:23: 
                Error Trace:    metrics_test.go:23
                Error:          Should be empty, but was [failed to query CPU usage using gopsutil on netbsd/amd64: not implemented yet failed to query memory usage using gopsutil on netbsd/amd64: not implemented yet]
                Test:           TestMetrics
                Messages:       we should never get errors here, but got 2
FAIL
FAIL    github.com/cirruslabs/cirrus-ci-agent/internal/executor/metrics 4.529s
?       github.com/cirruslabs/cirrus-ci-agent/internal/executor/metrics/source  [no test files]
?       github.com/cirruslabs/cirrus-ci-agent/internal/executor/metrics/source/cgroup   [no test files]
?       github.com/cirruslabs/cirrus-ci-agent/internal/executor/metrics/source/cgroup/cpu       [no test files]
?       github.com/cirruslabs/cirrus-ci-agent/internal/executor/metrics/source/cgroup/memory    [no test files]
ok      github.com/cirruslabs/cirrus-ci-agent/internal/executor/metrics/source/cgroup/parser    (cached)
?       github.com/cirruslabs/cirrus-ci-agent/internal/executor/metrics/source/cgroup/resolver  [no test files]
?       github.com/cirruslabs/cirrus-ci-agent/internal/executor/metrics/source/cgroup/subsystem [no test files]
?       github.com/cirruslabs/cirrus-ci-agent/internal/executor/metrics/source/system   [no test files]
?       github.com/cirruslabs/cirrus-ci-agent/internal/executor/piper   [no test files]
?       github.com/cirruslabs/cirrus-ci-agent/internal/executor/processdumper   [no test files]
ok      github.com/cirruslabs/cirrus-ci-agent/internal/executor/terminalwrapper (cached)
?       github.com/cirruslabs/cirrus-ci-agent/internal/executor/updatebatcher   [no test files]
ok      github.com/cirruslabs/cirrus-ci-agent/internal/hasher   (cached)
?       github.com/cirruslabs/cirrus-ci-agent/internal/http_cache       [no test files]
ok      github.com/cirruslabs/cirrus-ci-agent/internal/network  (cached)
?       github.com/cirruslabs/cirrus-ci-agent/internal/shellwords       [no test files]
?       github.com/cirruslabs/cirrus-ci-agent/internal/signalfilter     [no test files]
ok      github.com/cirruslabs/cirrus-ci-agent/internal/targz    (cached)
?       github.com/cirruslabs/cirrus-ci-agent/internal/testutil [no test files]
ok      github.com/cirruslabs/cirrus-ci-agent/pkg/grpchelper    (cached)
FAIL

Could you add a support for OpenBSD / NetBSD?

Thanks!

@edigaryev
Copy link
Contributor

Hi, thanks for reporting this!

Check out the new 1.73.2 release, it contains changes from #210 and ships {Open,Net}BSD binaries.

As for the tests, I'll fix them shortly.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants