Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci/gha: add i386 unit test #2768

Merged
merged 2 commits into from
Feb 26, 2021
Merged

Conversation

kolyshkin
Copy link
Contributor

@kolyshkin kolyshkin commented Jan 26, 2021

Run unit tests on i386. This might help to uncover some issues in the code related to 32-bit arches.

Proposed changelog entry

@kolyshkin kolyshkin force-pushed the unit-386 branch 2 times, most recently from fdf653e to fa04b78 Compare January 26, 2021 20:45
@kolyshkin
Copy link
Contributor Author

TestNsenterValidPaths timeouts:

=== RUN   TestNsenterValidPaths
panic: test timed out after 3m0s

goroutine 20 [running]:
testing.(*M).startAlarm.func1()
	/opt/hostedtoolcache/go/1.15.6/x64/src/testing/testing.go:1618 +0xcb
created by time.goFunc
	/opt/hostedtoolcache/go/1.15.6/x64/src/time/sleep.go:167 +0x37

goroutine 1 [chan receive]:
testing.(*T).Run(0xa493340, 0x83e0855, 0x15, 0x83eec00, 0x402)
	/opt/hostedtoolcache/go/1.15.6/x64/src/testing/testing.go:1169 +0x230
testing.runTests.func1(0xa493260)
	/opt/hostedtoolcache/go/1.15.6/x64/src/testing/testing.go:1439 +0x5a
testing.tRunner(0xa493260, 0xa4b8eec)
	/opt/hostedtoolcache/go/1.15.6/x64/src/testing/testing.go:1123 +0xb7
testing.runTests(0xa49c450, 0x86246a0, 0x4, 0x4, 0x16c72f37, 0xbffc3e11, 0xe924f96a, 0x29, 0x8628840, 0x0)
	/opt/hostedtoolcache/go/1.15.6/x64/src/testing/testing.go:1437 +0x25a
testing.(*M).Run(0xa4c6140, 0x0)
	/opt/hostedtoolcache/go/1.15.6/x64/src/testing/testing.go:1345 +0x178
main.main()
	_testmain.go:49 +0x104

goroutine 19 [syscall]:
syscall.Syscall(0x3, 0x8, 0xa4f2400, 0x200, 0xa429500, 0xc, 0x0)
	/opt/hostedtoolcache/go/1.15.6/x64/src/syscall/asm_linux_386.s:19 +0x5
syscall.read(0x8, 0xa4f2400, 0x200, 0x200, 0x1052a4f, 0x800000, 0x0)
	/opt/hostedtoolcache/go/1.15.6/x64/src/syscall/zsyscall_linux_386.go:686 +0x49
syscall.Read(...)
	/opt/hostedtoolcache/go/1.15.6/x64/src/syscall/syscall_unix.go:187
internal/poll.(*FD).Read.func1(0x7ff, 0x2, 0xa491548)
	/opt/hostedtoolcache/go/1.15.6/x64/src/internal/poll/fd_unix.go:155 +0x3a
internal/poll.ignoringEINTR(0xa4b9e20, 0x72, 0xa4f2401, 0x0)
	/opt/hostedtoolcache/go/1.15.6/x64/src/internal/poll/fd_unix.go:567 +0x1d
internal/poll.(*FD).Read(0xa491540, 0xa4f2400, 0x200, 0x200, 0x0, 0x0, 0x0)
	/opt/hostedtoolcache/go/1.15.6/x64/src/internal/poll/fd_unix.go:155 +0x11f
os.(*File).read(...)
	/opt/hostedtoolcache/go/1.15.6/x64/src/os/file_posix.go:31
os.(*File).Read(0xa482cc0, 0xa4f2400, 0x200, 0x200, 0x83a20a0, 0xa49c490, 0x0)
	/opt/hostedtoolcache/go/1.15.6/x64/src/os/file.go:116 +0x58
encoding/json.(*Decoder).refill(0xa4d4480, 0xf7fb8ce8, 0x4)
	/opt/hostedtoolcache/go/1.15.6/x64/src/encoding/json/stream.go:165 +0xe8
encoding/json.(*Decoder).readValue(0xa4d4480, 0x0, 0x0, 0x0)
	/opt/hostedtoolcache/go/1.15.6/x64/src/encoding/json/stream.go:140 +0x1d8
encoding/json.(*Decoder).Decode(0xa4d4480, 0x8353180, 0xa482d10, 0xa487fa0, 0x0)
	/opt/hostedtoolcache/go/1.15.6/x64/src/encoding/json/stream.go:63 +0x65
github.com/opencontainers/runc/libcontainer/nsenter.TestNsenterValidPaths(0xa493340)
	/home/runner/work/runc/runc/libcontainer/nsenter/nsenter_test.go:71 +0x650
testing.tRunner(0xa493340, 0x83eec00)
	/opt/hostedtoolcache/go/1.15.6/x64/src/testing/testing.go:1123 +0xb7
created by testing.(*T).Run
	/opt/hostedtoolcache/go/1.15.6/x64/src/testing/testing.go:1168 +0x211
FAIL	github.com/opencontainers/runc/libcontainer/nsenter	180.013s

.github/workflows/test.yml Outdated Show resolved Hide resolved
@kolyshkin kolyshkin force-pushed the unit-386 branch 4 times, most recently from 7553ee7 to bfacf7f Compare February 2, 2021 21:00
@kolyshkin kolyshkin changed the title [WIP] ci: add i386 unit test run [WIP] ci: add i386 unit test Feb 2, 2021
@kolyshkin kolyshkin force-pushed the unit-386 branch 7 times, most recently from 46813dd to 3ffcc1c Compare February 2, 2021 23:06
@kolyshkin
Copy link
Contributor Author

It's up and running now, and uncovered a set of issues: #2783

@kolyshkin kolyshkin force-pushed the unit-386 branch 2 times, most recently from bd980ea to 47a9649 Compare February 3, 2021 00:34
@kolyshkin
Copy link
Contributor Author

OK, it's working now.

@kolyshkin kolyshkin changed the title [WIP] ci: add i386 unit test [DNM] ci: add i386 unit test Feb 3, 2021
@cyphar cyphar added this to the 1.0.0-rc94 milestone Feb 3, 2021
@kolyshkin
Copy link
Contributor Author

Depend on #2741, waiting for it to be merged.

This test fails to compile on i386:

> libcontainer/seccomp/patchbpf/enosys_linux_test.go:180:20: constant 3735928559 overflows int
> libcontainer/seccomp/patchbpf/enosys_linux_test.go:204:19: constant 3735928559 overflows int
> libcontainer/seccomp/patchbpf/enosys_linux_test.go:227:25: constant 3735928559 overflows int

This is because golang.org/x/net/bpf returns an int from their emulated
BPF VM implementation when they should really be returning uint32.

Fix by switching to uint32 in the test code.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
@kolyshkin kolyshkin changed the title [DNM] ci: add i386 unit test ci/gha: add i386 unit test Feb 5, 2021
@kolyshkin kolyshkin marked this pull request as ready for review February 5, 2021 19:51
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
@kolyshkin
Copy link
Contributor Author

Failure in centos is a flake (#2760); restarted.

@kolyshkin kolyshkin merged commit 1820c42 into opencontainers:master Feb 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants