pkg / sftp

SFTP support for the go.crypto/ssh package
BSD 2-Clause "Simplified" License
1.5k stars 380 forks source link

Tests fails on 32bit arch (sftp v1.13.2) #469

Closed creekorful closed 2 years ago

creekorful commented 2 years ago

The issue has been reported on Debian. The logs are available here.

# github.com/pkg/sftp/internal/encoding/ssh/filexfer [github.com/pkg/sftp/internal/encoding/ssh/filexfer.test]
src/github.com/pkg/sftp/internal/encoding/ssh/filexfer/attrs_test.go:136:67: constant 1311768467463790320 overflows int
src/github.com/pkg/sftp/internal/encoding/ssh/filexfer/attrs_test.go:150:76: constant 2271560481 overflows int
src/github.com/pkg/sftp/internal/encoding/ssh/filexfer/attrs_test.go:229:85: constant 2271560481 overflows int
src/github.com/pkg/sftp/internal/encoding/ssh/filexfer/handle_packets_test.go:94:70: constant 1311768467463790320 overflows int
src/github.com/pkg/sftp/internal/encoding/ssh/filexfer/handle_packets_test.go:98:67: constant 4275878552 overflows int
src/github.com/pkg/sftp/internal/encoding/ssh/filexfer/handle_packets_test.go:149:70: constant 1311768467463790320 overflows int
src/github.com/pkg/sftp/internal/encoding/ssh/filexfer/open_packets_test.go:65:89: constant 2271560481 overflows int
src/github.com/pkg/sftp/internal/encoding/ssh/filexfer/path_packets_test.go:99:89: constant 2271560481 overflows int
src/github.com/pkg/sftp/internal/encoding/ssh/filexfer/path_packets_test.go:194:89: constant 2271560481 overflows int
src/github.com/pkg/sftp/internal/encoding/ssh/filexfer/response_packets_test.go:244:54: constant 2271560448 overflows int
src/github.com/pkg/sftp/internal/encoding/ssh/filexfer/response_packets_test.go:244:54: too many errors

I'll take a look and submit a PR :)

puellanivis commented 2 years ago

Interesting.

puellanivis commented 2 years ago

Should be resolved now with v1.13.4 I have tested the GOARCH=386 go test myself, and gone ahead and pushed a PR, merge, and cut a new release, so as to quickly unblock debian with this matter.

creekorful commented 2 years ago

@puellanivis Many thanks! I have uploaded a new version on the archive, we'll see how the tests are doing :)

creekorful commented 2 years ago

@puellanivis looks like this issue has indeed been resolved with the new release. Many thanks again! Latest build logs here.

However I want to report a minor issue: TestRequestStatVFS looks flacky, it fails from time to time. See:

=== RUN   TestRequestStatVFS
    request-server_test.go:762: 
            Error Trace:    request-server_test.go:762
            Error:          Not equal: 
                            expected: 0x8766b5f
                            actual  : 0x8766b68
            Test:           TestRequestStatVFS

But it looks like you already know that: #463. The issue has been reported on Debian too.

puellanivis commented 2 years ago

Yeah, there’s unfortunately a bit of a race condition on StatVFS between the two runs of the syscall. :(