go-coap
go-coap copied to clipboard
TestServerDiscover/valid_first_interface in upd/server_test.go fails on newly cloned repo
In prep for creating a PR, I was following the advice in https://github.com/plgd-dev/go-coap#contributing.
The docker build command seems to have been successful. I did see these errors, but they are related to update-golang.sh
:
update-golang.sh: /usr/local/go/bin/go version FAIL
update-golang.sh: /usr/local/go/bin/go run /update-golang/.go FAIL
Here's the output from running the tests using the docker run
command from the README:
(master=)$ docker run --mount type=bind,source="$(pwd)",target=/shared,readonly --network=host go-coap:build go test './...'
? github.com/plgd-dev/go-coap/v2 [no test files]
ok github.com/plgd-dev/go-coap/v2/dtls 9.054s
ok github.com/plgd-dev/go-coap/v2/examples/dtls/pki 0.006s
? github.com/plgd-dev/go-coap/v2/examples/dtls/pki/client [no test files]
? github.com/plgd-dev/go-coap/v2/examples/dtls/pki/server [no test files]
? github.com/plgd-dev/go-coap/v2/examples/dtls/psk/client [no test files]
? github.com/plgd-dev/go-coap/v2/examples/dtls/psk/server [no test files]
? github.com/plgd-dev/go-coap/v2/examples/mcast/client [no test files]
? github.com/plgd-dev/go-coap/v2/examples/mcast/server [no test files]
? github.com/plgd-dev/go-coap/v2/examples/observe/client [no test files]
? github.com/plgd-dev/go-coap/v2/examples/observe/server [no test files]
? github.com/plgd-dev/go-coap/v2/examples/simple/client [no test files]
? github.com/plgd-dev/go-coap/v2/examples/simple/server [no test files]
ok github.com/plgd-dev/go-coap/v2/message 0.046s
ok github.com/plgd-dev/go-coap/v2/message/codes 0.003s
ok github.com/plgd-dev/go-coap/v2/message/noresponse 0.002s
ok github.com/plgd-dev/go-coap/v2/message/pool 0.005s
? github.com/plgd-dev/go-coap/v2/message/status [no test files]
ok github.com/plgd-dev/go-coap/v2/mux 0.003s
ok github.com/plgd-dev/go-coap/v2/net 1.408s
ok github.com/plgd-dev/go-coap/v2/net/blockwise 0.086s
? github.com/plgd-dev/go-coap/v2/net/monitor/inactivity [no test files]
ok github.com/plgd-dev/go-coap/v2/net/observation 0.002s
? github.com/plgd-dev/go-coap/v2/pkg/cache [no test files]
? github.com/plgd-dev/go-coap/v2/pkg/connections [no test files]
? github.com/plgd-dev/go-coap/v2/pkg/runner/periodic [no test files]
ok github.com/plgd-dev/go-coap/v2/tcp 7.015s
ok github.com/plgd-dev/go-coap/v2/tcp/message 0.002s
ok github.com/plgd-dev/go-coap/v2/tcp/message/pool 0.003s
? github.com/plgd-dev/go-coap/v2/test/net [no test files]
udp: handleReceivedMessage(Type: Confirmable, MID: 50054, Code: BadRequest, Token: 2e399c4fa67d9fdb, ContentFormat: text/plain;charset=utf-8): cannot request body without paired request
udp: continueSendingMessage(Type: Acknowledgement, MID: 50054, Code: Code(136), Token: 2e399c4fa67d9fdb): cannot get Block2 option: option not found
--- FAIL: TestServerDiscover (1.50s)
--- FAIL: TestServerDiscover/valid_first_interface (0.50s)
server_test.go:190:
Error Trace: server_test.go:190
Error: "0" is not greater than "0"
Test: TestServerDiscover/valid_first_interface
FAIL
FAIL github.com/plgd-dev/go-coap/v2/udp 9.105s
ok github.com/plgd-dev/go-coap/v2/udp/client 1.444s
ok github.com/plgd-dev/go-coap/v2/udp/message 0.003s
ok github.com/plgd-dev/go-coap/v2/udp/message/pool 0.004s
FAIL
Here's some info about my local environment. Happy to provide additional if it's useful:
$ uname -a
Linux borg 5.18.3-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 09 Jun 2022 16:14:10 +0000 x86_64 GNU/Linux
$ docker info
Client:
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc., v0.8.2-docker)
compose: Docker Compose (Docker Inc., 2.6.0)
Server:
Containers: 3
Running: 1
Paused: 0
Stopped: 2
Images: 10
Server Version: 20.10.17
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: false
userxattr: false
Logging Driver: json-file
Cgroup Driver: systemd
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 10c12954828e7c7c9b6e0ea9b0c02b01407d3ae1.m
runc version:
init version: de40ad0
Security Options:
seccomp
Profile: default
cgroupns
Kernel Version: 5.18.3-arch1-1
Operating System: Arch Linux
OSType: linux
Architecture: x86_64
CPUs: 20
Total Memory: 31.05GiB
Name: borg
ID: MXWT:TAZY:EF5B:2QKP:CAE3:TE57:GGL4:N6V3:J7BN:S4IY:VBDI:JZAC
Docker Root Dir: /var/lib/docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Hi @tim-golioth, I've checked the failing test and my first idea is that you have some network interface that the test doesn't account for. I've added some diagnostic logs that prints interfaces at the start of the test, could you please checkout the branch adam/bugfix/340, rerun the tests in your environment and copy&paste here the output?
Closing because of 3+months without reply, please reopen if this reoccurs.