Skip to content

pkg/jsonmessage.TestProgress fails depending on TIOCGWINSZ #23112

@AkihiroSuda

Description

@AkihiroSuda

Steps to reproduce the issue:

The test fails if COLUMNS <= 110.

$ echo $COLUMNS
$ go test -c ./pkg/jsonmessage
$ go test -v ./jsonmessage.test

Docker: ef42e2f
Go: 1.6.1

Describe the results you received:

=== RUN   TestProgress
--- FAIL: TestProgress (0.00s)
panic: runtime error: slice bounds out of range [recovered]
        panic: runtime error: slice bounds out of range

goroutine 7 [running]:
panic(0x586a80, 0xc8200100b0)
        /usr/lib/go-1.6/src/runtime/panic.go:464 +0x3e6
testing.tRunner.func1(0xc820094090)
        /usr/lib/go-1.6/src/testing/testing.go:467 +0x192
panic(0x586a80, 0xc8200100b0)
        /usr/lib/go-1.6/src/runtime/panic.go:426 +0x4e9
_/mnt/disk2/WORK/docker/pkg/jsonmessage.TestProgress(0xc820094090)
        /mnt/disk2/WORK/docker/pkg/jsonmessage/jsonmessage_test.go:37 +0xa80
testing.tRunner(0xc820094090, 0x893a98)
        /usr/lib/go-1.6/src/testing/testing.go:473 +0x98
created by testing.RunTests
        /usr/lib/go-1.6/src/testing/testing.go:582 +0x892

Describe the results you expected:
The test should not fail.

Additional information you deem important (e.g. issue happens only occasionally):

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions