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

Conversion from int64 to string yields a string of one rune in mail/envelope.go and bad conf. for response and testcert tests (gollvm; Ubuntu 20.04.1) #218

Open
advancedwebdeveloper opened this issue Oct 18, 2020 · 3 comments

Comments

@advancedwebdeveloper
Copy link

Hi there.

I wasn't able to run some of your tests:

$ go test ./...

_/home/oceanfish81/go-guerrilla/mail

mail/envelope.go:163:42: conversion from int64 to string yields a string of one rune, not a string of digits (did you mean fmt.Sprint(x)?)
mail/envelope.go:163:68: conversion from uint64 to string yields a string of one rune, not a string of digits (did you mean fmt.Sprint(x)?)
ok _/home/oceanfish81/go-guerrilla 32.565s
ok _/home/oceanfish81/go-guerrilla/backends 0.514s
? _/home/oceanfish81/go-guerrilla/backends/storage/redigo [no test files]
panic: send on closed channel

goroutine 36 [running]:
guerrilla.func2
/home/oceanfish81/go/src/github.com/flashmob/go-guerrilla/guerrilla.go:476
created by github.x2ecom..z2fflashmob..z2fgo..z2dguerrilla.guerrilla.Start
/home/oceanfish81/go/src/github.com/flashmob/go-guerrilla/guerrilla.go:473 +0x3d5
FAIL _/home/oceanfish81/go-guerrilla/cmd/guerrillad 1.197s
? _/home/oceanfish81/go-guerrilla/log [no test files]
FAIL _/home/oceanfish81/go-guerrilla/mail [build failed]
ok _/home/oceanfish81/go-guerrilla/mail/encoding 0.395s
ok _/home/oceanfish81/go-guerrilla/mail/iconv 0.406s
ok _/home/oceanfish81/go-guerrilla/mail/rfc5321 0.587s
? _/home/oceanfish81/go-guerrilla/mocks [no test files]
ok _/home/oceanfish81/go-guerrilla/response 0.426s
--- FAIL: TestStart (1.08s)
guerrilla_test.go:200: Server did not listen on 127.0.0.1:4654
guerrilla_test.go:203: Server did not listen on 127.0.0.1:2526
guerrilla_test.go:206: Server did not wait on 127.0.0.1:4654
guerrilla_test.go:209: Server did not wait on 127.0.0.1:2526
FAIL
FAIL _/home/oceanfish81/go-guerrilla/tests 5.621s
? _/home/oceanfish81/go-guerrilla/tests/testcert [no test files]
FAIL

I am using

$ go version
go version go1.15.2 gollvm LLVM 12.0.0git linux/amd64

and here is my environment:

$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/oceanfish81/.cache/go-build"
GOENV="/home/oceanfish81/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/oceanfish81/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/oceanfish81/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/oceanfish81/gollvm_dist"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/oceanfish81/gollvm_dist/tools"
GCCGO="/home/oceanfish81/gollvm_dist/bin/llvm-goc"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build941428382=/tmp/go-build -gno-record-gcc-switches -funwind-tables"

@advancedwebdeveloper advancedwebdeveloper changed the title Some tests aren't passing. Conversion from int64 to string yields a string of one rune, not a string of digits in mail/envelope.go and misconfigured response and testcert tests (gollvm; Ubuntu 20.04.1) Conversion from int64 to string yields a string of one rune, not a string of digits in mail/envelope.go and misconfigured response and testcert tests (gollvm; Ubuntu 20.04.1) Oct 18, 2020
@advancedwebdeveloper advancedwebdeveloper changed the title Conversion from int64 to string yields a string of one rune, not a string of digits in mail/envelope.go and misconfigured response and testcert tests (gollvm; Ubuntu 20.04.1) Conversion from int64 to string yields a string of one rune in mail/envelope.go and bad conf. for response and testcert tests (gollvm; Ubuntu 20.04.1) Oct 18, 2020
@advancedwebdeveloper
Copy link
Author

I just found this, as well:

$ make testrace
go test -v . -race

golang.org/x/sys/unix

../go/src/golang.org/x/sys/unix/race.go:17:10: error: reference to undefined identifier 'runtime.RaceAcquire'
../go/src/golang.org/x/sys/unix/race.go:21:10: error: reference to undefined identifier 'runtime.RaceReleaseMerge'
../go/src/golang.org/x/sys/unix/race.go:25:10: error: reference to undefined identifier 'runtime.RaceReadRange'
../go/src/golang.org/x/sys/unix/race.go:29:10: error: reference to undefined identifier 'runtime.RaceWriteRange'
FAIL _/home/oceanfish81/go-guerrilla [build failed]
FAIL
make: *** [Makefile:39: testrace] Error 2

@advancedwebdeveloper
Copy link
Author

Just for being straightforward:

$ make test
go test -v .
=== RUN TestSMTP
time="2020-10-18T16:00:51+03:00" level=debug msg="making servers"
time="2020-10-18T16:00:51+03:00" level=info msg="Starting: 127.0.0.1:2525"
time="2020-10-18T16:00:51+03:00" level=info msg="processing worker started (#1)"
time="2020-10-18T16:00:51+03:00" level=info msg="Listening on TCP 127.0.0.1:2525"
time="2020-10-18T16:00:51+03:00" level=debug msg="[127.0.0.1:2525] Waiting for a new client. Next Client ID: 1"
time="2020-10-18T16:00:51+03:00" level=info msg="main log configured to stderr"
time="2020-10-18T16:00:53+03:00" level=info msg="Server [127.0.0.1:2525] has stopped accepting new clients"
time="2020-10-18T16:00:53+03:00" level=info msg="shutting down pool [127.0.0.1:2525]"
time="2020-10-18T16:00:53+03:00" level=info msg="shutdown completed for [127.0.0.1:2525]"
time="2020-10-18T16:00:53+03:00" level=info msg="stop signal for worker (#1)"
time="2020-10-18T16:00:53+03:00" level=info msg="Backend shutdown completed"
--- PASS: TestSMTP (2.03s)
=== RUN TestSMTPNoLog
--- PASS: TestSMTPNoLog (2.00s)
=== RUN TestSMTPCustomServer
--- PASS: TestSMTPCustomServer (2.00s)
=== RUN TestSMTPCustomBackend
--- PASS: TestSMTPCustomBackend (2.00s)
=== RUN TestSMTPLoadFile
--- PASS: TestSMTPLoadFile (2.10s)
=== RUN TestReopenLog
--- PASS: TestReopenLog (2.05s)
=== RUN TestReopenServerLog
--- PASS: TestReopenServerLog (3.19s)
=== RUN TestSetConfig
--- PASS: TestSetConfig (2.08s)
=== RUN TestSetConfigError
--- PASS: TestSetConfigError (0.00s)
=== RUN TestSetAddProcessor
--- PASS: TestSetAddProcessor (1.14s)
=== RUN TestReloadConfig
time="2020-10-18T16:01:10+03:00" level=debug msg="making servers"
time="2020-10-18T16:01:10+03:00" level=info msg="processing worker started (#1)"
time="2020-10-18T16:01:10+03:00" level=info msg="Starting: 127.0.0.1:2525"
time="2020-10-18T16:01:10+03:00" level=info msg="Listening on TCP 127.0.0.1:2525"
time="2020-10-18T16:01:10+03:00" level=debug msg="[127.0.0.1:2525] Waiting for a new client. Next Client ID: 1"
time="2020-10-18T16:01:10+03:00" level=info msg="main log configured to stderr"
time="2020-10-18T16:01:10+03:00" level=info msg="Configuration was reloaded at 0001-01-01 00:00:00 +0000 UTC"
time="2020-10-18T16:01:10+03:00" level=info msg="stop signal for worker (#1)"
time="2020-10-18T16:01:10+03:00" level=info msg="allowed_hosts config changed, a new list was set"
--- PASS: TestReloadConfig (0.09s)
=== RUN TestPubSubAPI
--- PASS: TestPubSubAPI (0.17s)
=== RUN TestAPILog
time="2020-10-18T16:01:10+03:00" level=info msg=logtest1
--- PASS: TestAPILog (0.02s)
=== RUN TestSkipAllowsHost
--- PASS: TestSkipAllowsHost (1.00s)
=== RUN TestCustomBackendResult
--- PASS: TestCustomBackendResult (1.14s)
=== RUN TestConfigLoad
--- PASS: TestConfigLoad (0.02s)
=== RUN TestSampleConfig
--- PASS: TestSampleConfig (0.00s)
=== RUN TestConfigChangeEvents
--- PASS: TestConfigChangeEvents (1.57s)
=== RUN TestTLSConfig
--- PASS: TestTLSConfig (0.00s)
=== RUN TestHandleClient
--- PASS: TestHandleClient (0.04s)
=== RUN TestGithubIssue197
--- PASS: TestGithubIssue197 (0.10s)
=== RUN TestGithubIssue198
--- PASS: TestGithubIssue198 (0.21s)
=== RUN TestGithubIssue199
--- PASS: TestGithubIssue199 (0.21s)
=== RUN TestGithubIssue200
--- PASS: TestGithubIssue200 (0.07s)
=== RUN TestGithubIssue201
--- PASS: TestGithubIssue201 (0.12s)
=== RUN TestXClient
--- PASS: TestXClient (0.06s)
=== RUN TestGatewayTimeout
--- PASS: TestGatewayTimeout (5.01s)
=== RUN TestGatewayPanic
--- PASS: TestGatewayPanic (3.04s)
=== RUN TestAllowsHosts
--- PASS: TestAllowsHosts (0.00s)
PASS
ok _/home/oceanfish81/go-guerrilla 32.041s
go test -v ./tests
=== RUN TestStart
--- PASS: TestStart (1.08s)
=== RUN TestGreeting
--- PASS: TestGreeting (0.17s)
=== RUN TestShutDown
--- PASS: TestShutDown (0.51s)
=== RUN TestRFC2821LimitRecipients
--- PASS: TestRFC2821LimitRecipients (1.54s)
=== RUN TestRFC2832LimitLocalPart
--- PASS: TestRFC2832LimitLocalPart (0.23s)
=== RUN TestRFC2821LimitPath
--- PASS: TestRFC2821LimitPath (0.23s)
=== RUN TestRFC2821LimitDomain
--- PASS: TestRFC2821LimitDomain (0.22s)
=== RUN TestMailFromCmd
--- PASS: TestMailFromCmd (0.57s)
=== RUN TestHeloEhlo
--- PASS: TestHeloEhlo (0.25s)
=== RUN TestNestedMailCmd
--- PASS: TestNestedMailCmd (0.30s)
=== RUN TestCommandLineMaxLength
--- PASS: TestCommandLineMaxLength (0.21s)
=== RUN TestDataMaxLength
--- PASS: TestDataMaxLength (0.31s)
=== RUN TestDataCommand
--- PASS: TestDataCommand (0.32s)
=== RUN TestFuzz86f25b86b09897aed8f6c2aa5b5ee1557358a6de
--- PASS: TestFuzz86f25b86b09897aed8f6c2aa5b5ee1557358a6de (0.23s)
=== RUN TestFuzz21c56f89989d19c3bbbd81b288b2dae9e6dd2150
--- PASS: TestFuzz21c56f89989d19c3bbbd81b288b2dae9e6dd2150 (0.26s)
PASS
ok _/home/oceanfish81/go-guerrilla/tests 7.013s
go test -v ./cmd/guerrillad
=== RUN TestFileLimit
--- PASS: TestFileLimit (0.00s)
=== RUN TestCmdConfigChangeEvents
--- PASS: TestCmdConfigChangeEvents (0.29s)
=== RUN TestServe
--- PASS: TestServe (0.66s)
=== RUN TestServerAddEvent
--- PASS: TestServerAddEvent (1.91s)
=== RUN TestServerStartEvent
--- PASS: TestServerStartEvent (1.48s)
=== RUN TestServerStopEvent
--- PASS: TestServerStopEvent (0.65s)
=== RUN TestDebug
--- SKIP: TestDebug (0.00s)
=== RUN TestAllowedHostsEvent
--- PASS: TestAllowedHostsEvent (0.99s)
=== RUN TestTLSConfigEvent
--- PASS: TestTLSConfigEvent (2.08s)
=== RUN TestBadTLSStart
--- PASS: TestBadTLSStart (0.55s)
=== RUN TestBadTLSReload
--- PASS: TestBadTLSReload (1.93s)
=== RUN TestSetTimeoutEvent
--- PASS: TestSetTimeoutEvent (1.90s)
=== RUN TestDebugLevelChange
--- PASS: TestDebugLevelChange (0.58s)
=== RUN TestBadBackendReload
--- PASS: TestBadBackendReload (0.79s)
PASS
ok _/home/oceanfish81/go-guerrilla/cmd/guerrillad 14.446s
go test -v ./response
=== RUN TestGetBasicStatusCode
--- PASS: TestGetBasicStatusCode (0.00s)
=== RUN TestCustomString
--- PASS: TestCustomString (0.00s)
=== RUN TestBuildEnhancedResponseFromDefaultStatus
--- PASS: TestBuildEnhancedResponseFromDefaultStatus (0.00s)
PASS
ok _/home/oceanfish81/go-guerrilla/response 0.385s
go test -v ./backends
=== RUN TestStates
--- PASS: TestStates (0.00s)
=== RUN TestInitialize
--- PASS: TestInitialize (0.00s)
=== RUN TestStartProcessStop
--- PASS: TestStartProcessStop (0.00s)
=== RUN TestCompressedData
--- PASS: TestCompressedData (0.01s)
=== RUN TestRedisGeneric
--- PASS: TestRedisGeneric (0.02s)
=== RUN TestSQL
p_sql_test.go:26: requires -sql-dsn to run
--- SKIP: TestSQL (0.00s)
PASS
ok _/home/oceanfish81/go-guerrilla/backends 0.454s
go test -v ./mail

_/home/oceanfish81/go-guerrilla/mail

mail/envelope.go:163:42: conversion from int64 to string yields a string of one rune, not a string of digits (did you mean fmt.Sprint(x)?)
mail/envelope.go:163:68: conversion from uint64 to string yields a string of one rune, not a string of digits (did you mean fmt.Sprint(x)?)
FAIL _/home/oceanfish81/go-guerrilla/mail [build failed]
FAIL
make: *** [Makefile:34: test] Error 2

@advancedwebdeveloper
Copy link
Author

CC @ianlancetaylor

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

Successfully merging a pull request may close this issue.

1 participant